From 844e72a7e13bf6d0b1c769c866c9d5ff10e66b72 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Tue, 13 Feb 2018 23:46:34 -0300 Subject: [PATCH 001/200] Buffer resource update batching implemented into TextureTintPipeline --- .../pipelines/ForwardDiffuseLightPipeline.js | 22 ++- .../webgl/pipelines/TextureTintPipeline.js | 154 ++++++++++++++++-- 2 files changed, 158 insertions(+), 18 deletions(-) diff --git a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js index 76905ee45..47bf1bfb9 100644 --- a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js +++ b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js @@ -130,6 +130,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera); } else @@ -155,6 +157,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera); } else @@ -180,6 +184,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera); } else @@ -205,7 +211,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { - this.renderer.setTexture2D(normalTexture.glTexture, 1); + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera); } else @@ -231,7 +238,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { - this.renderer.setTexture2D(normalTexture.glTexture, 1); + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera); } else @@ -258,6 +266,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera); } else @@ -283,6 +293,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera); } else @@ -308,6 +320,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchText.call(this, text, camera); } else @@ -333,6 +347,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera); } else @@ -358,6 +374,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera); } else diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index a7c6f485d..7b721f098 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -105,9 +105,125 @@ var TextureTintPipeline = new Class({ */ this.maxQuads = 2000; + this.batches = []; + this.mvpInit(); }, + setTexture2D: function (texture, unit) + { + if (!texture) return; + + var batches = this.batches; + + if (batches.length === 0) + { + this.pushBatch(); + } + + var batch = batches[batches.length - 1]; + + if (unit > 0) + { + if (batch.textures[unit - 1] && + batch.textures[unit - 1] !== texture) + { + this.pushBatch(); + } + + batches[batches.length - 1].textures[unit - 1] = texture; + } + else + { + if (batch.texture !== null && + batch.texture !== texture) + { + this.pushBatch(); + } + + batches[batches.length - 1].texture = texture; + } + }, + + pushBatch: function () + { + var batch = { + first: this.vertexCount, + texture: null, + textures: [] + }; + + this.batches.push(batch); + }, + + flush: function () + { + var gl = this.gl; + var vertexCount = this.vertexCount; + var vertexBuffer = this.vertexBuffer; + var vertexData = this.vertexData; + var topology = this.topology; + var vertexSize = this.vertexSize; + var batches = this.batches; + var batchCount = batches.length; + var batch = null; + var nextBatch = null; + + if (batchCount === 0 || vertexCount === 0) return; + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + + for (var index = 0; index < batches.length - 1; ++index) + { + batch = batches[index]; + batchNext = batches[index + 1]; + + if (batch.textures.length > 0) + { + for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + var nTexture = batch.textures[textureIndex]; + if (nTexture) + { + gl.activeTexture(gl.TEXTURE0 + 1 + textureIndex); + gl.bindTexture(gl.TEXTURE_2D, nTexture); + } + } + gl.activeTexture(gl.TEXTURE0); + } + + gl.bindTexture(gl.TEXTURE_2D, batch.texture); + gl.drawArrays(topology, batch.first, batchNext.first - batch.first); + } + + // Left over data + batch = batches[batches.length - 1]; + + if (batch.textures.length > 0) + { + for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + var nTexture = batch.textures[textureIndex]; + if (nTexture) + { + gl.activeTexture(gl.TEXTURE0 + 1 + textureIndex); + gl.bindTexture(gl.TEXTURE_2D, nTexture); + } + } + gl.activeTexture(gl.TEXTURE0); + } + + gl.bindTexture(gl.TEXTURE_2D, batch.texture); + gl.drawArrays(topology, batch.first, vertexCount - batch.first); + + this.vertexCount = 0; + batches.length = 0; + + this.pushBatch(); + + return this; + }, + /** * [description] * @@ -121,6 +237,11 @@ var TextureTintPipeline = new Class({ WebGLPipeline.prototype.onBind.call(this); this.mvpUpdate(); + if (this.batches.length === 0) + { + this.pushBatch(); + } + return this; }, @@ -216,9 +337,10 @@ var TextureTintPipeline = new Class({ var cos = Math.cos; var vertexComponentCount = this.vertexComponentCount; var vertexCapacity = this.vertexCapacity; + var texture = emitterManager.defaultFrame.source.glTexture; - renderer.setTexture2D(emitterManager.defaultFrame.source.glTexture, 0); - + this.setTexture2D(texture, 0); + for (var emitterIndex = 0; emitterIndex < emitterCount; ++emitterIndex) { var emitter = emitters[emitterIndex]; @@ -236,15 +358,15 @@ var TextureTintPipeline = new Class({ renderer.setBlendMode(emitter.blendMode); - if (this.vertexCount > 0) + if (this.vertexCount >= vertexCapacity) { this.flush(); + this.setTexture2D(texture, 0); } for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(aliveLength, maxQuads); - var vertexCount = 0; for (var index = 0; index < batchSize; ++index) { @@ -284,7 +406,7 @@ var TextureTintPipeline = new Class({ var ty2 = xw * mvb + yh * mvd + mvf; var tx3 = xw * mva + y * mvc + mve; var ty3 = xw * mvb + y * mvd + mvf; - var vertexOffset = vertexCount * vertexComponentCount; + var vertexOffset = this.vertexCount * vertexComponentCount; if (roundPixels) { @@ -329,17 +451,16 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 28] = uvs.y3; vertexViewU32[vertexOffset + 29] = color; - vertexCount += 6; + this.vertexCount += 6; } particleOffset += batchSize; aliveLength -= batchSize; - this.vertexCount = vertexCount; - - if (vertexCount >= vertexCapacity) + if (this.vertexCount >= vertexCapacity) { this.flush(); + this.setTexture2D(texture, 0); } } } @@ -421,7 +542,7 @@ var TextureTintPipeline = new Class({ // Bind Texture if texture wasn't bound. // This needs to be here because of multiple // texture atlas. - renderer.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); + this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -553,7 +674,7 @@ var TextureTintPipeline = new Class({ var tint3 = getTint(tintBR, alphaBR); var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -670,7 +791,8 @@ var TextureTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); + vertexOffset = this.vertexCount * this.vertexComponentCount; for (var index = 0, index0 = 0; index < length; index += 2) @@ -796,7 +918,7 @@ var TextureTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); for (var index = 0; index < textLength; ++index) { @@ -1020,7 +1142,7 @@ var TextureTintPipeline = new Class({ var uta, utb, utc, utd, ute, utf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); if (crop) { @@ -1456,8 +1578,8 @@ var TextureTintPipeline = new Class({ var v0 = (frameY / textureHeight) + vOffset; var u1 = (frameX + frameWidth) / textureWidth + uOffset; var v1 = (frameY + frameHeight) / textureHeight + vOffset; - - renderer.setTexture2D(texture, 0); + + this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; From edf15986ff3658fb4b3f47cf4372f17e0cd4e7b1 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Wed, 14 Feb 2018 13:20:56 -0300 Subject: [PATCH 002/200] BitmapMask si working properly with the vertex update batching. --- src/renderer/webgl/WebGLRenderer.js | 32 +++++++++++++++++++ .../webgl/pipelines/BitmapMaskPipeline.js | 18 ++++++++--- .../webgl/pipelines/TextureTintPipeline.js | 18 ++++++++--- 3 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 92bba96dc..3996ce2b8 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -766,6 +766,38 @@ var WebGLRenderer = new Class({ return this; }, + addBlendMode: function (func, equation) + { + var index = this.blendModes.push({ func: func, equation: equation }); + + return index - 1; + }, + + updateBlendMode: function (index, func, equation) + { + if (this.blendModes[index]) + { + this.blendModes[index].func = func; + + if (equation) + { + this.blendModes[index].equation = equation; + } + } + + return this; + }, + + removeBlendMode: function (index) + { + if (index > 16 && this.blendModes[index]) + { + this.blendModes.splice(index, 1); + } + + return this; + }, + /** * [description] * diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 2c9040d07..e98674983 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -153,8 +153,10 @@ var BitmapMaskPipeline = new Class({ if (bitmapMask && gl) { + renderer.flush(); + // First we clear the mask framebuffer - renderer.setFramebuffer(mask.maskFramebuffer); + gl.bindFramebuffer(gl.FRAMEBUFFER, mask.maskFramebuffer); gl.clearColor(0, 0, 0, 0); gl.clear(gl.COLOR_BUFFER_BIT); @@ -165,7 +167,7 @@ var BitmapMaskPipeline = new Class({ renderer.flush(); // Bind and clear our main source (masked object) - renderer.setFramebuffer(mask.mainFramebuffer); + gl.bindFramebuffer(gl.FRAMEBUFFER, mask.mainFramebuffer); gl.clearColor(0, 0, 0, 0); gl.clear(gl.COLOR_BUFFER_BIT); } @@ -187,14 +189,20 @@ var BitmapMaskPipeline = new Class({ if (bitmapMask) { + renderer.flush(); + // Return to default framebuffer - renderer.setFramebuffer(null); + gl.bindFramebuffer(gl.FRAMEBUFFER, null); // Bind bitmap mask pipeline and draw renderer.setPipeline(this); - renderer.setTexture2D(mask.mainTexture, 0); - renderer.setTexture2D(mask.maskTexture, 1); + + gl.activeTexture(gl.TEXTURE1); + gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture); + gl.activeTexture(gl.TEXTURE0); + gl.bindTexture(gl.TEXTURE_2D, mask.mainTexture); + // Finally draw a triangle filling the whole screen gl.drawArrays(this.topology, 0, 3); } diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 7b721f098..0fc31adac 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -166,6 +166,7 @@ var TextureTintPipeline = new Class({ var vertexSize = this.vertexSize; var batches = this.batches; var batchCount = batches.length; + var batchVertexCount = 0; var batch = null; var nextBatch = null; @@ -192,8 +193,12 @@ var TextureTintPipeline = new Class({ gl.activeTexture(gl.TEXTURE0); } + batchVertexCount = batchNext.first - batch.first; + + if (batch.texture === null || batchVertexCount <= 0) continue; + gl.bindTexture(gl.TEXTURE_2D, batch.texture); - gl.drawArrays(topology, batch.first, batchNext.first - batch.first); + gl.drawArrays(topology, batch.first, batchVertexCount); } // Left over data @@ -213,14 +218,17 @@ var TextureTintPipeline = new Class({ gl.activeTexture(gl.TEXTURE0); } - gl.bindTexture(gl.TEXTURE_2D, batch.texture); - gl.drawArrays(topology, batch.first, vertexCount - batch.first); + batchVertexCount = vertexCount - batch.first; + + if (batch.texture && batchVertexCount > 0) + { + gl.bindTexture(gl.TEXTURE_2D, batch.texture); + gl.drawArrays(topology, batch.first, batchVertexCount); + } this.vertexCount = 0; batches.length = 0; - this.pushBatch(); - return this; }, From 92182bed90158d22622546482d694ccd564d5447 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Wed, 14 Feb 2018 13:43:35 -0300 Subject: [PATCH 003/200] Fixed issue with Blitter renderer where it overwrote previous vertex data --- .../webgl/pipelines/TextureTintPipeline.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 0fc31adac..9557e66ed 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -512,8 +512,6 @@ var TextureTintPipeline = new Class({ for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(length, this.maxQuads); - var vertexOffset = 0; - var vertexCount = 0; for (var index = 0; index < batchSize; ++index) { @@ -551,6 +549,8 @@ var TextureTintPipeline = new Class({ // This needs to be here because of multiple // texture atlas. this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); + var vertexOffset = this.vertexCount * this.vertexComponentCount; + vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -583,16 +583,19 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 28] = uvs.y3; vertexViewU32[vertexOffset + 29] = tint; - vertexOffset += 30; - vertexCount += 6; + this.vertexCount += 6; + + if (this.vertexCount >= this.vertexCapacity) + { + this.flush(); + } } batchOffset += batchSize; length -= batchSize; - if (vertexCount <= this.vertexCapacity) + if (this.vertexCount >= this.vertexCapacity) { - this.vertexCount = vertexCount; this.flush(); } } From 633acec058b6d3b2c71fb365ef6b70bb1eb28473 Mon Sep 17 00:00:00 2001 From: samme Date: Wed, 14 Feb 2018 09:52:52 -0800 Subject: [PATCH 004/200] Fix wrong Extend target in MergeXHRSettings --- src/loader/MergeXHRSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/MergeXHRSettings.js b/src/loader/MergeXHRSettings.js index d725404bf..a2c4ee1fa 100644 --- a/src/loader/MergeXHRSettings.js +++ b/src/loader/MergeXHRSettings.js @@ -23,7 +23,7 @@ var XHRSettings = require('./XHRSettings'); */ var MergeXHRSettings = function (global, local) { - var output = (global === undefined) ? XHRSettings() : Extend(global); + var output = (global === undefined) ? XHRSettings() : Extend({}, global); if (local) { From 74abb9621110a766a9a4d58dece323ed6dd560f3 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Wed, 14 Feb 2018 16:45:22 -0300 Subject: [PATCH 005/200] Added alpha and tint to static tilemap layer. Fixed BitmapMask binding resources issue. --- src/renderer/webgl/WebGLPipeline.js | 21 ++++++++++++++++-- src/renderer/webgl/WebGLRenderer.js | 16 +++++++++++++- .../webgl/pipelines/BitmapMaskPipeline.js | 17 +++++--------- .../webgl/pipelines/TextureTintPipeline.js | 22 ++++++++++++------- .../staticlayer/StaticTilemapLayer.js | 3 ++- 5 files changed, 55 insertions(+), 24 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 851843bb0..b362c928e 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -186,6 +186,16 @@ var WebGLPipeline = new Class({ * @since 3.0.0 */ this.vertexComponentCount = Utils.getComponentCount(config.attributes); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.0.0 + */ + this.flushLocked = false; }, /** @@ -328,6 +338,9 @@ var WebGLPipeline = new Class({ */ flush: function () { + if (this.flushLocked) return this; + this.flushLocked = true; + var gl = this.gl; var vertexCount = this.vertexCount; var vertexBuffer = this.vertexBuffer; @@ -335,12 +348,16 @@ var WebGLPipeline = new Class({ var topology = this.topology; var vertexSize = this.vertexSize; - if (vertexCount === 0) return; - + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); gl.drawArrays(topology, 0, vertexCount); this.vertexCount = 0; + this.flushLocked = false; return this; }, diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 3996ce2b8..ae6c182c3 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -189,6 +189,16 @@ var WebGLRenderer = new Class({ // Intenal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit + * @type {int} + * @since 3.0.0 + */ + this.currentActiveTextureUnit = 0; + + /** * [description] * @@ -817,7 +827,11 @@ var WebGLRenderer = new Class({ { this.flush(); - gl.activeTexture(gl.TEXTURE0 + textureUnit); + if (this.currentActiveTextureUnit !== textureUnit) + { + gl.activeTexture(gl.TEXTURE0 + textureUnit); + this.currentActiveTextureUnit = textureUnit; + } gl.bindTexture(gl.TEXTURE_2D, texture); this.currentTextures[textureUnit] = texture; diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index e98674983..d1ca013bf 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -153,10 +153,8 @@ var BitmapMaskPipeline = new Class({ if (bitmapMask && gl) { - renderer.flush(); - // First we clear the mask framebuffer - gl.bindFramebuffer(gl.FRAMEBUFFER, mask.maskFramebuffer); + renderer.setFramebuffer(mask.maskFramebuffer); gl.clearColor(0, 0, 0, 0); gl.clear(gl.COLOR_BUFFER_BIT); @@ -167,7 +165,7 @@ var BitmapMaskPipeline = new Class({ renderer.flush(); // Bind and clear our main source (masked object) - gl.bindFramebuffer(gl.FRAMEBUFFER, mask.mainFramebuffer); + renderer.setFramebuffer(mask.mainFramebuffer); gl.clearColor(0, 0, 0, 0); gl.clear(gl.COLOR_BUFFER_BIT); } @@ -189,19 +187,14 @@ var BitmapMaskPipeline = new Class({ if (bitmapMask) { - renderer.flush(); - // Return to default framebuffer - gl.bindFramebuffer(gl.FRAMEBUFFER, null); + renderer.setFramebuffer(null); // Bind bitmap mask pipeline and draw renderer.setPipeline(this); - gl.activeTexture(gl.TEXTURE1); - gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture); - - gl.activeTexture(gl.TEXTURE0); - gl.bindTexture(gl.TEXTURE_2D, mask.mainTexture); + renderer.setTexture2D(mask.maskTexture, 1); + renderer.setTexture2D(mask.mainTexture, 0); // Finally draw a triangle filling the whole screen gl.drawArrays(this.topology, 0, 3); diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 9557e66ed..ec5f62069 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -158,7 +158,11 @@ var TextureTintPipeline = new Class({ flush: function () { + if (this.flushLocked) return this; + this.flushLocked = true; + var gl = this.gl; + var renderer = this.renderer; var vertexCount = this.vertexCount; var vertexBuffer = this.vertexBuffer; var vertexData = this.vertexData; @@ -170,8 +174,11 @@ var TextureTintPipeline = new Class({ var batch = null; var nextBatch = null; - if (batchCount === 0 || vertexCount === 0) return; - + if (batchCount === 0 || vertexCount === 0) + { + this.flushLocked = false; + return this; + } gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); for (var index = 0; index < batches.length - 1; ++index) @@ -186,8 +193,7 @@ var TextureTintPipeline = new Class({ var nTexture = batch.textures[textureIndex]; if (nTexture) { - gl.activeTexture(gl.TEXTURE0 + 1 + textureIndex); - gl.bindTexture(gl.TEXTURE_2D, nTexture); + renderer.setTexture2D(nTexture, 1 + textureIndex); } } gl.activeTexture(gl.TEXTURE0); @@ -197,7 +203,7 @@ var TextureTintPipeline = new Class({ if (batch.texture === null || batchVertexCount <= 0) continue; - gl.bindTexture(gl.TEXTURE_2D, batch.texture); + renderer.setTexture2D(batch.texture, 0); gl.drawArrays(topology, batch.first, batchVertexCount); } @@ -211,8 +217,7 @@ var TextureTintPipeline = new Class({ var nTexture = batch.textures[textureIndex]; if (nTexture) { - gl.activeTexture(gl.TEXTURE0 + 1 + textureIndex); - gl.bindTexture(gl.TEXTURE_2D, nTexture); + renderer.setTexture2D(nTexture, 1 + textureIndex); } } gl.activeTexture(gl.TEXTURE0); @@ -222,12 +227,13 @@ var TextureTintPipeline = new Class({ if (batch.texture && batchVertexCount > 0) { - gl.bindTexture(gl.TEXTURE_2D, batch.texture); + renderer.setTexture2D(batch.texture, 0); gl.drawArrays(topology, batch.first, batchVertexCount); } this.vertexCount = 0; batches.length = 0; + this.flushLocked = false; return this; }, diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index 8a4fc37ed..1e270e675 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -9,6 +9,7 @@ var Components = require('../../gameobjects/components'); var GameObject = require('../../gameobjects/GameObject'); var StaticTilemapLayerRender = require('./StaticTilemapLayerRender'); var TilemapComponents = require('../components'); +var Utils = require('../../renderer/webgl/Utils'); /** * @classdesc @@ -248,7 +249,6 @@ var StaticTilemapLayer = new Class({ var voffset = 0; var vertexCount = 0; var bufferSize = (mapWidth * mapHeight) * pipeline.vertexSize * 6; - var tint = 0xffffffff; if (bufferData === null) { @@ -289,6 +289,7 @@ var StaticTilemapLayer = new Class({ var ty2 = tyh; var tx3 = txw; var ty3 = ty; + var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha); vertexViewF32[voffset + 0] = tx0; vertexViewF32[voffset + 1] = ty0; From e2bebd3ddd73c7b0d5756cda9bd5aec268622057 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Wed, 14 Feb 2018 16:52:37 -0300 Subject: [PATCH 006/200] jsdoc property and method updates --- src/renderer/webgl/WebGLPipeline.js | 2 +- src/renderer/webgl/WebGLRenderer.js | 2 +- .../webgl/pipelines/TextureTintPipeline.js | 34 ++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index b362c928e..7aae8095c 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -193,7 +193,7 @@ var WebGLPipeline = new Class({ * * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked * @type {boolean} - * @since 3.0.0 + * @since 3.0.1 */ this.flushLocked = false; }, diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index ae6c182c3..321240aa7 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -194,7 +194,7 @@ var WebGLRenderer = new Class({ * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit * @type {int} - * @since 3.0.0 + * @since 3.0.1 */ this.currentActiveTextureUnit = 0; diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index ec5f62069..358f39605 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -105,14 +105,32 @@ var TextureTintPipeline = new Class({ */ this.maxQuads = 2000; + /** + * [description] + * + * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches + * @type {array} + * @since 3.0.1 + */ this.batches = []; this.mvpInit(); }, + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D + * @since 3.0.1 + * + * @param {WebGLTexture} texture - [description] + * @param {int} textureUnit - [description] + * + * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + */ setTexture2D: function (texture, unit) { - if (!texture) return; + if (!texture) return this; var batches = this.batches; @@ -143,8 +161,16 @@ var TextureTintPipeline = new Class({ batches[batches.length - 1].texture = texture; } + + return this; }, + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch + * @since 3.0.1 + */ pushBatch: function () { var batch = { @@ -156,6 +182,12 @@ var TextureTintPipeline = new Class({ this.batches.push(batch); }, + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush + * @since 3.0.1 + */ flush: function () { if (this.flushLocked) return this; From 11aff17e0d386f886cd21eedda1614837df59a85 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 01:49:11 +0000 Subject: [PATCH 007/200] Added Vector2.ZERO const for a handy zero vec2 reference. --- src/math/Vector2.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/math/Vector2.js b/src/math/Vector2.js index 15ec6aa22..6b986b770 100644 --- a/src/math/Vector2.js +++ b/src/math/Vector2.js @@ -78,7 +78,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#copy * @since 3.0.0 * - * @param {[type]} src - [description] + * @param {Phaser.Math.Vector2|object} src - [description] * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -533,4 +533,12 @@ var Vector2 = new Class({ }); +/** + * A static zero Vector2 for use by reference. + * + * @method Phaser.Math.Vector2.ZERO + * @since 3.0.1 + */ +Vector2.ZERO = new Vector2(); + module.exports = Vector2; From b36dd17430cdf66ce6ae325d93d57a77d65e09c6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 01:49:55 +0000 Subject: [PATCH 008/200] Removed pendingDestroy and opted for easier Set iteration. Updated Body.reset so it resets the Sprite as well, otherwise the Body remains stuck on the next update loop. --- src/physics/arcade/Body.js | 45 +++++++++++--------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index cfa0a90bc..91ed615ec 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -84,18 +84,6 @@ var Body = new Class({ */ this.enable = true; - /** - * If Body.destroy is called during the main physics update loop then this flag is set. - * The Body is then actually destroyed during World.postUpdate. - * You can also toggle it yourself. - * - * @name Phaser.Physics.Arcade.Body#pendingDestroy - * @type {boolean} - * @default false - * @since 3.0.1 - */ - this.pendingDestroy = false; - /** * [description] * @@ -1085,28 +1073,29 @@ var Body = new Class({ }, /** - * [description] + * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. + * If the body had any velocity or acceleration it is lost as a result of calling this. * * @method Phaser.Physics.Arcade.Body#reset * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The horizontal position to place the Game Object and Body. + * @param {number} y - The vertical position to place the Game Object and Body. */ reset: function (x, y) { this.stop(); - var sprite = this.gameObject; + var gameObject = this.gameObject; - this.position.x = x - sprite.displayOriginX + (sprite.scaleX * this.offset.x); - this.position.y = y - sprite.displayOriginY + (sprite.scaleY * this.offset.y); + gameObject.setPosition(x, y); - this.prev.x = this.position.x; - this.prev.y = this.position.y; + gameObject.getTopLeft(this.position); - this.rotation = this.gameObject.angle; - this.preRotation = this.rotation; + this.prev.copy(this.position); + + this.rotation = gameObject.angle; + this.preRotation = gameObject.angle; this.updateBounds(); this.updateCenter(); @@ -1279,17 +1268,9 @@ var Body = new Class({ */ destroy: function () { - if (!this.pendingDestroy) - { - // Will be removed the next time World.postUpdate runs, not before. - this.pendingDestroy = true; - } - else - { - this.world.disableBody(this); + this.enable = false; - this.world = null; - } + this.world.pendingDestroy.set(this); }, /** From 4cc7fed1dd32a7d07d113f074c59e453c6156c08 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 01:50:22 +0000 Subject: [PATCH 009/200] Added World.pendingDestroy Set and process it during postUpdate. --- src/physics/arcade/World.js | 54 ++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index c39c127c3..51465dd90 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -74,6 +74,15 @@ var World = new Class({ */ this.staticBodies = new Set(); + /** + * Static Bodies + * + * @name Phaser.Physics.Arcade.World#pendingDestroy + * @type {Phaser.Structs.Set} + * @since 3.0.1 + */ + this.pendingDestroy = new Set(); + /** * [description] * @@ -682,10 +691,13 @@ var World = new Class({ { var i; var body; - var bodies = this.bodies.entries; - var len = bodies.length; - var toDestroy = []; + var dynamic = this.bodies; + var static = this.staticBodies; + var pending = this.pendingDestroy; + + var bodies = dynamic.entries; + var len = bodies.length; for (i = 0; i < len; i++) { @@ -695,11 +707,6 @@ var World = new Class({ { body.postUpdate(); } - - if (body.pendingDestroy) - { - toDestroy.push(body); - } } if (this.drawDebug) @@ -718,7 +725,7 @@ var World = new Class({ } } - bodies = this.staticBodies.entries; + bodies = static.entries; len = bodies.length; for (i = 0; i < len; i++) @@ -732,13 +739,34 @@ var World = new Class({ } } - for (i = 0; i < toDestroy.length; i++) + if (pending.size > 0) { - body = toDestroy[i]; + var dynamicTree = this.tree; + var staticTree = this.staticTree; - this.emit('destroybody', this, body); + bodies = pending.entries; + len = bodies.length; - body.destroy(); + for (i = 0; i < len; i++) + { + body = bodies[i]; + + if (body.physicsType === CONST.DYNAMIC_BODY) + { + dynamicTree.remove(body); + dynamic.delete(body); + } + else if (body.physicsType === CONST.STATIC_BODY) + { + staticTree.remove(body); + static.delete(body); + } + + body.world = undefined; + body.gameObject = undefined; + } + + pending.clear(); } }, From 7df00ccb6f4680fdb325585800a2e7ee627b0181 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 01:51:36 +0000 Subject: [PATCH 010/200] Removed un-used properties from the Static Body Set un-used Vectors to use the Vec2 ZERO constant to save object creation. Added setGameObject and updateFromGameObject methods. --- src/physics/arcade/StaticBody.js | 178 +++++++++++++++---------------- 1 file changed, 88 insertions(+), 90 deletions(-) diff --git a/src/physics/arcade/StaticBody.js b/src/physics/arcade/StaticBody.js index 75f4596be..220cf47ef 100644 --- a/src/physics/arcade/StaticBody.js +++ b/src/physics/arcade/StaticBody.js @@ -120,7 +120,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.width = gameObject.width; + this.width = gameObject.displayWidth; /** * [description] @@ -129,31 +129,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.height = gameObject.height; - - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#sourceWidth - * @type {number} - * @since 3.0.0 - */ - this.sourceWidth = gameObject.width; - - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#sourceHeight - * @type {number} - * @since 3.0.0 - */ - this.sourceHeight = gameObject.height; - - if (gameObject.frame) - { - this.sourceWidth = gameObject.frame.realWidth; - this.sourceHeight = gameObject.frame.realHeight; - } + this.height = gameObject.displayHeight; /** * [description] @@ -162,7 +138,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.halfWidth = Math.abs(gameObject.width / 2); + this.halfWidth = Math.abs(this.width / 2); /** * [description] @@ -171,7 +147,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.halfHeight = Math.abs(gameObject.height / 2); + this.halfHeight = Math.abs(this.height / 2); /** * [description] @@ -189,7 +165,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.velocity = new Vector2(); + this.velocity = Vector2.ZERO; /** * [description] @@ -208,7 +184,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.gravity = new Vector2(); + this.gravity = Vector2.ZERO; /** * [description] @@ -217,7 +193,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.bounce = new Vector2(); + this.bounce = Vector2.ZERO; // If true this Body will dispatch events @@ -271,16 +247,6 @@ var StaticBody = new Class({ */ this.immovable = true; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#moves - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.moves = false; - /** * [description] * @@ -395,36 +361,70 @@ var StaticBody = new Class({ * @since 3.0.0 */ this.physicsType = CONST.STATIC_BODY; + }, - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_sx - * @type {number} - * @private - * @since 3.0.0 - */ - this._sx = gameObject.scaleX; + /** + * Changes the Game Object this Body is bound to. + * First it removes its reference from the old Game Object, then sets the new one. + * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object. + * + * @method Phaser.Physics.Arcade.StaticBody#setGameObject + * @since 3.0.1 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body. + * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object? + * + * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. + */ + setGameObject: function (gameObject, update) + { + if (gameObject && gameObject !== this.gameObject) + { + // Remove this body from the old game object + this.gameObject.body = null; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_sy - * @type {number} - * @private - * @since 3.0.0 - */ - this._sy = gameObject.scaleY; + gameObject.body = this; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); + // Update our reference + this.gameObject = gameObject; + } + + if (update) + { + this.updateFromGameObject(); + } + + return this; + }, + + /** + * Updates this Static Body so that its position and dimensions are updated + * based on the current Game Object it is bound to. + * + * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject + * @since 3.0.1 + * + * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. + */ + updateFromGameObject: function () + { + this.world.staticTree.remove(this); + + var gameObject = this.gameObject; + + gameObject.getTopLeft(this.position); + + this.width = gameObject.displayWidth; + this.height = gameObject.displayHeight; + + this.halfWidth = Math.abs(this.width / 2); + this.halfHeight = Math.abs(this.height / 2); + + this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight); + + this.world.staticTree.insert(this); + + return this; }, /** @@ -447,12 +447,12 @@ var StaticBody = new Class({ this.world.staticTree.remove(this); - this.sourceWidth = width; - this.sourceHeight = height; - 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.width = width; + this.height = height; + + this.halfWidth = Math.floor(width / 2); + this.halfHeight = Math.floor(height / 2); + this.offset.set(offsetX, offsetY); this.updateCenter(); @@ -487,13 +487,11 @@ var StaticBody = new Class({ this.world.staticTree.remove(this); this.isCircle = true; + this.radius = radius; - this.sourceWidth = radius * 2; - this.sourceHeight = radius * 2; - - this.width = this.sourceWidth * this._sx; - this.height = this.sourceHeight * this._sy; + this.width = radius * 2; + this.height = radius * 2; this.halfWidth = Math.floor(this.width / 2); this.halfHeight = Math.floor(this.height / 2); @@ -534,17 +532,14 @@ var StaticBody = new Class({ */ reset: function (x, y) { - var sprite = this.gameObject; + var gameObject = this.gameObject; - if (x === undefined) { x = sprite.x; } - if (y === undefined) { y = sprite.y; } + if (x === undefined) { x = gameObject.x; } + if (y === undefined) { y = gameObject.y; } this.world.staticTree.remove(this); - this.position.x = x - sprite.displayOriginX + (sprite.scaleX * this.offset.x); - this.position.y = y - sprite.displayOriginY + (sprite.scaleY * this.offset.y); - - this.rotation = this.gameObject.angle; + gameObject.getTopLeft(this.position); this.updateCenter(); @@ -673,8 +668,9 @@ var StaticBody = new Class({ */ destroy: function () { - this.gameObject.body = null; - this.gameObject = null; + this.enable = false; + + this.world.pendingDestroy.set(this); }, /** @@ -748,9 +744,10 @@ var StaticBody = new Class({ set: function (value) { + this.world.staticTree.remove(this); + this.position.x = value; - this.world.staticTree.remove(this); this.world.staticTree.insert(this); } @@ -772,9 +769,10 @@ var StaticBody = new Class({ set: function (value) { + this.world.staticTree.remove(this); + this.position.y = value; - this.world.staticTree.remove(this); this.world.staticTree.insert(this); } From aa9cac4ba8c3c53caf12030c63100c8708b02368 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 01:52:01 +0000 Subject: [PATCH 011/200] Added refreshBody method and jsdocs --- src/physics/arcade/components/Enable.js | 40 ++++++++++++++++++------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/physics/arcade/components/Enable.js b/src/physics/arcade/components/Enable.js index 9eccc8a38..6a401980c 100644 --- a/src/physics/arcade/components/Enable.js +++ b/src/physics/arcade/components/Enable.js @@ -18,18 +18,16 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#enableBody * @since 3.0.0 * - * @param {[type]} reset - [description] - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} enableGameObject - [description] - * @param {[type]} showGameObject - [description] + * @param {boolean} reset - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {boolean} enableGameObject - [description] + * @param {boolean} showGameObject - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ enableBody: function (reset, x, y, enableGameObject, showGameObject) { - this.body.enable = true; - if (reset) { this.body.reset(x, y); @@ -45,6 +43,8 @@ var Enable = { this.body.gameObject.visible = true; } + this.body.enable = true; + return this; }, @@ -54,10 +54,10 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#disableBody * @since 3.0.0 * - * @param {[type]} disableGameObject - [description] - * @param {[type]} hideGameObject - [description] + * @param {boolean} [disableGameObject=false] - [description] + * @param {boolean} [hideGameObject=false] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ disableBody: function (disableGameObject, hideGameObject) { @@ -78,6 +78,24 @@ var Enable = { this.body.gameObject.visible = false; } + return this; + }, + + /** + * Syncs the Bodies position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + * + * @method Phaser.Physics.Arcade.Components.Enable#refreshBody + * @since 3.0.1 + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + refreshBody: function () + { + this.body.updateFromGameObject(); + return this; } From 6480eee7bc50accd315ddf86db07078554a289e0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 14:03:51 +0000 Subject: [PATCH 012/200] Added change log template --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..3bb2a1bac --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +## Version 3.0.1 - 15th February 2018 + From 4e6df03512841d1bef609b591a3ea331c4c0f88a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 14:31:15 +0000 Subject: [PATCH 013/200] Updated semver --- CHANGELOG.md | 2 +- package.json | 4 ++-- src/const.js | 2 +- src/math/Vector2.js | 2 +- src/physics/arcade/Collider.js | 4 ++-- src/physics/arcade/StaticBody.js | 4 ++-- src/physics/arcade/World.js | 4 ++-- src/physics/arcade/components/Enable.js | 2 +- src/renderer/webgl/WebGLPipeline.js | 2 +- src/renderer/webgl/WebGLRenderer.js | 2 +- src/renderer/webgl/pipelines/TextureTintPipeline.js | 8 ++++---- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb2a1bac..fdc1162ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ # Change Log -## Version 3.0.1 - 15th February 2018 +## Version 3.1.0 - 15th February 2018 diff --git a/package.json b/package.json index 8475ffc1f..bdf7ab481 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phaser", - "version": "3.0.0", - "release": "Kaneda", + "version": "3.1.0", + "release": "Onishi", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", "logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png", diff --git a/src/const.js b/src/const.js index 85b438e2f..6668d88cb 100644 --- a/src/const.js +++ b/src/const.js @@ -13,7 +13,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.0.0', + VERSION: '3.1.0', BlendModes: require('./renderer/BlendModes'), diff --git a/src/math/Vector2.js b/src/math/Vector2.js index 6b986b770..b6322a1cd 100644 --- a/src/math/Vector2.js +++ b/src/math/Vector2.js @@ -537,7 +537,7 @@ var Vector2 = new Class({ * A static zero Vector2 for use by reference. * * @method Phaser.Math.Vector2.ZERO - * @since 3.0.1 + * @since 3.1.0 */ Vector2.ZERO = new Vector2(); diff --git a/src/physics/arcade/Collider.js b/src/physics/arcade/Collider.js index 063ace7a1..bc287e38a 100644 --- a/src/physics/arcade/Collider.js +++ b/src/physics/arcade/Collider.js @@ -43,7 +43,7 @@ var Collider = new Class({ * * @name Phaser.Physics.Arcade.Collider#name * @type {string} - * @since 3.0.1 + * @since 3.1.0 */ this.name = ''; @@ -116,7 +116,7 @@ var Collider = new Class({ * [description] * * @method Phaser.Physics.Arcade.Collider#setName - * @since 3.0.1 + * @since 3.1.0 * * @param {string} name - [description] * diff --git a/src/physics/arcade/StaticBody.js b/src/physics/arcade/StaticBody.js index 220cf47ef..1900820da 100644 --- a/src/physics/arcade/StaticBody.js +++ b/src/physics/arcade/StaticBody.js @@ -369,7 +369,7 @@ var StaticBody = new Class({ * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object. * * @method Phaser.Physics.Arcade.StaticBody#setGameObject - * @since 3.0.1 + * @since 3.1.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body. * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object? @@ -402,7 +402,7 @@ var StaticBody = new Class({ * based on the current Game Object it is bound to. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject - * @since 3.0.1 + * @since 3.1.0 * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 51465dd90..058fc0466 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -79,7 +79,7 @@ var World = new Class({ * * @name Phaser.Physics.Arcade.World#pendingDestroy * @type {Phaser.Structs.Set} - * @since 3.0.1 + * @since 3.1.0 */ this.pendingDestroy = new Set(); @@ -392,7 +392,7 @@ var World = new Class({ * [description] * * @method Phaser.Physics.Arcade.World#disableGameObjectBody - * @since 3.0.1 + * @since 3.1.0 * * @param {Phaser.GameObjects.GameObject} object - [description] * diff --git a/src/physics/arcade/components/Enable.js b/src/physics/arcade/components/Enable.js index 6a401980c..c03a1ec71 100644 --- a/src/physics/arcade/components/Enable.js +++ b/src/physics/arcade/components/Enable.js @@ -88,7 +88,7 @@ var Enable = { * in the Physics World, based on its Game Object. * * @method Phaser.Physics.Arcade.Components.Enable#refreshBody - * @since 3.0.1 + * @since 3.1.0 * * @return {Phaser.GameObjects.GameObject} This Game Object. */ diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 7aae8095c..8675175cd 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -193,7 +193,7 @@ var WebGLPipeline = new Class({ * * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked * @type {boolean} - * @since 3.0.1 + * @since 3.1.0 */ this.flushLocked = false; }, diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 321240aa7..28038c7e2 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -194,7 +194,7 @@ var WebGLRenderer = new Class({ * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit * @type {int} - * @since 3.0.1 + * @since 3.1.0 */ this.currentActiveTextureUnit = 0; diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 358f39605..b16da10e2 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -110,7 +110,7 @@ var TextureTintPipeline = new Class({ * * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches * @type {array} - * @since 3.0.1 + * @since 3.1.0 */ this.batches = []; @@ -121,7 +121,7 @@ var TextureTintPipeline = new Class({ * [description] * * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D - * @since 3.0.1 + * @since 3.1.0 * * @param {WebGLTexture} texture - [description] * @param {int} textureUnit - [description] @@ -169,7 +169,7 @@ var TextureTintPipeline = new Class({ * [description] * * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch - * @since 3.0.1 + * @since 3.1.0 */ pushBatch: function () { @@ -186,7 +186,7 @@ var TextureTintPipeline = new Class({ * [description] * * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush - * @since 3.0.1 + * @since 3.1.0 */ flush: function () { From 79520bfdc423211a717da93616e0d8b2e7044f9d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 15 Feb 2018 14:33:36 +0000 Subject: [PATCH 014/200] Added jsdoc --- src/gameobjects/graphics/Graphics.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gameobjects/graphics/Graphics.js b/src/gameobjects/graphics/Graphics.js index ae5022756..bd9515e6c 100644 --- a/src/gameobjects/graphics/Graphics.js +++ b/src/gameobjects/graphics/Graphics.js @@ -1115,6 +1115,13 @@ var Graphics = new Class({ }); +/** + * A Camera used specifically by the Graphics system for rendering to textures. + * + * @name Phaser.GameObjects.Graphics.TargetCamera + * @type {Phaser.Cameras.Scene2D.Camera} + * @since 3.1.0 + */ Graphics.TargetCamera = new Camera(0, 0, 0, 0); module.exports = Graphics; From 70ff0fd2335bbf9d381fbe55fcfbc5e40f73609f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 12:33:50 +0000 Subject: [PATCH 015/200] Updated change log and readme for 3.1.0 --- CHANGELOG.md | 30 +++++++++++++++++++++++++++++- README.md | 42 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc1162ea..20a6bbf7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,32 @@ # Change Log -## Version 3.1.0 - 15th February 2018 +## Version 3.1.0 - Onishi - 16th February 2018 +### Updates + +* Vertex resource handling code updated, further optimizing the WebGL batching. You should now see less gl ops per frame across all batches. +* The `Blitter` game object has been updated to use the `List` structure instead of `DisplayList`. +* Arcade Physics World `disableBody` has been renamed `disableGameObjectBody` to more accurately reflect what it does. +* Lots of un-used properties were removed from the Arcade Physics Static Body object. +* Arcade Physics Static Body can now refresh itself from its parent via `refreshBody`. + +### Bug Fixes + +* A couple of accidental uses of `let` existed, which broke Image loading in Safari # (thanks Yat Hin Wong) +* Added the static property `Graphics.TargetCamera` was added back in which fixed `Graphics.generateTexture`. +* The SetHitArea Action now calls `setInteractive`, fixing `Group.createMultiple` when a hitArea has been set. +* Removed rogue Tween emit calls. Fix #3222 (thanks @ZaDarkSide) +* Fixed incorrect call to TweenManager.makeActive. Fix #3219 (thanks @ZaDarkSide) +* The Depth component was missing from the Zone Game Object. Fix #3213 (thanks @Twilrom) +* Fixed issue with `Blitter` overwriting previous objects vertex data. +* The `Tile` game object tinting was fixed, so tiles now honor alpha values correctly. +* The `BitmapMask` would sometimes incorrectly bind its resources. +* Fixed the wrong Extend target in MergeXHRSettings (thanks @samme) + +### New Features + +* Destroying a Game Object will now call destroy on its physics body, if it has one set. +* Arcade Physics Colliders have a new `name` property and corresponding `setName` method. +* Matter.js bodies now have an inlined destroy method that removes them from the World. +* Impact bodies now remove themselves from the World when destroyed. +* Added Vector2.ZERO static property. diff --git a/README.md b/README.md index 0cabe3d6d..bbef50522 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Along with the fantastic open source community, Phaser is actively developed and Thousands of developers worldwide use Phaser. From indies and multi-national digital agencies, to schools and Universities. Each creating their own incredible [games](https://phaser.io/games/). **Visit:** The [Phaser website](https://phaser.io) and follow on [Twitter](https://twitter.com/phaser_) (#phaserjs)
-**Learn:** [API Docs](https://phaser.io/docs), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
+**Learn:** [API Docs](https://github.com/photonstorm/phaser3-docs), [Support Forum][forum] and [StackOverflow](https://stackoverflow.com/questions/tagged/phaser-framework)
**Code:** 700+ [Examples](https://labs.phaser.io) (source available in this [repo][examples])
**Read:** Weekly [Phaser World](#newsletter) Newsletter
**Chat:** [Slack](https://phaser.io/community/slack) and [Discord](https://phaser.io/community/discord)
@@ -24,7 +24,9 @@ Grab the source and join in the fun!
-> 12th February 2018 +> 16th February 2018 + +**Updated:** Thank you for the amazing response to the 3.0.0 release! We've been hard at work and have now prepared 3.1.0 for you, which is available today. This fixes a few issues that crept in and further speeds up the WebGL rendering. Check out the [Change Log](#changelog) for more details. After 1.5 years in the making, tens of thousands of lines of code, hundreds of examples and countless hours of relentless work: Phaser 3 is finally out. It has been a real labor of love and then some! @@ -92,13 +94,13 @@ npm install phaser [Phaser is on jsDelivr](http://www.jsdelivr.com/projects/phaser), a "super-fast CDN for developers". Include the following in your html: ```html - + ``` or the minified version: ```html - + ``` ### License @@ -229,8 +231,38 @@ Should you wish to build Phaser 3 from source ensure you have the required packa You can then run `webpack` to perform a dev build to the `build` folder, including source maps for local testing, or run `npm run dist` to create a minified packaged build into the `dist` folder. ![Change Log](https://phaser.io/images/github/div-change-log.png "Change Log") + -We have always been meticulous in recording changes to the Phaser code base, and where relevant, giving attribution to those in the community who helped. This is something we'll continue with Phaser 3 and you'll see this section expand as we push through the 3.0.0 releases. +## Version 3.1.0 - Onishi - 16th February 2018 + +### Updates + +* Vertex resource handling code updated, further optimizing the WebGL batching. You should now see less gl ops per frame across all batches. +* The `Blitter` game object has been updated to use the `List` structure instead of `DisplayList`. +* Arcade Physics World `disableBody` has been renamed `disableGameObjectBody` to more accurately reflect what it does. +* Lots of un-used properties were removed from the Arcade Physics Static Body object. +* Arcade Physics Static Body can now refresh itself from its parent via `refreshBody`. + +### Bug Fixes + +* A couple of accidental uses of `let` existed, which broke Image loading in Safari # (thanks Yat Hin Wong) +* Added the static property `Graphics.TargetCamera` was added back in which fixed `Graphics.generateTexture`. +* The SetHitArea Action now calls `setInteractive`, fixing `Group.createMultiple` when a hitArea has been set. +* Removed rogue Tween emit calls. Fix #3222 (thanks @ZaDarkSide) +* Fixed incorrect call to TweenManager.makeActive. Fix #3219 (thanks @ZaDarkSide) +* The Depth component was missing from the Zone Game Object. Fix #3213 (thanks @Twilrom) +* Fixed issue with `Blitter` overwriting previous objects vertex data. +* The `Tile` game object tinting was fixed, so tiles now honor alpha values correctly. +* The `BitmapMask` would sometimes incorrectly bind its resources. +* Fixed the wrong Extend target in MergeXHRSettings (thanks @samme) + +### New Features + +* Destroying a Game Object will now call destroy on its physics body, if it has one set. +* Arcade Physics Colliders have a new `name` property and corresponding `setName` method. +* Matter.js bodies now have an inlined destroy method that removes them from the World. +* Impact bodies now remove themselves from the World when destroyed. +* Added Vector2.ZERO static property. Looking for a v2 change? Check out the [Phaser CE Change Log](https://github.com/photonstorm/phaser-ce/blob/master/CHANGELOG.md) From 77f165a9b9c04b8de66adf445ed2c3f9cf1e1e86 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 12:37:33 +0000 Subject: [PATCH 016/200] 3.1.0 dist files --- dist/phaser-arcade-physics.js | 8112 ++++++++++++++-------------- dist/phaser-arcade-physics.min.js | 2 +- dist/phaser.js | 8302 +++++++++++++++-------------- dist/phaser.min.js | 2 +- 4 files changed, 8606 insertions(+), 7812 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index f278b1495..4f9d338f3 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -706,11 +706,9 @@ var GameObject = new Class({ this.data = undefined; } - // TODO Keep a reference to the manager in Body, so body can remove itself, not via System if (this.body) { - // sys.physicsManager.remove(this); - + this.body.destroy(); this.body = undefined; } @@ -1002,7 +1000,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#copy * @since 3.0.0 * - * @param {[type]} src - [description] + * @param {Phaser.Math.Vector2|object} src - [description] * * @return {Phaser.Math.Vector2} This Vector2. */ @@ -1457,6 +1455,14 @@ var Vector2 = new Class({ }); +/** + * A static zero Vector2 for use by reference. + * + * @method Phaser.Math.Vector2.ZERO + * @since 3.1.0 + */ +Vector2.ZERO = new Vector2(); + module.exports = Vector2; @@ -1511,9 +1517,9 @@ module.exports = FileTypesManager; var Class = __webpack_require__(0); var Contains = __webpack_require__(33); -var GetPoint = __webpack_require__(106); -var GetPoints = __webpack_require__(181); -var Random = __webpack_require__(107); +var GetPoint = __webpack_require__(107); +var GetPoints = __webpack_require__(182); +var Random = __webpack_require__(108); /** * @classdesc @@ -2404,24 +2410,24 @@ module.exports = PluginManager; module.exports = { - Alpha: __webpack_require__(379), - Animation: __webpack_require__(362), - BlendMode: __webpack_require__(380), - ComputedSize: __webpack_require__(381), - Depth: __webpack_require__(382), - Flip: __webpack_require__(383), - GetBounds: __webpack_require__(384), - Origin: __webpack_require__(385), - Pipeline: __webpack_require__(183), - ScaleMode: __webpack_require__(386), - ScrollFactor: __webpack_require__(387), - Size: __webpack_require__(388), - Texture: __webpack_require__(389), - Tint: __webpack_require__(390), - ToJSON: __webpack_require__(391), - Transform: __webpack_require__(392), - TransformMatrix: __webpack_require__(184), - Visible: __webpack_require__(393) + Alpha: __webpack_require__(378), + Animation: __webpack_require__(361), + BlendMode: __webpack_require__(379), + ComputedSize: __webpack_require__(380), + Depth: __webpack_require__(381), + Flip: __webpack_require__(382), + GetBounds: __webpack_require__(383), + Origin: __webpack_require__(384), + Pipeline: __webpack_require__(184), + ScaleMode: __webpack_require__(385), + ScrollFactor: __webpack_require__(386), + Size: __webpack_require__(387), + Texture: __webpack_require__(388), + Tint: __webpack_require__(389), + ToJSON: __webpack_require__(390), + Transform: __webpack_require__(391), + TransformMatrix: __webpack_require__(185), + Visible: __webpack_require__(392) }; @@ -3007,7 +3013,7 @@ module.exports = GetTilesWithin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RND = __webpack_require__(378); +var RND = __webpack_require__(377); var MATH_CONST = { @@ -3262,10 +3268,10 @@ module.exports = FILE_CONST; var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(146); -var MergeXHRSettings = __webpack_require__(147); -var XHRLoader = __webpack_require__(314); -var XHRSettings = __webpack_require__(90); +var GetURL = __webpack_require__(147); +var MergeXHRSettings = __webpack_require__(148); +var XHRLoader = __webpack_require__(313); +var XHRSettings = __webpack_require__(91); /** * @classdesc @@ -3761,7 +3767,7 @@ module.exports = { */ var CONST = __webpack_require__(22); -var Smoothing = __webpack_require__(119); +var Smoothing = __webpack_require__(121); // The pool into which the canvas elements are placed. var pool = []; @@ -4147,7 +4153,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.0.0', + VERSION: '3.1.0', BlendModes: __webpack_require__(46), @@ -4259,7 +4265,7 @@ module.exports = CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsPlainObject = __webpack_require__(164); +var IsPlainObject = __webpack_require__(165); // @param {boolean} deep - Perform a deep copy? // @param {object} target - The target object to copy to. @@ -4662,6 +4668,136 @@ module.exports = Contains; /***/ }), /* 34 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Renderer.WebGL.Utils + * @since 3.0.0 + */ +module.exports = { + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats + * @since 3.0.0 + * + * @param {number} r - [description] + * @param {number} g - [description] + * @param {number} b - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintFromFloats: function (r, g, b, a) + { + var ur = ((r * 255.0)|0) & 0xFF; + var ug = ((g * 255.0)|0) & 0xFF; + var ub = ((b * 255.0)|0) & 0xFF; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlpha: function (rgb, a) + { + var ua = ((a * 255.0)|0) & 0xFF; + return ((ua << 24) | rgb) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlphaAndSwap: function (rgb, a) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB + * @since 3.0.0 + * + * @param {number} rgb - [description] + * + * @return {number} [description] + */ + getFloatsFromUintRGB: function (rgb) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getComponentCount + * @since 3.0.0 + * + * @param {number} attributes - [description] + * + * @return {number} [description] + */ + getComponentCount: function (attributes) + { + var count = 0; + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + + if (element.type === WebGLRenderingContext.FLOAT) + { + count += element.size; + } + else + { + count += 1; // We'll force any other type to be 32 bit. for now + } + } + + return count; + } + +}; + + +/***/ }), +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4670,7 +4806,7 @@ module.exports = Contains; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(97); +var GetTileAt = __webpack_require__(98); var GetTilesWithin = __webpack_require__(15); /** @@ -4726,7 +4862,7 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4756,7 +4892,7 @@ module.exports = DegToRad; /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4766,7 +4902,7 @@ module.exports = DegToRad; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(115); +var GetColor = __webpack_require__(117); var GetColor32 = __webpack_require__(199); /** @@ -5270,7 +5406,7 @@ module.exports = Color; /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5282,7 +5418,7 @@ module.exports = Color; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var SpriteRender = __webpack_require__(444); +var SpriteRender = __webpack_require__(443); /** * @classdesc @@ -5423,136 +5559,6 @@ var Sprite = new Class({ module.exports = Sprite; -/***/ }), -/* 38 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Renderer.WebGL.Utils - * @since 3.0.0 - */ -module.exports = { - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats - * @since 3.0.0 - * - * @param {number} r - [description] - * @param {number} g - [description] - * @param {number} b - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintFromFloats: function (r, g, b, a) - { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlpha: function (rgb, a) - { - var ua = ((a * 255.0)|0) & 0xFF; - return ((ua << 24) | rgb) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlphaAndSwap: function (rgb, a) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB - * @since 3.0.0 - * - * @param {number} rgb - [description] - * - * @return {number} [description] - */ - getFloatsFromUintRGB: function (rgb) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getComponentCount - * @since 3.0.0 - * - * @param {number} attributes - [description] - * - * @return {number} [description] - */ - getComponentCount: function (attributes) - { - var count = 0; - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - - if (element.type === WebGLRenderingContext.FLOAT) - { - count += element.size; - } - else - { - count += 1; // We'll force any other type to be 32 bit. for now - } - } - - return count; - } - -}; - - /***/ }), /* 39 */, /* 40 */ @@ -5769,7 +5775,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(306); +var Rectangle = __webpack_require__(305); /** * @classdesc @@ -7801,9 +7807,9 @@ module.exports = Angle; var Class = __webpack_require__(0); var Contains = __webpack_require__(53); -var GetPoint = __webpack_require__(308); -var GetPoints = __webpack_require__(309); -var Random = __webpack_require__(111); +var GetPoint = __webpack_require__(307); +var GetPoints = __webpack_require__(308); +var Random = __webpack_require__(112); /** * @classdesc @@ -9059,9 +9065,9 @@ module.exports = { var Class = __webpack_require__(0); var Contains = __webpack_require__(32); -var GetPoint = __webpack_require__(178); -var GetPoints = __webpack_require__(179); -var Random = __webpack_require__(105); +var GetPoint = __webpack_require__(179); +var GetPoints = __webpack_require__(180); +var Random = __webpack_require__(106); /** * @classdesc @@ -9477,7 +9483,7 @@ module.exports = Length; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(120); +var FromPoints = __webpack_require__(122); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -10216,7 +10222,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(493))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(492))) /***/ }), /* 68 */ @@ -10270,13 +10276,13 @@ module.exports = Contains; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Actions = __webpack_require__(165); +var Actions = __webpack_require__(166); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(4); -var Range = __webpack_require__(273); +var Range = __webpack_require__(272); var Set = __webpack_require__(61); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * @classdesc @@ -11811,6 +11817,7 @@ var RectangleContains = __webpack_require__(33); * @constructor * @since 3.0.0 * + * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.GetBounds * @extends Phaser.GameObjects.Components.Origin * @extends Phaser.GameObjects.Components.ScaleMode @@ -11829,6 +11836,7 @@ var Zone = new Class({ Extends: GameObject, Mixins: [ + Components.Depth, Components.GetBounds, Components.Origin, Components.ScaleMode, @@ -12568,9 +12576,9 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GameObject = __webpack_require__(2); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); var Vector2 = __webpack_require__(6); -var Vector4 = __webpack_require__(118); +var Vector4 = __webpack_require__(120); /** * @classdesc @@ -12944,7 +12952,7 @@ module.exports = init(); */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); /** * @classdesc @@ -13125,6 +13133,16 @@ var WebGLPipeline = new Class({ * @since 3.0.0 */ this.vertexComponentCount = Utils.getComponentCount(config.attributes); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; }, /** @@ -13267,6 +13285,9 @@ var WebGLPipeline = new Class({ */ flush: function () { + if (this.flushLocked) return this; + this.flushLocked = true; + var gl = this.gl; var vertexCount = this.vertexCount; var vertexBuffer = this.vertexBuffer; @@ -13274,12 +13295,16 @@ var WebGLPipeline = new Class({ var topology = this.topology; var vertexSize = this.vertexSize; - if (vertexCount === 0) return; - + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); gl.drawArrays(topology, 0, vertexCount); this.vertexCount = 0; + this.flushLocked = false; return this; }, @@ -14639,6 +14664,921 @@ module.exports = BaseSound; /***/ }), /* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * [description] + * + * @class List + * @memberOf Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @param {any} parent - [description] + */ +var List = new Class({ + + initialize: + + function List (parent) + { + /** + * The parent of this list. + * + * @name Phaser.Structs.List#parent + * @type {any} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * The objects that belong to this collection. + * + * @name Phaser.Structs.List#list + * @type {array} + * @default [] + * @since 3.0.0 + */ + this.list = []; + + /** + * [description] + * + * @name Phaser.Structs.List#position + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.position = 0; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#add + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + add: function (child) + { + // Is child already in this display list? + + if (this.getIndex(child) === -1) + { + this.list.push(child); + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#addAt + * @since 3.0.0 + * + * @param {object} child - [description] + * @param {integer} index - [description] + * + * @return {object} [description] + */ + addAt: function (child, index) + { + if (index === undefined) { index = 0; } + + if (this.list.length === 0) + { + return this.add(child); + } + + if (index >= 0 && index <= this.list.length) + { + if (this.getIndex(child) === -1) + { + this.list.splice(index, 0, child); + } + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#addMultiple + * @since 3.0.0 + * + * @param {array} children - [description] + * + * @return {array} [description] + */ + addMultiple: function (children) + { + if (Array.isArray(children)) + { + for (var i = 0; i < children.length; i++) + { + this.add(children[i]); + } + } + + return children; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#getAt + * @since 3.0.0 + * + * @param {integer} index - [description] + * + * @return {object} [description] + */ + getAt: function (index) + { + return this.list[index]; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#getIndex + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {integer} [description] + */ + getIndex: function (child) + { + // Return -1 if given child isn't a child of this display list + return this.list.indexOf(child); + }, + + /** + * Given an array of objects, sort the array and return it, + * so that the objects are in index order with the lowest at the bottom. + * + * @method Phaser.Structs.List#sort + * @since 3.0.0 + * + * @param {array} children - [description] + * + * @return {array} [description] + */ + sort: function (children) + { + if (children === undefined) { children = this.list; } + + return children.sort(this.sortIndexHandler.bind(this)); + }, + + /** + * [description] + * + * @method Phaser.Structs.List#sortIndexHandler + * @since 3.0.0 + * + * @param {object} childA - [description] + * @param {object} childB - [description] + * + * @return {integer} [description] + */ + sortIndexHandler: function (childA, childB) + { + // The lower the index, the lower down the display list they are + var indexA = this.getIndex(childA); + var indexB = this.getIndex(childB); + + if (indexA < indexB) + { + return -1; + } + else if (indexA > indexB) + { + return 1; + } + + // Technically this shouldn't happen, but if the GO wasn't part of this display list then it'll + // have an index of -1, so in some cases it can + return 0; + }, + + /** + * Gets the first item from the set based on the property strictly equaling the value given. + * Returns null if not found. + * + * @method Phaser.Structs.List#getByKey + * @since 3.0.0 + * + * @param {string} property - The property to check against the value. + * @param {any} value - The value to check if the property strictly equals. + * + * @return {any} The item that was found, or null if nothing matched. + */ + getByKey: function (property, value) + { + for (var i = 0; i < this.list.length; i++) + { + if (this.list[i][property] === value) + { + return this.list[i]; + } + } + + return null; + }, + + /** + * Searches the Group for the first instance of a child with the `name` + * property matching the given argument. Should more than one child have + * the same name only the first instance is returned. + * + * @method Phaser.Structs.List#getByName + * @since 3.0.0 + * + * @param {string} name - The name to search for. + * + * @return {any} The first child with a matching name, or null if none were found. + */ + getByName: function (name) + { + return this.getByKey('name', name); + }, + + /** + * Returns a random child from the group. + * + * @method Phaser.Structs.List#getRandom + * @since 3.0.0 + * + * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child). + * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from. + * + * @return {any} A random child of this Group. + */ + getRandom: function (startIndex, length) + { + if (startIndex === undefined) { startIndex = 0; } + if (length === undefined) { length = this.list.length; } + + if (length === 0 || length > this.list.length) + { + return null; + } + + var randomIndex = startIndex + Math.floor(Math.random() * length); + + return this.list[randomIndex]; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#getFirst + * @since 3.0.0 + * + * @param {[type]} property - [description] + * @param {[type]} value - [description] + * @param {[type]} startIndex - [description] + * @param {[type]} endIndex - [description] + * + * @return {[type]} [description] + */ + getFirst: function (property, value, startIndex, endIndex) + { + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = this.list.length; } + + for (var i = startIndex; i < endIndex; i++) + { + var child = this.list[i]; + + if (child[property] === value) + { + return child; + } + } + + return null; + }, + + /** + * Returns all children in this List. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only children that have their visible property set. + * + * Optionally you can specify a start and end index. For example if this List had 100 children, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 children in the List. + * + * @method Phaser.Structs.List#getAll + * @since 3.0.0 + * + * @param {string} [property] - An optional property to test against the value argument. + * @param {any} [value] - If property is set then Child.property must strictly equal this value to be included in the results. + * @param {integer} [startIndex=0] - The first child index to start the search from. + * @param {integer} [endIndex] - The last child index to search up until. + * + * @return {array} [description] + */ + getAll: function (property, value, startIndex, endIndex) + { + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = this.list.length; } + + var output = []; + + for (var i = startIndex; i < endIndex; i++) + { + var child = this.list[i]; + + if (property) + { + if (child[property] === value) + { + output.push(child); + } + } + else + { + output.push(child); + } + } + + return output; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#count + * @since 3.0.0 + * + * @param {string} property - [description] + * @param {any} value - [description] + * + * @return {integer} [description] + */ + count: function (property, value) + { + var total = 0; + + for (var i = 0; i < this.list.length; i++) + { + var child = this.list[i]; + + if (child[property] === value) + { + total++; + } + } + + return total; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#swap + * @since 3.0.0 + * + * @param {object} child1 - [description] + * @param {object} child2 - [description] + */ + swap: function (child1, child2) + { + if (child1 === child2) + { + return; + } + + var index1 = this.getIndex(child1); + var index2 = this.getIndex(child2); + + if (index1 < 0 || index2 < 0) + { + throw new Error('List.swap: Supplied objects must be children of the same list'); + } + + this.list[index1] = child2; + this.list[index2] = child1; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#moveTo + * @since 3.0.0 + * + * @param {object} child - [description] + * @param {integer} index - [description] + * + * @return {object} [description] + */ + moveTo: function (child, index) + { + var currentIndex = this.getIndex(child); + + if (currentIndex === -1 || index < 0 || index >= this.list.length) + { + throw new Error('List.moveTo: The supplied index is out of bounds'); + } + + // Remove + this.list.splice(currentIndex, 1); + + // Add in new location + this.list.splice(index, 0, child); + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#remove + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + remove: function (child) + { + var index = this.list.indexOf(child); + + if (index !== -1) + { + this.list.splice(index, 1); + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#removeAt + * @since 3.0.0 + * + * @param {integer} index - [description] + * + * @return {object} [description] + */ + removeAt: function (index) + { + var child = this.list[index]; + + if (child) + { + this.children.splice(index, 1); + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#removeBetween + * @since 3.0.0 + * + * @param {integer} beginIndex - [description] + * @param {integer} endIndex - [description] + * + * @return {array} [description] + */ + removeBetween: function (beginIndex, endIndex) + { + if (beginIndex === undefined) { beginIndex = 0; } + if (endIndex === undefined) { endIndex = this.list.length; } + + var range = endIndex - beginIndex; + + if (range > 0 && range <= endIndex) + { + var removed = this.list.splice(beginIndex, range); + + return removed; + } + else if (range === 0 && this.list.length === 0) + { + return []; + } + else + { + throw new Error('List.removeBetween: Range Error, numeric values are outside the acceptable range'); + } + }, + + /** + * Removes all the items. + * + * @method Phaser.Structs.List#removeAll + * @since 3.0.0 + * + * @return {Phaser.Structs.List} This List object. + */ + removeAll: function () + { + var i = this.list.length; + + while (i--) + { + this.remove(this.list[i]); + } + + return this; + }, + + /** + * Brings the given child to the top of this List. + * + * @method Phaser.Structs.List#bringToTop + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + bringToTop: function (child) + { + if (this.getIndex(child) < this.list.length) + { + this.remove(child); + this.add(child); + } + + return child; + }, + + /** + * Sends the given child to the bottom of this List. + * + * @method Phaser.Structs.List#sendToBack + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + sendToBack: function (child) + { + if (this.getIndex(child) > 0) + { + this.remove(child); + this.addAt(child, 0); + } + + return child; + }, + + /** + * Moves the given child up one place in this group unless it's already at the top. + * + * @method Phaser.Structs.List#moveUp + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + moveUp: function (child) + { + var a = this.getIndex(child); + + if (a !== -1 && a < this.list.length - 1) + { + var b = this.getAt(a + 1); + + if (b) + { + this.swap(child, b); + } + } + + return child; + }, + + /** + * Moves the given child down one place in this group unless it's already at the bottom. + * + * @method Phaser.Structs.List#moveDown + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + moveDown: function (child) + { + var a = this.getIndex(child); + + if (a > 0) + { + var b = this.getAt(a - 1); + + if (b) + { + this.swap(child, b); + } + } + + return child; + }, + + /** + * Reverses the order of all children in this List. + * + * @method Phaser.Structs.List#reverse + * @since 3.0.0 + * + * @return {Phaser.Structs.List} This List object. + */ + reverse: function () + { + this.list.reverse(); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#shuffle + * @since 3.0.0 + * + * @return {Phaser.Structs.List} This List object. + */ + shuffle: function () + { + for (var i = this.list.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = this.list[i]; + this.list[i] = this.list[j]; + this.list[j] = temp; + } + + return this; + }, + + /** + * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List. + * + * @method Phaser.Structs.List#replace + * @since 3.0.0 + * + * @param {object} oldChild - The child in this List that will be replaced. + * @param {object} newChild - The child to be inserted into this List. + * + * @return {object} Returns the oldChild that was replaced within this group. + */ + replace: function (oldChild, newChild) + { + var index = this.getIndex(oldChild); + + if (index !== -1) + { + this.remove(oldChild); + + this.addAt(newChild, index); + + return oldChild; + } + }, + + /** + * [description] + * + * @method Phaser.Structs.List#exists + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {boolean} True if the item is found in the list, otherwise false. + */ + exists: function (child) + { + return (this.list.indexOf(child) > -1); + }, + + /** + * Sets the property `key` to the given value on all members of this List. + * + * @method Phaser.Structs.List#setAll + * @since 3.0.0 + * + * @param {string} key - [description] + * @param {any} value - [description] + */ + setAll: function (key, value) + { + for (var i = 0; i < this.list.length; i++) + { + if (this.list[i]) + { + this.list[i][key] = value; + } + } + }, + + /** + * Passes all children to the given callback. + * + * @method Phaser.Structs.List#each + * @since 3.0.0 + * + * @param {function} callback - The function to call. + * @param {object} [thisArg] - Value to use as `this` when executing callback. + * @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the child. + */ + each: function (callback, thisArg) + { + var args = [ null ]; + + for (var i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < this.list.length; i++) + { + args[0] = this.list[i]; + callback.apply(thisArg, args); + } + }, + + /** + * [description] + * + * @method Phaser.Structs.List#shutdown + * @since 3.0.0 + */ + shutdown: function () + { + this.removeAll(); + }, + + /** + * [description] + * + * @method Phaser.Structs.List#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAll(); + + this.list = []; + + this.parent = null; + }, + + /** + * [description] + * + * @name Phaser.Structs.List#length + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + length: { + + get: function () + { + return this.list.length; + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#first + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + first: { + + get: function () + { + this.position = 0; + + if (this.list.length > 0) + { + return this.list[0]; + } + else + { + return null; + } + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#last + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + last: { + + get: function () + { + if (this.list.length > 0) + { + this.position = this.list.length - 1; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#next + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + next: { + + get: function () + { + if (this.position < this.list.length) + { + this.position++; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#previous + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + previous: { + + get: function () + { + if (this.position > 0) + { + this.position--; + + return this.list[this.position]; + } + else + { + return null; + } + } + + } + +}); + +module.exports = List; + + +/***/ }), +/* 88 */ /***/ (function(module, exports) { /** @@ -14810,7 +15750,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14970,7 +15910,7 @@ module.exports = Mesh; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15046,7 +15986,7 @@ module.exports = LineToLine; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -15109,7 +16049,7 @@ module.exports = XHRSettings; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15119,8 +16059,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(327); -var Sprite = __webpack_require__(37); +var Components = __webpack_require__(326); +var Sprite = __webpack_require__(38); /** * @classdesc @@ -15206,11 +16146,11 @@ module.exports = ArcadeSprite; /***/ }), -/* 92 */, /* 93 */, /* 94 */, /* 95 */, -/* 96 */ +/* 96 */, +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15225,8 +16165,8 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(149), - CalculateFacesWithin: __webpack_require__(34), + CalculateFacesAt: __webpack_require__(150), + CalculateFacesWithin: __webpack_require__(35), Copy: __webpack_require__(863), CreateFromTiles: __webpack_require__(864), CullTiles: __webpack_require__(865), @@ -15235,22 +16175,22 @@ module.exports = { FindByIndex: __webpack_require__(868), FindTile: __webpack_require__(869), ForEachTile: __webpack_require__(870), - GetTileAt: __webpack_require__(97), + GetTileAt: __webpack_require__(98), GetTileAtWorldXY: __webpack_require__(871), GetTilesWithin: __webpack_require__(15), GetTilesWithinShape: __webpack_require__(872), GetTilesWithinWorldXY: __webpack_require__(873), - HasTileAt: __webpack_require__(342), + HasTileAt: __webpack_require__(341), HasTileAtWorldXY: __webpack_require__(874), IsInLayerBounds: __webpack_require__(74), - PutTileAt: __webpack_require__(150), + PutTileAt: __webpack_require__(151), PutTileAtWorldXY: __webpack_require__(875), PutTilesAt: __webpack_require__(876), Randomize: __webpack_require__(877), - RemoveTileAt: __webpack_require__(343), + RemoveTileAt: __webpack_require__(342), RemoveTileAtWorldXY: __webpack_require__(878), RenderDebug: __webpack_require__(879), - ReplaceByIndex: __webpack_require__(341), + ReplaceByIndex: __webpack_require__(340), SetCollision: __webpack_require__(880), SetCollisionBetween: __webpack_require__(881), SetCollisionByExclusion: __webpack_require__(882), @@ -15260,9 +16200,9 @@ module.exports = { SetTileLocationCallback: __webpack_require__(886), Shuffle: __webpack_require__(887), SwapByIndex: __webpack_require__(888), - TileToWorldX: __webpack_require__(98), + TileToWorldX: __webpack_require__(99), TileToWorldXY: __webpack_require__(889), - TileToWorldY: __webpack_require__(99), + TileToWorldY: __webpack_require__(100), WeightedRandomize: __webpack_require__(890), WorldToTileX: __webpack_require__(40), WorldToTileXY: __webpack_require__(891), @@ -15272,7 +16212,7 @@ module.exports = { /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15328,7 +16268,7 @@ module.exports = GetTileAt; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -15372,7 +16312,7 @@ module.exports = TileToWorldX; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports) { /** @@ -15416,7 +16356,7 @@ module.exports = TileToWorldY; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15808,7 +16748,7 @@ module.exports = Tileset; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -15871,7 +16811,7 @@ module.exports = GetNewValue; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15880,17 +16820,17 @@ module.exports = GetNewValue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(156); +var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(101); -var GetProps = __webpack_require__(356); -var GetTargets = __webpack_require__(154); +var GetNewValue = __webpack_require__(102); +var GetProps = __webpack_require__(355); +var GetTargets = __webpack_require__(155); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(155); -var Tween = __webpack_require__(157); -var TweenData = __webpack_require__(158); +var GetValueOp = __webpack_require__(156); +var Tween = __webpack_require__(158); +var TweenData = __webpack_require__(159); /** * [description] @@ -16002,7 +16942,7 @@ module.exports = TweenBuilder; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16044,7 +16984,7 @@ module.exports = Merge; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16081,7 +17021,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16123,7 +17063,7 @@ module.exports = Random; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16198,7 +17138,7 @@ module.exports = GetPoint; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16234,7 +17174,7 @@ module.exports = Random; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16292,7 +17232,7 @@ module.exports = GetPoints; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16331,7 +17271,7 @@ module.exports = Random; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16369,7 +17309,7 @@ module.exports = Random; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16423,7 +17363,7 @@ module.exports = Random; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -16460,7 +17400,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16785,7 +17725,1359 @@ module.exports = Map; /***/ }), -/* 114 */ +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var DegToRad = __webpack_require__(36); +var Rectangle = __webpack_require__(8); +var TransformMatrix = __webpack_require__(185); +var ValueToColor = __webpack_require__(116); +var Vector2 = __webpack_require__(6); + +/** + * @classdesc + * [description] + * + * @class Camera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.0.0 + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var Camera = new Class({ + + initialize: + + function Camera (x, y, width, height) + { + /** + * A reference to the Scene this camera belongs to. + * + * @name Phaser.Cameras.Scene2D.Camera#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene; + + /** + * The name of the Camera. This is left empty for your own use. + * + * @name Phaser.Cameras.Scene2D.Camera#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The x position of the Camera, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.Camera#x + * @type {number} + * @since 3.0.0 + */ + this.x = x; + + /** + * The y position of the Camera, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.Camera#y + * @type {number} + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Camera, in pixels. + * + * @name Phaser.Cameras.Scene2D.Camera#width + * @type {number} + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Camera, in pixels. + * + * @name Phaser.Cameras.Scene2D.Camera#height + * @type {number} + * @since 3.0.0 + */ + this.height = height; + + /** + * Should this camera round its pixel values to integers? + * + * @name Phaser.Cameras.Scene2D.Camera#roundPixels + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.roundPixels = false; + + /** + * Is this Camera using a bounds to restrict scrolling movement? + * Set this property along with the bounds via `Camera.setBounds`. + * + * @name Phaser.Cameras.Scene2D.Camera#useBounds + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.useBounds = false; + + /** + * The bounds the camera is restrained to during scrolling. + * + * @name Phaser.Cameras.Scene2D.Camera#_bounds + * @type {Phaser.Geom.Rectangle} + * @private + * @since 3.0.0 + */ + this._bounds = new Rectangle(); + + /** + * Does this Camera allow the Game Objects it renders to receive input events? + * + * @name Phaser.Cameras.Scene2D.Camera#inputEnabled + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.inputEnabled = true; + + /** + * The horizontal scroll position of this camera. + * Optionally restricted via the Camera bounds. + * + * @name Phaser.Cameras.Scene2D.Camera#scrollX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.scrollX = 0; + + /** + * The vertical scroll position of this camera. + * Optionally restricted via the Camera bounds. + * + * @name Phaser.Cameras.Scene2D.Camera#scrollY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.scrollY = 0; + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * Set to 1 to return to the default zoom level. + * + * @name Phaser.Cameras.Scene2D.Camera#zoom + * @type {float} + * @default 1 + * @since 3.0.0 + */ + this.zoom = 1; + + /** + * The rotation of the Camera. This influences the rendering of all Game Objects visible by this camera. + * + * @name Phaser.Cameras.Scene2D.Camera#rotation + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.rotation = 0; + + /** + * A local transform matrix used for internal calculations. + * + * @name Phaser.Cameras.Scene2D.Camera#matrix + * @type {TransformMatrix} + * @since 3.0.0 + */ + this.matrix = new TransformMatrix(1, 0, 0, 1, 0, 0); + + /** + * Does this Camera have a transparent background? + * + * @name Phaser.Cameras.Scene2D.Camera#transparent + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.transparent = true; + + /** + * TODO + * + * @name Phaser.Cameras.Scene2D.Camera#clearBeforeRender + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.clearBeforeRender = true; + + /** + * The background color of this Camera. Only used if `transparent` is `false`. + * + * @name Phaser.Cameras.Scene2D.Camera#backgroundColor + * @type {Phaser.Display.Color} + * @since 3.0.0 + */ + this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); + + /** + * Should the camera cull Game Objects before rendering? + * In some special cases it may be beneficial to disable this. + * + * @name Phaser.Cameras.Scene2D.Camera#disableCull + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.disableCull = false; + + /** + * A temporary array of culled objects. + * + * @name Phaser.Cameras.Scene2D.Camera#culledObjects + * @type {array} + * @default [] + * @since 3.0.0 + */ + this.culledObjects = []; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeDuration + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeDuration = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeIntensity + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeIntensity = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetX + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeOffsetX = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetY + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeOffsetY = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeDuration + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeDuration = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeRed + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeRed = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeGreen + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeGreen = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeBlue + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeBlue = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeAlpha + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeAlpha = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashDuration + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._flashDuration = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashRed + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._flashRed = 1; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashGreen + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._flashGreen = 1; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashBlue + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._flashBlue = 1; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashAlpha + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._flashAlpha = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_follow + * @type {?any} + * @private + * @default null + * @since 3.0.0 + */ + this._follow = null; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_id + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + this._id = 0; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#centerToBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + centerToBounds: function () + { + this.scrollX = (this._bounds.width * 0.5) - (this.width * 0.5); + this.scrollY = (this._bounds.height * 0.5) - (this.height * 0.5); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#centerToSize + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + centerToSize: function () + { + this.scrollX = this.width * 0.5; + this.scrollY = this.height * 0.5; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#cull + * @since 3.0.0 + * + * @param {array} renderableObjects - [description] + * + * @return {array} [description] + */ + cull: function (renderableObjects) + { + if (this.disableCull) + { + return renderableObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return renderableObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = renderableObjects.length; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var object = renderableObjects[index]; + + if (!object.hasOwnProperty('width')) + { + culledObjects.push(object); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || + tw > -objectW || th > -objectH || tw < cullW || th < cullH) + { + culledObjects.push(object); + } + } + + return culledObjects; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#cullHitTest + * @since 3.0.0 + * + * @param {array} interactiveObjects - [description] + * + * @return {array} [description] + */ + cullHitTest: function (interactiveObjects) + { + if (this.disableCull) + { + return interactiveObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return interactiveObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var length = interactiveObjects.length; + + determinant = 1 / determinant; + + var culledObjects = []; + + for (var index = 0; index < length; ++index) + { + var object = interactiveObjects[index].gameObject; + + if (!object.hasOwnProperty('width')) + { + culledObjects.push(interactiveObjects[index]); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || + tw > -objectW || th > -objectH || tw < cullW || th < cullH) + { + culledObjects.push(interactiveObjects[index]); + } + } + + return culledObjects; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#cullTilemap + * @since 3.0.0 + * + * @param {array} tilemap - [description] + * + * @return {array} [description] + */ + cullTilemap: function (tilemap) + { + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return tiles; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + var tiles = tilemap.tiles; + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = tiles.length; + var tileW = tilemap.tileWidth; + var tileH = tilemap.tileHeight; + var cullW = cameraW + tileW; + var cullH = cameraH + tileH; + var scrollFactorX = tilemap.scrollFactorX; + var scrollFactorY = tilemap.scrollFactorY; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var tile = tiles[index]; + var tileX = (tile.x - (scrollX * scrollFactorX)); + var tileY = (tile.y - (scrollY * scrollFactorY)); + var tx = (tileX * mva + tileY * mvc + mve); + var ty = (tileX * mvb + tileY * mvd + mvf); + var tw = ((tileX + tileW) * mva + (tileY + tileH) * mvc + mve); + var th = ((tileX + tileW) * mvb + (tileY + tileH) * mvd + mvf); + + if (tx > -tileW && ty > -tileH && tw < cullW && th < cullH) + { + culledObjects.push(tile); + } + } + + return culledObjects; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#fade + * @since 3.0.0 + * + * @param {number} duration - [description] + * @param {number} red - [description] + * @param {number} green - [description] + * @param {number} blue - [description] + * @param {number} force - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + fade: function (duration, red, green, blue, force) + { + if (red === undefined) { red = 0; } + if (green === undefined) { green = 0; } + if (blue === undefined) { blue = 0; } + + if (!force && this._fadeAlpha > 0) + { + return this; + } + + this._fadeRed = red; + this._fadeGreen = green; + this._fadeBlue = blue; + + if (duration <= 0) + { + duration = Number.MIN_VALUE; + } + + this._fadeDuration = duration; + this._fadeAlpha = Number.MIN_VALUE; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#flash + * @since 3.0.0 + * + * @param {number} duration - [description] + * @param {number} red - [description] + * @param {number} green - [description] + * @param {number} blue - [description] + * @param {number} force - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + flash: function (duration, red, green, blue, force) + { + if (!force && this._flashAlpha > 0.0) + { + return this; + } + + if (red === undefined) { red = 1.0; } + if (green === undefined) { green = 1.0; } + if (blue === undefined) { blue = 1.0; } + + this._flashRed = red; + this._flashGreen = green; + this._flashBlue = blue; + + if (duration <= 0) + { + duration = Number.MIN_VALUE; + } + + this._flashDuration = duration; + this._flashAlpha = 1.0; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#getWorldPoint + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * @param {object|Phaser.Math.Vector2} output - [description] + * + * @return {Phaser.Math.Vector2} [description] + */ + getWorldPoint: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + output.x = x; + output.y = y; + + return output; + } + + determinant = 1 / determinant; + + var ima = mvd * determinant; + var imb = -mvb * determinant; + var imc = -mvc * determinant; + var imd = mva * determinant; + var ime = (mvc * mvf - mvd * mve) * determinant; + var imf = (mvb * mve - mva * mvf) * determinant; + + var c = Math.cos(this.rotation); + var s = Math.sin(this.rotation); + + var zoom = this.zoom; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + + var 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 + ime); + output.y = (sx * imb + sy * imd + imf); + + return output; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#ignore + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} gameObjectOrArray - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + ignore: function (gameObjectOrArray) + { + if (gameObjectOrArray instanceof Array) + { + for (var index = 0; index < gameObjectOrArray.length; ++index) + { + gameObjectOrArray[index].cameraFilter |= this._id; + } + } + else + { + gameObjectOrArray.cameraFilter |= this._id; + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#preRender + * @since 3.0.0 + * + * @param {number} baseScale - [description] + * @param {number} resolution - [description] + * + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + var originX = width / 2; + var originY = height / 2; + var follow = this._follow; + + if (follow !== null) + { + originX = follow.x; + originY = follow.y; + + this.scrollX = originX - width * 0.5; + this.scrollY = originY - height * 0.5; + } + + if (this.useBounds) + { + var bounds = this._bounds; + + var bw = Math.max(0, bounds.right - width); + var bh = Math.max(0, bounds.bottom - height); + + if (this.scrollX < bounds.x) + { + this.scrollX = bounds.x; + } + else if (this.scrollX > bw) + { + this.scrollX = bw; + } + + if (this.scrollY < bounds.y) + { + this.scrollY = bounds.y; + } + else if (this.scrollY > bh) + { + this.scrollY = bh; + } + } + + if (this.roundPixels) + { + this.scrollX = Math.round(this.scrollX); + this.scrollY = Math.round(this.scrollY); + } + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + matrix.translate(this._shakeOffsetX, this._shakeOffsetY); + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#removeBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + removeBounds: function () + { + this.useBounds = false; + + this._bounds.setEmpty(); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setAngle + * @since 3.0.0 + * + * @param {number} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setAngle: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = DegToRad(value); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setBackgroundColor + * @since 3.0.0 + * + * @param {integer} color - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setBackgroundColor: function (color) + { + if (color === undefined) { color = 'rgba(0,0,0,0)'; } + + this.backgroundColor = ValueToColor(color); + + this.transparent = (this.backgroundColor.alpha === 0); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setBounds + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} width - [description] + * @param {number} height - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setBounds: function (x, y, width, height) + { + this._bounds.setTo(x, y, width, height); + + this.useBounds = true; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setName + * @since 3.0.0 + * + * @param {string} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setName: function (value) + { + if (value === undefined) { value = ''; } + + this.name = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setPosition + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setRotation + * @since 3.0.0 + * + * @param {number} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setRotation: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setRoundPixels + * @since 3.0.0 + * + * @param {boolean} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setRoundPixels: function (value) + { + this.roundPixels = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setScene + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setScene: function (scene) + { + this.scene = scene; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setScroll + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setScroll: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollX = x; + this.scrollY = y; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setSize + * @since 3.0.0 + * + * @param {number} width - [description] + * @param {number} height - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setViewport + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} width - [description] + * @param {number} height - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setViewport: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setZoom + * @since 3.0.0 + * + * @param {float} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setZoom: function (value) + { + if (value === undefined) { value = 1; } + + this.zoom = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#shake + * @since 3.0.0 + * + * @param {number} duration - [description] + * @param {number} intensity - [description] + * @param {number} force - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + shake: function (duration, intensity, force) + { + if (intensity === undefined) { intensity = 0.05; } + + if (!force && (this._shakeOffsetX !== 0 || this._shakeOffsetY !== 0)) + { + return this; + } + + this._shakeDuration = duration; + this._shakeIntensity = intensity; + this._shakeOffsetX = 0; + this._shakeOffsetY = 0; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#startFollow + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject|object} gameObjectOrPoint - [description] + * @param {boolean} roundPx - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + startFollow: function (gameObjectOrPoint, roundPx) + { + this._follow = gameObjectOrPoint; + + if (roundPx !== undefined) + { + this.roundPixels = roundPx; + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#stopFollow + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + stopFollow: function () + { + this._follow = null; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#toJSON + * @since 3.0.0 + * + * @return {object} [description] + */ + toJSON: function () + { + var output = { + name: this.name, + x: this.x, + y: this.y, + width: this.width, + height: this.height, + zoom: this.zoom, + rotation: this.rotation, + roundPixels: this.roundPixels, + scrollX: this.scrollX, + scrollY: this.scrollY, + backgroundColor: this.backgroundColor.rgba + }; + + if (this.useBounds) + { + output['bounds'] = { + x: this._bounds.x, + y: this._bounds.y, + width: this._bounds.width, + height: this._bounds.height + }; + } + + return output; + }, + + /** + * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to + * remove the fade. + * + * @method Phaser.Cameras.Scene2D.Camera#resetFX + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + resetFX: function () + { + this._flashAlpha = 0; + this._fadeAlpha = 0; + this._shakeOffsetX = 0.0; + this._shakeOffsetY = 0.0; + this._shakeDuration = 0; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#update + * @since 3.0.0 + * + * @param {[type]} timestep - [description] + * @param {[type]} delta - [description] + */ + update: function (timestep, delta) + { + if (this._flashAlpha > 0.0) + { + this._flashAlpha -= delta / this._flashDuration; + + if (this._flashAlpha < 0.0) + { + this._flashAlpha = 0.0; + } + } + + if (this._fadeAlpha > 0.0 && this._fadeAlpha < 1.0) + { + this._fadeAlpha += delta / this._fadeDuration; + + if (this._fadeAlpha >= 1.0) + { + this._fadeAlpha = 1.0; + } + } + + if (this._shakeDuration > 0.0) + { + var intensity = this._shakeIntensity; + + this._shakeDuration -= delta; + + if (this._shakeDuration <= 0.0) + { + this._shakeOffsetX = 0.0; + this._shakeOffsetY = 0.0; + } + else + { + this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; + this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; + } + } + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#destroy + * @since 3.0.0 + */ + destroy: function () + { + this._bounds = undefined; + this.matrix = undefined; + this.culledObjects = []; + this.scene = undefined; + } + +}); + +module.exports = Camera; + + +/***/ }), +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16841,7 +19133,7 @@ module.exports = ValueToColor; /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -16871,7 +19163,7 @@ module.exports = GetColor; /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16881,7 +19173,7 @@ module.exports = GetColor; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(117); +var Matrix4 = __webpack_require__(119); var RandomXYZ = __webpack_require__(204); var RandomXYZW = __webpack_require__(205); var RotateVec3 = __webpack_require__(206); @@ -16889,7 +19181,7 @@ var Set = __webpack_require__(61); var Sprite3D = __webpack_require__(81); var Vector2 = __webpack_require__(6); var Vector3 = __webpack_require__(51); -var Vector4 = __webpack_require__(118); +var Vector4 = __webpack_require__(120); // Local cache vars var tmpVec3 = new Vector3(); @@ -17939,7 +20231,7 @@ module.exports = Camera; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19380,7 +21672,7 @@ module.exports = Matrix4; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19908,7 +22200,7 @@ module.exports = Vector4; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -20040,7 +22332,7 @@ module.exports = Smoothing(); /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20123,7 +22415,7 @@ module.exports = FromPoints; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -20160,7 +22452,7 @@ module.exports = CatmullRom; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -20222,7 +22514,7 @@ module.exports = AddToDOM; /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20423,7 +22715,7 @@ module.exports = init(); /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports) { /** @@ -20453,7 +22745,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 125 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -20492,7 +22784,7 @@ module.exports = { /***/ }), -/* 126 */ +/* 128 */ /***/ (function(module, exports) { /** @@ -21067,7 +23359,7 @@ module.exports = { /***/ }), -/* 127 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21078,8 +23370,8 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(84); -var GetPhysicsPlugins = __webpack_require__(526); -var GetScenePlugins = __webpack_require__(527); +var GetPhysicsPlugins = __webpack_require__(525); +var GetScenePlugins = __webpack_require__(526); var Plugins = __webpack_require__(231); var Settings = __webpack_require__(252); @@ -21619,7 +23911,7 @@ module.exports = Systems; /***/ }), -/* 128 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22204,922 +24496,7 @@ module.exports = Frame; /***/ }), -/* 129 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * [description] - * - * @class List - * @memberOf Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @param {any} parent - [description] - */ -var List = new Class({ - - initialize: - - function List (parent) - { - /** - * The parent of this list. - * - * @name Phaser.Structs.List#parent - * @type {any} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * The objects that belong to this collection. - * - * @name Phaser.Structs.List#list - * @type {array} - * @default [] - * @since 3.0.0 - */ - this.list = []; - - /** - * [description] - * - * @name Phaser.Structs.List#position - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.position = 0; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#add - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - add: function (child) - { - // Is child already in this display list? - - if (this.getIndex(child) === -1) - { - this.list.push(child); - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#addAt - * @since 3.0.0 - * - * @param {object} child - [description] - * @param {integer} index - [description] - * - * @return {object} [description] - */ - addAt: function (child, index) - { - if (index === undefined) { index = 0; } - - if (this.list.length === 0) - { - return this.add(child); - } - - if (index >= 0 && index <= this.list.length) - { - if (this.getIndex(child) === -1) - { - this.list.splice(index, 0, child); - } - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#addMultiple - * @since 3.0.0 - * - * @param {array} children - [description] - * - * @return {array} [description] - */ - addMultiple: function (children) - { - if (Array.isArray(children)) - { - for (var i = 0; i < children.length; i++) - { - this.add(children[i]); - } - } - - return children; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#getAt - * @since 3.0.0 - * - * @param {integer} index - [description] - * - * @return {object} [description] - */ - getAt: function (index) - { - return this.list[index]; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#getIndex - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {integer} [description] - */ - getIndex: function (child) - { - // Return -1 if given child isn't a child of this display list - return this.list.indexOf(child); - }, - - /** - * Given an array of objects, sort the array and return it, - * so that the objects are in index order with the lowest at the bottom. - * - * @method Phaser.Structs.List#sort - * @since 3.0.0 - * - * @param {array} children - [description] - * - * @return {array} [description] - */ - sort: function (children) - { - if (children === undefined) { children = this.list; } - - return children.sort(this.sortIndexHandler.bind(this)); - }, - - /** - * [description] - * - * @method Phaser.Structs.List#sortIndexHandler - * @since 3.0.0 - * - * @param {object} childA - [description] - * @param {object} childB - [description] - * - * @return {integer} [description] - */ - sortIndexHandler: function (childA, childB) - { - // The lower the index, the lower down the display list they are - var indexA = this.getIndex(childA); - var indexB = this.getIndex(childB); - - if (indexA < indexB) - { - return -1; - } - else if (indexA > indexB) - { - return 1; - } - - // Technically this shouldn't happen, but if the GO wasn't part of this display list then it'll - // have an index of -1, so in some cases it can - return 0; - }, - - /** - * Gets the first item from the set based on the property strictly equaling the value given. - * Returns null if not found. - * - * @method Phaser.Structs.List#getByKey - * @since 3.0.0 - * - * @param {string} property - The property to check against the value. - * @param {any} value - The value to check if the property strictly equals. - * - * @return {any} The item that was found, or null if nothing matched. - */ - getByKey: function (property, value) - { - for (var i = 0; i < this.list.length; i++) - { - if (this.list[i][property] === value) - { - return this.list[i]; - } - } - - return null; - }, - - /** - * Searches the Group for the first instance of a child with the `name` - * property matching the given argument. Should more than one child have - * the same name only the first instance is returned. - * - * @method Phaser.Structs.List#getByName - * @since 3.0.0 - * - * @param {string} name - The name to search for. - * - * @return {any} The first child with a matching name, or null if none were found. - */ - getByName: function (name) - { - return this.getByKey('name', name); - }, - - /** - * Returns a random child from the group. - * - * @method Phaser.Structs.List#getRandom - * @since 3.0.0 - * - * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child). - * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from. - * - * @return {any} A random child of this Group. - */ - getRandom: function (startIndex, length) - { - if (startIndex === undefined) { startIndex = 0; } - if (length === undefined) { length = this.list.length; } - - if (length === 0 || length > this.list.length) - { - return null; - } - - var randomIndex = startIndex + Math.floor(Math.random() * length); - - return this.list[randomIndex]; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#getFirst - * @since 3.0.0 - * - * @param {[type]} property - [description] - * @param {[type]} value - [description] - * @param {[type]} startIndex - [description] - * @param {[type]} endIndex - [description] - * - * @return {[type]} [description] - */ - getFirst: function (property, value, startIndex, endIndex) - { - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = this.list.length; } - - for (var i = startIndex; i < endIndex; i++) - { - var child = this.list[i]; - - if (child[property] === value) - { - return child; - } - } - - return null; - }, - - /** - * Returns all children in this List. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only children that have their visible property set. - * - * Optionally you can specify a start and end index. For example if this List had 100 children, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 children in the List. - * - * @method Phaser.Structs.List#getAll - * @since 3.0.0 - * - * @param {string} [property] - An optional property to test against the value argument. - * @param {any} [value] - If property is set then Child.property must strictly equal this value to be included in the results. - * @param {integer} [startIndex=0] - The first child index to start the search from. - * @param {integer} [endIndex] - The last child index to search up until. - * - * @return {array} [description] - */ - getAll: function (property, value, startIndex, endIndex) - { - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = this.list.length; } - - var output = []; - - for (var i = startIndex; i < endIndex; i++) - { - var child = this.list[i]; - - if (property) - { - if (child[property] === value) - { - output.push(child); - } - } - else - { - output.push(child); - } - } - - return output; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#count - * @since 3.0.0 - * - * @param {string} property - [description] - * @param {any} value - [description] - * - * @return {integer} [description] - */ - count: function (property, value) - { - var total = 0; - - for (var i = 0; i < this.list.length; i++) - { - var child = this.list[i]; - - if (child[property] === value) - { - total++; - } - } - - return total; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#swap - * @since 3.0.0 - * - * @param {object} child1 - [description] - * @param {object} child2 - [description] - */ - swap: function (child1, child2) - { - if (child1 === child2) - { - return; - } - - var index1 = this.getIndex(child1); - var index2 = this.getIndex(child2); - - if (index1 < 0 || index2 < 0) - { - throw new Error('List.swap: Supplied objects must be children of the same list'); - } - - this.list[index1] = child2; - this.list[index2] = child1; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#moveTo - * @since 3.0.0 - * - * @param {object} child - [description] - * @param {integer} index - [description] - * - * @return {object} [description] - */ - moveTo: function (child, index) - { - var currentIndex = this.getIndex(child); - - if (currentIndex === -1 || index < 0 || index >= this.list.length) - { - throw new Error('List.moveTo: The supplied index is out of bounds'); - } - - // Remove - this.list.splice(currentIndex, 1); - - // Add in new location - this.list.splice(index, 0, child); - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#remove - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - remove: function (child) - { - var index = this.list.indexOf(child); - - if (index !== -1) - { - this.list.splice(index, 1); - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#removeAt - * @since 3.0.0 - * - * @param {integer} index - [description] - * - * @return {object} [description] - */ - removeAt: function (index) - { - var child = this.list[index]; - - if (child) - { - this.children.splice(index, 1); - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#removeBetween - * @since 3.0.0 - * - * @param {integer} beginIndex - [description] - * @param {integer} endIndex - [description] - * - * @return {array} [description] - */ - removeBetween: function (beginIndex, endIndex) - { - if (beginIndex === undefined) { beginIndex = 0; } - if (endIndex === undefined) { endIndex = this.list.length; } - - var range = endIndex - beginIndex; - - if (range > 0 && range <= endIndex) - { - var removed = this.list.splice(beginIndex, range); - - return removed; - } - else if (range === 0 && this.list.length === 0) - { - return []; - } - else - { - throw new Error('List.removeBetween: Range Error, numeric values are outside the acceptable range'); - } - }, - - /** - * Removes all the items. - * - * @method Phaser.Structs.List#removeAll - * @since 3.0.0 - * - * @return {Phaser.Structs.List} This List object. - */ - removeAll: function () - { - var i = this.list.length; - - while (i--) - { - this.remove(this.list[i]); - } - - return this; - }, - - /** - * Brings the given child to the top of this List. - * - * @method Phaser.Structs.List#bringToTop - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - bringToTop: function (child) - { - if (this.getIndex(child) < this.list.length) - { - this.remove(child); - this.add(child); - } - - return child; - }, - - /** - * Sends the given child to the bottom of this List. - * - * @method Phaser.Structs.List#sendToBack - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - sendToBack: function (child) - { - if (this.getIndex(child) > 0) - { - this.remove(child); - this.addAt(child, 0); - } - - return child; - }, - - /** - * Moves the given child up one place in this group unless it's already at the top. - * - * @method Phaser.Structs.List#moveUp - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - moveUp: function (child) - { - var a = this.getIndex(child); - - if (a !== -1 && a < this.list.length - 1) - { - var b = this.getAt(a + 1); - - if (b) - { - this.swap(child, b); - } - } - - return child; - }, - - /** - * Moves the given child down one place in this group unless it's already at the bottom. - * - * @method Phaser.Structs.List#moveDown - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - moveDown: function (child) - { - var a = this.getIndex(child); - - if (a > 0) - { - var b = this.getAt(a - 1); - - if (b) - { - this.swap(child, b); - } - } - - return child; - }, - - /** - * Reverses the order of all children in this List. - * - * @method Phaser.Structs.List#reverse - * @since 3.0.0 - * - * @return {Phaser.Structs.List} This List object. - */ - reverse: function () - { - this.list.reverse(); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#shuffle - * @since 3.0.0 - * - * @return {Phaser.Structs.List} This List object. - */ - shuffle: function () - { - for (var i = this.list.length - 1; i > 0; i--) - { - var j = Math.floor(Math.random() * (i + 1)); - var temp = this.list[i]; - this.list[i] = this.list[j]; - this.list[j] = temp; - } - - return this; - }, - - /** - * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List. - * - * @method Phaser.Structs.List#replace - * @since 3.0.0 - * - * @param {object} oldChild - The child in this List that will be replaced. - * @param {object} newChild - The child to be inserted into this List. - * - * @return {object} Returns the oldChild that was replaced within this group. - */ - replace: function (oldChild, newChild) - { - var index = this.getIndex(oldChild); - - if (index !== -1) - { - this.remove(oldChild); - - this.addAt(newChild, index); - - return oldChild; - } - }, - - /** - * [description] - * - * @method Phaser.Structs.List#exists - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {boolean} True if the item is found in the list, otherwise false. - */ - exists: function (child) - { - return (this.list.indexOf(child) > -1); - }, - - /** - * Sets the property `key` to the given value on all members of this List. - * - * @method Phaser.Structs.List#setAll - * @since 3.0.0 - * - * @param {string} key - [description] - * @param {any} value - [description] - */ - setAll: function (key, value) - { - for (var i = 0; i < this.list.length; i++) - { - if (this.list[i]) - { - this.list[i][key] = value; - } - } - }, - - /** - * Passes all children to the given callback. - * - * @method Phaser.Structs.List#each - * @since 3.0.0 - * - * @param {function} callback - The function to call. - * @param {object} [thisArg] - Value to use as `this` when executing callback. - * @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the child. - */ - each: function (callback, thisArg) - { - var args = [ null ]; - - for (var i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - for (i = 0; i < this.list.length; i++) - { - args[0] = this.list[i]; - callback.apply(thisArg, args); - } - }, - - /** - * [description] - * - * @method Phaser.Structs.List#shutdown - * @since 3.0.0 - */ - shutdown: function () - { - this.removeAll(); - }, - - /** - * [description] - * - * @method Phaser.Structs.List#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.removeAll(); - - this.list = []; - - this.parent = null; - }, - - /** - * [description] - * - * @name Phaser.Structs.List#length - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - length: { - - get: function () - { - return this.list.length; - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#first - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - first: { - - get: function () - { - this.position = 0; - - if (this.list.length > 0) - { - return this.list[0]; - } - else - { - return null; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#last - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - last: { - - get: function () - { - if (this.list.length > 0) - { - this.position = this.list.length - 1; - - return this.list[this.position]; - } - else - { - return null; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#next - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - next: { - - get: function () - { - if (this.position < this.list.length) - { - this.position++; - - return this.list[this.position]; - } - else - { - return null; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#previous - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - previous: { - - get: function () - { - if (this.position > 0) - { - this.position--; - - return this.list[this.position]; - } - else - { - return null; - } - } - - } - -}); - -module.exports = List; - - -/***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23131,7 +24508,7 @@ module.exports = List; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(266); +var GetBitmapTextSize = __webpack_require__(265); var ParseFromAtlas = __webpack_require__(542); var ParseRetroFont = __webpack_require__(543); var Render = __webpack_require__(544); @@ -23388,7 +24765,7 @@ module.exports = BitmapText; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23401,9 +24778,9 @@ var BlitterRender = __webpack_require__(547); var Bob = __webpack_require__(550); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DisplayList = __webpack_require__(264); -var Frame = __webpack_require__(128); +var Frame = __webpack_require__(130); var GameObject = __webpack_require__(2); +var List = __webpack_require__(87); /** * @classdesc @@ -23476,10 +24853,10 @@ var Blitter = new Class({ * [description] * * @name Phaser.GameObjects.Blitter#children - * @type {Phaser.GameObjects.DisplayList} + * @type {Phaser.Structs.List} * @since 3.0.0 */ - this.children = new DisplayList(); + this.children = new List(); /** * [description] @@ -23615,7 +24992,7 @@ var Blitter = new Class({ * @method Phaser.GameObjects.Blitter#getRenderList * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.Blitter.Bob[]} An array of Bob objects that will be rendered this frame. */ getRenderList: function () { @@ -23646,7 +25023,7 @@ module.exports = Blitter; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23658,7 +25035,7 @@ module.exports = Blitter; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(266); +var GetBitmapTextSize = __webpack_require__(265); var Render = __webpack_require__(551); /** @@ -24027,7 +25404,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24036,10 +25413,11 @@ module.exports = DynamicBitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var Camera = __webpack_require__(115); var Class = __webpack_require__(0); -var Commands = __webpack_require__(125); +var Commands = __webpack_require__(127); var Components = __webpack_require__(12); -var Ellipse = __webpack_require__(268); +var Ellipse = __webpack_require__(267); var GameObject = __webpack_require__(2); var GetValue = __webpack_require__(4); var MATH_CONST = __webpack_require__(16); @@ -25146,11 +26524,20 @@ var Graphics = new Class({ }); +/** + * A Camera used specifically by the Graphics system for rendering to textures. + * + * @name Phaser.GameObjects.Graphics.TargetCamera + * @type {Phaser.Cameras.Scene2D.Camera} + * @since 3.1.0 + */ +Graphics.TargetCamera = new Camera(0, 0, 0, 0); + module.exports = Graphics; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25161,9 +26548,9 @@ module.exports = Graphics; var Class = __webpack_require__(0); var Contains = __webpack_require__(68); -var GetPoint = __webpack_require__(269); -var GetPoints = __webpack_require__(270); -var Random = __webpack_require__(109); +var GetPoint = __webpack_require__(268); +var GetPoints = __webpack_require__(269); +var Random = __webpack_require__(110); /** * @classdesc @@ -25514,7 +26901,7 @@ module.exports = Ellipse; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25554,7 +26941,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25567,7 +26954,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GravityWell = __webpack_require__(568); -var List = __webpack_require__(129); +var List = __webpack_require__(87); var ParticleEmitter = __webpack_require__(569); var Render = __webpack_require__(608); @@ -25977,7 +27364,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -26012,7 +27399,7 @@ module.exports = GetRandomElement; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26021,7 +27408,7 @@ module.exports = GetRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(122); +var AddToDOM = __webpack_require__(124); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); @@ -27113,7 +28500,7 @@ module.exports = Text; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27126,7 +28513,7 @@ var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetPowerOfTwo = __webpack_require__(289); +var GetPowerOfTwo = __webpack_require__(288); var TileSpriteRender = __webpack_require__(617); /** @@ -27364,7 +28751,7 @@ module.exports = TileSprite; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27374,7 +28761,7 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(88); +var Mesh = __webpack_require__(89); /** * @classdesc @@ -27963,7 +29350,7 @@ module.exports = Quad; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -28049,7 +29436,7 @@ module.exports = ContainsArray; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -28095,7 +29482,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -28144,7 +29531,7 @@ module.exports = Contains; /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -28172,7 +29559,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -28224,7 +29611,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -28265,7 +29652,7 @@ module.exports = GetURL; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28275,7 +29662,7 @@ module.exports = GetURL; */ var Extend = __webpack_require__(23); -var XHRSettings = __webpack_require__(90); +var XHRSettings = __webpack_require__(91); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -28293,7 +29680,7 @@ var XHRSettings = __webpack_require__(90); */ var MergeXHRSettings = function (global, local) { - var output = (global === undefined) ? XHRSettings() : Extend(global); + var output = (global === undefined) ? XHRSettings() : Extend({}, global); if (local) { @@ -28313,8 +29700,8 @@ module.exports = MergeXHRSettings; /***/ }), -/* 148 */, -/* 149 */ +/* 149 */, +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28323,7 +29710,7 @@ module.exports = MergeXHRSettings; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(97); +var GetTileAt = __webpack_require__(98); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -28389,7 +29776,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28400,7 +29787,7 @@ module.exports = CalculateFacesAt; var Tile = __webpack_require__(45); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(149); +var CalculateFacesAt = __webpack_require__(150); var SetTileCollision = __webpack_require__(44); /** @@ -28468,7 +29855,7 @@ module.exports = PutTileAt; /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -28506,7 +29893,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28598,7 +29985,7 @@ module.exports = Parse2DArray; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28609,8 +29996,8 @@ module.exports = Parse2DArray; var Formats = __webpack_require__(19); var MapData = __webpack_require__(76); -var Parse = __webpack_require__(344); -var Tilemap = __webpack_require__(352); +var Parse = __webpack_require__(343); +var Tilemap = __webpack_require__(351); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -28684,7 +30071,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28731,7 +30118,7 @@ module.exports = GetTargets; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -28904,7 +30291,7 @@ module.exports = GetValueOp; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports) { /** @@ -28946,7 +30333,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28958,7 +30345,7 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); -var TWEEN_CONST = __webpack_require__(87); +var TWEEN_CONST = __webpack_require__(88); /** * @classdesc @@ -29547,8 +30934,6 @@ var Tween = new Class({ this.state = TWEEN_CONST.PAUSED; - this.emit('pause', this); - return this; }, @@ -29569,7 +30954,7 @@ var Tween = new Class({ else if (this.state === TWEEN_CONST.PENDING_REMOVE || this.state === TWEEN_CONST.REMOVED) { this.init(); - this.parent.manager.makeActive(this); + this.parent.makeActive(this); resetFromTimeline = true; } @@ -29678,8 +31063,6 @@ var Tween = new Class({ this.state = this._pausedState; } - this.emit('resume', this); - return this; }, @@ -30266,7 +31649,7 @@ module.exports = Tween; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -30380,7 +31763,7 @@ module.exports = TweenData; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30410,7 +31793,7 @@ module.exports = Wrap; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30440,9 +31823,9 @@ module.exports = WrapDegrees; /***/ }), -/* 161 */, /* 162 */, -/* 163 */ +/* 163 */, +/* 164 */ /***/ (function(module, exports) { var g; @@ -30469,7 +31852,7 @@ module.exports = g; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -30525,7 +31908,7 @@ module.exports = IsPlainObject; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30540,57 +31923,57 @@ module.exports = IsPlainObject; module.exports = { - Angle: __webpack_require__(374), - Call: __webpack_require__(375), - GetFirst: __webpack_require__(376), - GridAlign: __webpack_require__(377), - IncAlpha: __webpack_require__(394), - IncX: __webpack_require__(395), - IncXY: __webpack_require__(396), - IncY: __webpack_require__(397), - PlaceOnCircle: __webpack_require__(398), - PlaceOnEllipse: __webpack_require__(399), - PlaceOnLine: __webpack_require__(400), - PlaceOnRectangle: __webpack_require__(401), - PlaceOnTriangle: __webpack_require__(402), - PlayAnimation: __webpack_require__(403), - RandomCircle: __webpack_require__(404), - RandomEllipse: __webpack_require__(405), - RandomLine: __webpack_require__(406), - RandomRectangle: __webpack_require__(407), - RandomTriangle: __webpack_require__(408), - Rotate: __webpack_require__(409), - RotateAround: __webpack_require__(410), - RotateAroundDistance: __webpack_require__(411), - ScaleX: __webpack_require__(412), - ScaleXY: __webpack_require__(413), - ScaleY: __webpack_require__(414), - SetAlpha: __webpack_require__(415), - SetBlendMode: __webpack_require__(416), - SetDepth: __webpack_require__(417), - SetHitArea: __webpack_require__(418), - SetOrigin: __webpack_require__(419), - SetRotation: __webpack_require__(420), - SetScale: __webpack_require__(421), - SetScaleX: __webpack_require__(422), - SetScaleY: __webpack_require__(423), - SetTint: __webpack_require__(424), - SetVisible: __webpack_require__(425), - SetX: __webpack_require__(426), - SetXY: __webpack_require__(427), - SetY: __webpack_require__(428), - ShiftPosition: __webpack_require__(429), - Shuffle: __webpack_require__(430), - SmootherStep: __webpack_require__(431), - SmoothStep: __webpack_require__(432), - Spread: __webpack_require__(433), - ToggleVisible: __webpack_require__(434) + Angle: __webpack_require__(373), + Call: __webpack_require__(374), + GetFirst: __webpack_require__(375), + GridAlign: __webpack_require__(376), + IncAlpha: __webpack_require__(393), + IncX: __webpack_require__(394), + IncXY: __webpack_require__(395), + IncY: __webpack_require__(396), + PlaceOnCircle: __webpack_require__(397), + PlaceOnEllipse: __webpack_require__(398), + PlaceOnLine: __webpack_require__(399), + PlaceOnRectangle: __webpack_require__(400), + PlaceOnTriangle: __webpack_require__(401), + PlayAnimation: __webpack_require__(402), + RandomCircle: __webpack_require__(403), + RandomEllipse: __webpack_require__(404), + RandomLine: __webpack_require__(405), + RandomRectangle: __webpack_require__(406), + RandomTriangle: __webpack_require__(407), + Rotate: __webpack_require__(408), + RotateAround: __webpack_require__(409), + RotateAroundDistance: __webpack_require__(410), + ScaleX: __webpack_require__(411), + ScaleXY: __webpack_require__(412), + ScaleY: __webpack_require__(413), + SetAlpha: __webpack_require__(414), + SetBlendMode: __webpack_require__(415), + SetDepth: __webpack_require__(416), + SetHitArea: __webpack_require__(417), + SetOrigin: __webpack_require__(418), + SetRotation: __webpack_require__(419), + SetScale: __webpack_require__(420), + SetScaleX: __webpack_require__(421), + SetScaleY: __webpack_require__(422), + SetTint: __webpack_require__(423), + SetVisible: __webpack_require__(424), + SetX: __webpack_require__(425), + SetXY: __webpack_require__(426), + SetY: __webpack_require__(427), + ShiftPosition: __webpack_require__(428), + Shuffle: __webpack_require__(429), + SmootherStep: __webpack_require__(430), + SmoothStep: __webpack_require__(431), + Spread: __webpack_require__(432), + ToggleVisible: __webpack_require__(433) }; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30599,19 +31982,19 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ALIGN_CONST = __webpack_require__(167); +var ALIGN_CONST = __webpack_require__(168); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(168); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(169); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(170); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(171); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(173); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(174); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(175); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(176); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(177); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(169); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(170); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(171); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(172); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(174); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(175); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(176); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(177); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(178); /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -30637,7 +32020,7 @@ module.exports = QuickSet; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -30771,7 +32154,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30813,7 +32196,7 @@ module.exports = BottomCenter; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30855,7 +32238,7 @@ module.exports = BottomLeft; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30897,7 +32280,7 @@ module.exports = BottomRight; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30906,7 +32289,7 @@ module.exports = BottomRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(172); +var CenterOn = __webpack_require__(173); var GetCenterX = __webpack_require__(47); var GetCenterY = __webpack_require__(50); @@ -30937,7 +32320,7 @@ module.exports = Center; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30972,7 +32355,7 @@ module.exports = CenterOn; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31014,7 +32397,7 @@ module.exports = LeftCenter; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31056,7 +32439,7 @@ module.exports = RightCenter; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31098,7 +32481,7 @@ module.exports = TopCenter; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31140,7 +32523,7 @@ module.exports = TopLeft; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31182,7 +32565,7 @@ module.exports = TopRight; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31191,7 +32574,7 @@ module.exports = TopRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(104); +var CircumferencePoint = __webpack_require__(105); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -31223,7 +32606,7 @@ module.exports = GetPoint; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31232,8 +32615,8 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(180); -var CircumferencePoint = __webpack_require__(104); +var Circumference = __webpack_require__(181); +var CircumferencePoint = __webpack_require__(105); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -31275,7 +32658,7 @@ module.exports = GetPoints; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -31303,7 +32686,7 @@ module.exports = Circumference; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31312,7 +32695,7 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoint = __webpack_require__(106); +var GetPoint = __webpack_require__(107); var Perimeter = __webpack_require__(78); // Return an array of points from the perimeter of the rectangle @@ -31355,7 +32738,7 @@ module.exports = GetPoints; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -31395,7 +32778,7 @@ module.exports = RotateAround; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -31521,7 +32904,7 @@ module.exports = Pipeline; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31914,7 +33297,7 @@ module.exports = TransformMatrix; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32031,7 +33414,7 @@ module.exports = MarchingAnts; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -32071,7 +33454,7 @@ module.exports = RotateLeft; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -32111,7 +33494,7 @@ module.exports = RotateRight; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -32184,7 +33567,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -32216,7 +33599,7 @@ module.exports = SmootherStep; /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -32248,7 +33631,7 @@ module.exports = SmoothStep; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32258,7 +33641,7 @@ module.exports = SmoothStep; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(192); +var Frame = __webpack_require__(193); var GetValue = __webpack_require__(4); /** @@ -33150,7 +34533,7 @@ module.exports = Animation; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33336,7 +34719,7 @@ module.exports = AnimationFrame; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33345,12 +34728,12 @@ module.exports = AnimationFrame; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(191); +var Animation = __webpack_require__(192); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(113); +var CustomMap = __webpack_require__(114); var EventEmitter = __webpack_require__(13); var GetValue = __webpack_require__(4); -var Pad = __webpack_require__(194); +var Pad = __webpack_require__(195); /** * @classdesc @@ -33933,7 +35316,7 @@ module.exports = AnimationManager; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -34009,7 +35392,7 @@ module.exports = Pad; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34019,7 +35402,7 @@ module.exports = Pad; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(113); +var CustomMap = __webpack_require__(114); var EventEmitter = __webpack_require__(13); /** @@ -34186,7 +35569,7 @@ module.exports = BaseCache; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34195,7 +35578,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(195); +var BaseCache = __webpack_require__(196); var Class = __webpack_require__(0); /** @@ -34409,1358 +35792,6 @@ var CacheManager = new Class({ module.exports = CacheManager; -/***/ }), -/* 197 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); -var Rectangle = __webpack_require__(8); -var TransformMatrix = __webpack_require__(184); -var ValueToColor = __webpack_require__(114); -var Vector2 = __webpack_require__(6); - -/** - * @classdesc - * [description] - * - * @class Camera - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.0.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var Camera = new Class({ - - initialize: - - function Camera (x, y, width, height) - { - /** - * A reference to the Scene this camera belongs to. - * - * @name Phaser.Cameras.Scene2D.Camera#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene; - - /** - * The name of the Camera. This is left empty for your own use. - * - * @name Phaser.Cameras.Scene2D.Camera#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The x position of the Camera, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.Camera#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y position of the Camera, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.Camera#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The width of the Camera, in pixels. - * - * @name Phaser.Cameras.Scene2D.Camera#width - * @type {number} - * @since 3.0.0 - */ - this.width = width; - - /** - * The height of the Camera, in pixels. - * - * @name Phaser.Cameras.Scene2D.Camera#height - * @type {number} - * @since 3.0.0 - */ - this.height = height; - - /** - * Should this camera round its pixel values to integers? - * - * @name Phaser.Cameras.Scene2D.Camera#roundPixels - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.roundPixels = false; - - /** - * Is this Camera using a bounds to restrict scrolling movement? - * Set this property along with the bounds via `Camera.setBounds`. - * - * @name Phaser.Cameras.Scene2D.Camera#useBounds - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.useBounds = false; - - /** - * The bounds the camera is restrained to during scrolling. - * - * @name Phaser.Cameras.Scene2D.Camera#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); - - /** - * Does this Camera allow the Game Objects it renders to receive input events? - * - * @name Phaser.Cameras.Scene2D.Camera#inputEnabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.inputEnabled = true; - - /** - * The horizontal scroll position of this camera. - * Optionally restricted via the Camera bounds. - * - * @name Phaser.Cameras.Scene2D.Camera#scrollX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.scrollX = 0; - - /** - * The vertical scroll position of this camera. - * Optionally restricted via the Camera bounds. - * - * @name Phaser.Cameras.Scene2D.Camera#scrollY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.scrollY = 0; - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * Set to 1 to return to the default zoom level. - * - * @name Phaser.Cameras.Scene2D.Camera#zoom - * @type {float} - * @default 1 - * @since 3.0.0 - */ - this.zoom = 1; - - /** - * The rotation of the Camera. This influences the rendering of all Game Objects visible by this camera. - * - * @name Phaser.Cameras.Scene2D.Camera#rotation - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.rotation = 0; - - /** - * A local transform matrix used for internal calculations. - * - * @name Phaser.Cameras.Scene2D.Camera#matrix - * @type {TransformMatrix} - * @since 3.0.0 - */ - this.matrix = new TransformMatrix(1, 0, 0, 1, 0, 0); - - /** - * Does this Camera have a transparent background? - * - * @name Phaser.Cameras.Scene2D.Camera#transparent - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.transparent = true; - - /** - * TODO - * - * @name Phaser.Cameras.Scene2D.Camera#clearBeforeRender - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.clearBeforeRender = true; - - /** - * The background color of this Camera. Only used if `transparent` is `false`. - * - * @name Phaser.Cameras.Scene2D.Camera#backgroundColor - * @type {Phaser.Display.Color} - * @since 3.0.0 - */ - this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); - - /** - * Should the camera cull Game Objects before rendering? - * In some special cases it may be beneficial to disable this. - * - * @name Phaser.Cameras.Scene2D.Camera#disableCull - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.disableCull = false; - - /** - * A temporary array of culled objects. - * - * @name Phaser.Cameras.Scene2D.Camera#culledObjects - * @type {array} - * @default [] - * @since 3.0.0 - */ - this.culledObjects = []; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeDuration - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeDuration = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeIntensity - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeIntensity = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetX - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeOffsetX = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetY - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeOffsetY = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeDuration - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeDuration = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeRed - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeRed = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeGreen - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeGreen = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeBlue - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeBlue = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeAlpha - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeAlpha = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashDuration - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._flashDuration = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashRed - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._flashRed = 1; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashGreen - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._flashGreen = 1; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashBlue - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._flashBlue = 1; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashAlpha - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._flashAlpha = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_follow - * @type {?any} - * @private - * @default null - * @since 3.0.0 - */ - this._follow = null; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_id - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - this._id = 0; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#centerToBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - centerToBounds: function () - { - this.scrollX = (this._bounds.width * 0.5) - (this.width * 0.5); - this.scrollY = (this._bounds.height * 0.5) - (this.height * 0.5); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#centerToSize - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - centerToSize: function () - { - this.scrollX = this.width * 0.5; - this.scrollY = this.height * 0.5; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#cull - * @since 3.0.0 - * - * @param {array} renderableObjects - [description] - * - * @return {array} [description] - */ - cull: function (renderableObjects) - { - if (this.disableCull) - { - return renderableObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return renderableObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = renderableObjects.length; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var object = renderableObjects[index]; - - if (!object.hasOwnProperty('width')) - { - culledObjects.push(object); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || - tw > -objectW || th > -objectH || tw < cullW || th < cullH) - { - culledObjects.push(object); - } - } - - return culledObjects; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#cullHitTest - * @since 3.0.0 - * - * @param {array} interactiveObjects - [description] - * - * @return {array} [description] - */ - cullHitTest: function (interactiveObjects) - { - if (this.disableCull) - { - return interactiveObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return interactiveObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var length = interactiveObjects.length; - - determinant = 1 / determinant; - - var culledObjects = []; - - for (var index = 0; index < length; ++index) - { - var object = interactiveObjects[index].gameObject; - - if (!object.hasOwnProperty('width')) - { - culledObjects.push(interactiveObjects[index]); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || - tw > -objectW || th > -objectH || tw < cullW || th < cullH) - { - culledObjects.push(interactiveObjects[index]); - } - } - - return culledObjects; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#cullTilemap - * @since 3.0.0 - * - * @param {array} tilemap - [description] - * - * @return {array} [description] - */ - cullTilemap: function (tilemap) - { - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return tiles; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - var tiles = tilemap.tiles; - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = tiles.length; - var tileW = tilemap.tileWidth; - var tileH = tilemap.tileHeight; - var cullW = cameraW + tileW; - var cullH = cameraH + tileH; - var scrollFactorX = tilemap.scrollFactorX; - var scrollFactorY = tilemap.scrollFactorY; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var tile = tiles[index]; - var tileX = (tile.x - (scrollX * scrollFactorX)); - var tileY = (tile.y - (scrollY * scrollFactorY)); - var tx = (tileX * mva + tileY * mvc + mve); - var ty = (tileX * mvb + tileY * mvd + mvf); - var tw = ((tileX + tileW) * mva + (tileY + tileH) * mvc + mve); - var th = ((tileX + tileW) * mvb + (tileY + tileH) * mvd + mvf); - - if (tx > -tileW && ty > -tileH && tw < cullW && th < cullH) - { - culledObjects.push(tile); - } - } - - return culledObjects; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#fade - * @since 3.0.0 - * - * @param {number} duration - [description] - * @param {number} red - [description] - * @param {number} green - [description] - * @param {number} blue - [description] - * @param {number} force - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - fade: function (duration, red, green, blue, force) - { - if (red === undefined) { red = 0; } - if (green === undefined) { green = 0; } - if (blue === undefined) { blue = 0; } - - if (!force && this._fadeAlpha > 0) - { - return this; - } - - this._fadeRed = red; - this._fadeGreen = green; - this._fadeBlue = blue; - - if (duration <= 0) - { - duration = Number.MIN_VALUE; - } - - this._fadeDuration = duration; - this._fadeAlpha = Number.MIN_VALUE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#flash - * @since 3.0.0 - * - * @param {number} duration - [description] - * @param {number} red - [description] - * @param {number} green - [description] - * @param {number} blue - [description] - * @param {number} force - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - flash: function (duration, red, green, blue, force) - { - if (!force && this._flashAlpha > 0.0) - { - return this; - } - - if (red === undefined) { red = 1.0; } - if (green === undefined) { green = 1.0; } - if (blue === undefined) { blue = 1.0; } - - this._flashRed = red; - this._flashGreen = green; - this._flashBlue = blue; - - if (duration <= 0) - { - duration = Number.MIN_VALUE; - } - - this._flashDuration = duration; - this._flashAlpha = 1.0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#getWorldPoint - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {object|Phaser.Math.Vector2} output - [description] - * - * @return {Phaser.Math.Vector2} [description] - */ - getWorldPoint: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - output.x = x; - output.y = y; - - return output; - } - - determinant = 1 / determinant; - - var ima = mvd * determinant; - var imb = -mvb * determinant; - var imc = -mvc * determinant; - var imd = mva * determinant; - var ime = (mvc * mvf - mvd * mve) * determinant; - var imf = (mvb * mve - mva * mvf) * determinant; - - var c = Math.cos(this.rotation); - var s = Math.sin(this.rotation); - - var zoom = this.zoom; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - - var 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 + ime); - output.y = (sx * imb + sy * imd + imf); - - return output; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#ignore - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} gameObjectOrArray - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - ignore: function (gameObjectOrArray) - { - if (gameObjectOrArray instanceof Array) - { - for (var index = 0; index < gameObjectOrArray.length; ++index) - { - gameObjectOrArray[index].cameraFilter |= this._id; - } - } - else - { - gameObjectOrArray.cameraFilter |= this._id; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#preRender - * @since 3.0.0 - * - * @param {number} baseScale - [description] - * @param {number} resolution - [description] - * - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - var originX = width / 2; - var originY = height / 2; - var follow = this._follow; - - if (follow !== null) - { - originX = follow.x; - originY = follow.y; - - this.scrollX = originX - width * 0.5; - this.scrollY = originY - height * 0.5; - } - - if (this.useBounds) - { - var bounds = this._bounds; - - var bw = Math.max(0, bounds.right - width); - var bh = Math.max(0, bounds.bottom - height); - - if (this.scrollX < bounds.x) - { - this.scrollX = bounds.x; - } - else if (this.scrollX > bw) - { - this.scrollX = bw; - } - - if (this.scrollY < bounds.y) - { - this.scrollY = bounds.y; - } - else if (this.scrollY > bh) - { - this.scrollY = bh; - } - } - - if (this.roundPixels) - { - this.scrollX = Math.round(this.scrollX); - this.scrollY = Math.round(this.scrollY); - } - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - matrix.translate(this._shakeOffsetX, this._shakeOffsetY); - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#removeBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - removeBounds: function () - { - this.useBounds = false; - - this._bounds.setEmpty(); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setAngle - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setAngle: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = DegToRad(value); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setBackgroundColor - * @since 3.0.0 - * - * @param {integer} color - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setBackgroundColor: function (color) - { - if (color === undefined) { color = 'rgba(0,0,0,0)'; } - - this.backgroundColor = ValueToColor(color); - - this.transparent = (this.backgroundColor.alpha === 0); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setBounds - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setBounds: function (x, y, width, height) - { - this._bounds.setTo(x, y, width, height); - - this.useBounds = true; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setName - * @since 3.0.0 - * - * @param {string} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setName: function (value) - { - if (value === undefined) { value = ''; } - - this.name = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setPosition - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setRotation - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setRotation: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setRoundPixels - * @since 3.0.0 - * - * @param {boolean} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setRoundPixels: function (value) - { - this.roundPixels = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setScene - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setScene: function (scene) - { - this.scene = scene; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setScroll - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setScroll: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollX = x; - this.scrollY = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setSize - * @since 3.0.0 - * - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setSize: function (width, height) - { - if (height === undefined) { height = width; } - - this.width = width; - this.height = height; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setViewport - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setViewport: function (x, y, width, height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setZoom - * @since 3.0.0 - * - * @param {float} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setZoom: function (value) - { - if (value === undefined) { value = 1; } - - this.zoom = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#shake - * @since 3.0.0 - * - * @param {number} duration - [description] - * @param {number} intensity - [description] - * @param {number} force - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - shake: function (duration, intensity, force) - { - if (intensity === undefined) { intensity = 0.05; } - - if (!force && (this._shakeOffsetX !== 0 || this._shakeOffsetY !== 0)) - { - return this; - } - - this._shakeDuration = duration; - this._shakeIntensity = intensity; - this._shakeOffsetX = 0; - this._shakeOffsetY = 0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#startFollow - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject|object} gameObjectOrPoint - [description] - * @param {boolean} roundPx - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - startFollow: function (gameObjectOrPoint, roundPx) - { - this._follow = gameObjectOrPoint; - - if (roundPx !== undefined) - { - this.roundPixels = roundPx; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#stopFollow - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - stopFollow: function () - { - this._follow = null; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#toJSON - * @since 3.0.0 - * - * @return {object} [description] - */ - toJSON: function () - { - var output = { - name: this.name, - x: this.x, - y: this.y, - width: this.width, - height: this.height, - zoom: this.zoom, - rotation: this.rotation, - roundPixels: this.roundPixels, - scrollX: this.scrollX, - scrollY: this.scrollY, - backgroundColor: this.backgroundColor.rgba - }; - - if (this.useBounds) - { - output['bounds'] = { - x: this._bounds.x, - y: this._bounds.y, - width: this._bounds.width, - height: this._bounds.height - }; - } - - return output; - }, - - /** - * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to - * remove the fade. - * - * @method Phaser.Cameras.Scene2D.Camera#resetFX - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - resetFX: function () - { - this._flashAlpha = 0; - this._fadeAlpha = 0; - this._shakeOffsetX = 0.0; - this._shakeOffsetY = 0.0; - this._shakeDuration = 0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#update - * @since 3.0.0 - * - * @param {[type]} timestep - [description] - * @param {[type]} delta - [description] - */ - update: function (timestep, delta) - { - if (this._flashAlpha > 0.0) - { - this._flashAlpha -= delta / this._flashDuration; - - if (this._flashAlpha < 0.0) - { - this._flashAlpha = 0.0; - } - } - - if (this._fadeAlpha > 0.0 && this._fadeAlpha < 1.0) - { - this._fadeAlpha += delta / this._fadeDuration; - - if (this._fadeAlpha >= 1.0) - { - this._fadeAlpha = 1.0; - } - } - - if (this._shakeDuration > 0.0) - { - var intensity = this._shakeIntensity; - - this._shakeDuration -= delta; - - if (this._shakeDuration <= 0.0) - { - this._shakeOffsetX = 0.0; - this._shakeOffsetY = 0.0; - } - else - { - this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; - this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; - } - } - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#destroy - * @since 3.0.0 - */ - destroy: function () - { - this._bounds = undefined; - this.matrix = undefined; - this.culledObjects = []; - this.scene = undefined; - } - -}); - -module.exports = Camera; - - /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { @@ -35771,7 +35802,7 @@ module.exports = Camera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Converts a hex string into a Phaser Color object. @@ -35855,7 +35886,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); var IntegerToRGB = __webpack_require__(201); /** @@ -35936,7 +35967,7 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -35966,7 +35997,7 @@ module.exports = ObjectToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -36090,7 +36121,7 @@ module.exports = RandomXYZW; */ var Vector3 = __webpack_require__(51); -var Matrix4 = __webpack_require__(117); +var Matrix4 = __webpack_require__(119); var Quaternion = __webpack_require__(207); var tmpMat4 = new Matrix4(); @@ -37495,7 +37526,7 @@ module.exports = Matrix3; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(116); +var Camera = __webpack_require__(118); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -37682,7 +37713,7 @@ module.exports = OrthographicCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(116); +var Camera = __webpack_require__(118); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -38248,7 +38279,7 @@ module.exports = CubicBezierInterpolation; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); var GetValue = __webpack_require__(4); var RadToDeg = __webpack_require__(216); var Vector2 = __webpack_require__(6); @@ -38865,7 +38896,7 @@ module.exports = RadToDeg; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var FromPoints = __webpack_require__(120); +var FromPoints = __webpack_require__(122); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -39089,7 +39120,7 @@ module.exports = LineCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(121); +var CatmullRom = __webpack_require__(123); var Class = __webpack_require__(0); var Curve = __webpack_require__(66); var Vector2 = __webpack_require__(6); @@ -39365,26 +39396,26 @@ module.exports = CanvasInterpolation; * @namespace Phaser.Display.Color */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); -Color.ColorToRGBA = __webpack_require__(481); +Color.ColorToRGBA = __webpack_require__(480); Color.ComponentToHex = __webpack_require__(221); -Color.GetColor = __webpack_require__(115); +Color.GetColor = __webpack_require__(117); Color.GetColor32 = __webpack_require__(199); Color.HexStringToColor = __webpack_require__(198); -Color.HSLToColor = __webpack_require__(482); -Color.HSVColorWheel = __webpack_require__(484); +Color.HSLToColor = __webpack_require__(481); +Color.HSVColorWheel = __webpack_require__(483); Color.HSVToRGB = __webpack_require__(223); Color.HueToComponent = __webpack_require__(222); Color.IntegerToColor = __webpack_require__(200); Color.IntegerToRGB = __webpack_require__(201); -Color.Interpolate = __webpack_require__(485); +Color.Interpolate = __webpack_require__(484); Color.ObjectToColor = __webpack_require__(202); -Color.RandomRGB = __webpack_require__(486); +Color.RandomRGB = __webpack_require__(485); Color.RGBStringToColor = __webpack_require__(203); -Color.RGBToHSV = __webpack_require__(487); -Color.RGBToString = __webpack_require__(488); -Color.ValueToColor = __webpack_require__(114); +Color.RGBToHSV = __webpack_require__(486); +Color.RGBToString = __webpack_require__(487); +Color.ValueToColor = __webpack_require__(116); module.exports = Color; @@ -39474,7 +39505,7 @@ var HueToComponent = function (p, q, t) module.export = HueToComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(483)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(482)(module))) /***/ }), /* 223 */ @@ -39486,7 +39517,7 @@ module.export = HueToComponent; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetColor = __webpack_require__(115); +var GetColor = __webpack_require__(117); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -41365,8 +41396,8 @@ var ModelViewProjection = { projPersp: function (fovy, aspectRatio, near, far) { var projectionMatrix = this.projectionMatrix; - let fov = 1.0 / Math.tan(fovy / 2.0); - let nearFar = 1.0 / (near - far); + var fov = 1.0 / Math.tan(fovy / 2.0); + var nearFar = 1.0 / (near - far); projectionMatrix[0] = fov / aspectRatio; projectionMatrix[1] = 0.0; @@ -41404,9 +41435,9 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(511); +var ShaderSourceFS = __webpack_require__(510); var TextureTintPipeline = __webpack_require__(236); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); var LIGHT_COUNT = 10; @@ -41529,6 +41560,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera); } else @@ -41554,6 +41587,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera); } else @@ -41579,6 +41614,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera); } else @@ -41604,7 +41641,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { - this.renderer.setTexture2D(normalTexture.glTexture, 1); + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera); } else @@ -41630,7 +41668,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { - this.renderer.setTexture2D(normalTexture.glTexture, 1); + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera); } else @@ -41657,6 +41696,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera); } else @@ -41682,6 +41723,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera); } else @@ -41707,6 +41750,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchText.call(this, text, camera); } else @@ -41732,6 +41777,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera); } else @@ -41757,6 +41804,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera); } else @@ -41785,9 +41834,9 @@ module.exports = ForwardDiffuseLightPipeline; var Class = __webpack_require__(0); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(512); -var ShaderSourceVS = __webpack_require__(513); -var Utils = __webpack_require__(38); +var ShaderSourceFS = __webpack_require__(511); +var ShaderSourceVS = __webpack_require__(512); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); /** @@ -41884,9 +41933,171 @@ var TextureTintPipeline = new Class({ */ this.maxQuads = 2000; + /** + * [description] + * + * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches + * @type {array} + * @since 3.1.0 + */ + this.batches = []; + this.mvpInit(); }, + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D + * @since 3.1.0 + * + * @param {WebGLTexture} texture - [description] + * @param {int} textureUnit - [description] + * + * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + */ + setTexture2D: function (texture, unit) + { + if (!texture) return this; + + var batches = this.batches; + + if (batches.length === 0) + { + this.pushBatch(); + } + + var batch = batches[batches.length - 1]; + + if (unit > 0) + { + if (batch.textures[unit - 1] && + batch.textures[unit - 1] !== texture) + { + this.pushBatch(); + } + + batches[batches.length - 1].textures[unit - 1] = texture; + } + else + { + if (batch.texture !== null && + batch.texture !== texture) + { + this.pushBatch(); + } + + batches[batches.length - 1].texture = texture; + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch + * @since 3.1.0 + */ + pushBatch: function () + { + var batch = { + first: this.vertexCount, + texture: null, + textures: [] + }; + + this.batches.push(batch); + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush + * @since 3.1.0 + */ + flush: function () + { + if (this.flushLocked) return this; + this.flushLocked = true; + + var gl = this.gl; + var renderer = this.renderer; + var vertexCount = this.vertexCount; + var vertexBuffer = this.vertexBuffer; + var vertexData = this.vertexData; + var topology = this.topology; + var vertexSize = this.vertexSize; + var batches = this.batches; + var batchCount = batches.length; + var batchVertexCount = 0; + var batch = null; + var nextBatch = null; + + if (batchCount === 0 || vertexCount === 0) + { + this.flushLocked = false; + return this; + } + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + + for (var index = 0; index < batches.length - 1; ++index) + { + batch = batches[index]; + batchNext = batches[index + 1]; + + if (batch.textures.length > 0) + { + for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + var nTexture = batch.textures[textureIndex]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex); + } + } + gl.activeTexture(gl.TEXTURE0); + } + + batchVertexCount = batchNext.first - batch.first; + + if (batch.texture === null || batchVertexCount <= 0) continue; + + renderer.setTexture2D(batch.texture, 0); + gl.drawArrays(topology, batch.first, batchVertexCount); + } + + // Left over data + batch = batches[batches.length - 1]; + + if (batch.textures.length > 0) + { + for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + var nTexture = batch.textures[textureIndex]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex); + } + } + gl.activeTexture(gl.TEXTURE0); + } + + batchVertexCount = vertexCount - batch.first; + + if (batch.texture && batchVertexCount > 0) + { + renderer.setTexture2D(batch.texture, 0); + gl.drawArrays(topology, batch.first, batchVertexCount); + } + + this.vertexCount = 0; + batches.length = 0; + this.flushLocked = false; + + return this; + }, + /** * [description] * @@ -41900,6 +42111,11 @@ var TextureTintPipeline = new Class({ WebGLPipeline.prototype.onBind.call(this); this.mvpUpdate(); + if (this.batches.length === 0) + { + this.pushBatch(); + } + return this; }, @@ -41995,9 +42211,10 @@ var TextureTintPipeline = new Class({ var cos = Math.cos; var vertexComponentCount = this.vertexComponentCount; var vertexCapacity = this.vertexCapacity; + var texture = emitterManager.defaultFrame.source.glTexture; - renderer.setTexture2D(emitterManager.defaultFrame.source.glTexture, 0); - + this.setTexture2D(texture, 0); + for (var emitterIndex = 0; emitterIndex < emitterCount; ++emitterIndex) { var emitter = emitters[emitterIndex]; @@ -42015,15 +42232,15 @@ var TextureTintPipeline = new Class({ renderer.setBlendMode(emitter.blendMode); - if (this.vertexCount > 0) + if (this.vertexCount >= vertexCapacity) { this.flush(); + this.setTexture2D(texture, 0); } for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(aliveLength, maxQuads); - var vertexCount = 0; for (var index = 0; index < batchSize; ++index) { @@ -42063,7 +42280,7 @@ var TextureTintPipeline = new Class({ var ty2 = xw * mvb + yh * mvd + mvf; var tx3 = xw * mva + y * mvc + mve; var ty3 = xw * mvb + y * mvd + mvf; - var vertexOffset = vertexCount * vertexComponentCount; + var vertexOffset = this.vertexCount * vertexComponentCount; if (roundPixels) { @@ -42108,17 +42325,16 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 28] = uvs.y3; vertexViewU32[vertexOffset + 29] = color; - vertexCount += 6; + this.vertexCount += 6; } particleOffset += batchSize; aliveLength -= batchSize; - this.vertexCount = vertexCount; - - if (vertexCount >= vertexCapacity) + if (this.vertexCount >= vertexCapacity) { this.flush(); + this.setTexture2D(texture, 0); } } } @@ -42162,8 +42378,6 @@ var TextureTintPipeline = new Class({ for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(length, this.maxQuads); - var vertexOffset = 0; - var vertexCount = 0; for (var index = 0; index < batchSize; ++index) { @@ -42200,7 +42414,9 @@ var TextureTintPipeline = new Class({ // Bind Texture if texture wasn't bound. // This needs to be here because of multiple // texture atlas. - renderer.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); + this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); + var vertexOffset = this.vertexCount * this.vertexComponentCount; + vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -42233,16 +42449,19 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 28] = uvs.y3; vertexViewU32[vertexOffset + 29] = tint; - vertexOffset += 30; - vertexCount += 6; + this.vertexCount += 6; + + if (this.vertexCount >= this.vertexCapacity) + { + this.flush(); + } } batchOffset += batchSize; length -= batchSize; - if (vertexCount <= this.vertexCapacity) + if (this.vertexCount >= this.vertexCapacity) { - this.vertexCount = vertexCount; this.flush(); } } @@ -42332,7 +42551,7 @@ var TextureTintPipeline = new Class({ var tint3 = getTint(tintBR, alphaBR); var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -42449,7 +42668,8 @@ var TextureTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); + vertexOffset = this.vertexCount * this.vertexComponentCount; for (var index = 0, index0 = 0; index < length; index += 2) @@ -42575,7 +42795,7 @@ var TextureTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); for (var index = 0; index < textLength; ++index) { @@ -42799,7 +43019,7 @@ var TextureTintPipeline = new Class({ var uta, utb, utc, utd, ute, utf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); if (crop) { @@ -43235,8 +43455,8 @@ var TextureTintPipeline = new Class({ var v0 = (frameY / textureHeight) + vOffset; var u1 = (frameX + frameWidth) / textureWidth + uOffset; var v1 = (frameY + frameHeight) / textureHeight + vOffset; - - renderer.setTexture2D(texture, 0); + + this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -44656,11 +44876,11 @@ module.exports = Button; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var Key = __webpack_require__(243); -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(128); var KeyCombo = __webpack_require__(244); -var KeyMap = __webpack_require__(523); -var ProcessKeyDown = __webpack_require__(524); -var ProcessKeyUp = __webpack_require__(525); +var KeyMap = __webpack_require__(522); +var ProcessKeyDown = __webpack_require__(523); +var ProcessKeyUp = __webpack_require__(524); /** * @classdesc @@ -45285,8 +45505,8 @@ module.exports = Key; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(520); -var ResetKeyCombo = __webpack_require__(522); +var ProcessKeyCombo = __webpack_require__(519); +var ResetKeyCombo = __webpack_require__(521); /** * @classdesc @@ -45554,7 +45774,7 @@ module.exports = KeyCombo; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(123); +var Features = __webpack_require__(125); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -46766,7 +46986,7 @@ var CONST = __webpack_require__(84); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Scene = __webpack_require__(250); -var Systems = __webpack_require__(127); +var Systems = __webpack_require__(129); /** * @classdesc @@ -47921,7 +48141,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(127); +var Systems = __webpack_require__(129); /** * @classdesc @@ -48006,7 +48226,7 @@ module.exports = UppercaseFirst; var CONST = __webpack_require__(84); var GetValue = __webpack_require__(4); -var InjectionMap = __webpack_require__(528); +var InjectionMap = __webpack_require__(527); /** * Takes a Scene configuration object and returns a fully formed Systems object. @@ -50890,7 +51110,7 @@ module.exports = WebAudioSound; var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); var EventEmitter = __webpack_require__(13); var GenerateTexture = __webpack_require__(211); var GetValue = __webpack_require__(4); @@ -51680,15 +51900,15 @@ module.exports = TextureManager; module.exports = { - Canvas: __webpack_require__(529), - Image: __webpack_require__(530), - JSONArray: __webpack_require__(531), - JSONHash: __webpack_require__(532), - Pyxel: __webpack_require__(533), - SpriteSheet: __webpack_require__(534), - SpriteSheetFromAtlas: __webpack_require__(535), - StarlingXML: __webpack_require__(536), - UnityYAML: __webpack_require__(537) + Canvas: __webpack_require__(528), + Image: __webpack_require__(529), + JSONArray: __webpack_require__(530), + JSONHash: __webpack_require__(531), + Pyxel: __webpack_require__(532), + SpriteSheet: __webpack_require__(533), + SpriteSheetFromAtlas: __webpack_require__(534), + StarlingXML: __webpack_require__(535), + UnityYAML: __webpack_require__(536) }; @@ -51704,7 +51924,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(128); +var Frame = __webpack_require__(130); var TextureSource = __webpack_require__(263); /** @@ -52138,7 +52358,7 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(124); +var IsSizePowerOfTwo = __webpack_require__(126); var ScaleModes = __webpack_require__(62); /** @@ -52330,178 +52550,6 @@ module.exports = TextureSource; /* 264 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var List = __webpack_require__(129); -var PluginManager = __webpack_require__(11); -var StableSort = __webpack_require__(265); - -/** - * @classdesc - * [description] - * - * @class DisplayList - * @extends Phaser.Structs.List - * @memberOf Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - */ -var DisplayList = new Class({ - - Extends: List, - - initialize: - - function DisplayList (scene) - { - List.call(this, scene); - - /** - * [description] - * - * @name Phaser.GameObjects.DisplayList#sortChildrenFlag - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.sortChildrenFlag = false; - - /** - * [description] - * - * @name Phaser.GameObjects.DisplayList#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * [description] - * - * @name Phaser.GameObjects.DisplayList#systems - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.systems = scene.sys; - - if (!scene.sys.settings.isBooted) - { - scene.sys.events.once('boot', this.boot, this); - } - }, - - /** - * [description] - * - * @method Phaser.GameObjects.DisplayList#boot - * @since 3.0.0 - */ - boot: function () - { - var eventEmitter = this.systems.events; - - eventEmitter.on('shutdown', this.shutdown, this); - eventEmitter.on('destroy', this.destroy, this); - }, - - /** - * Force a sort of the display list on the next call to depthSort. - * - * @method Phaser.GameObjects.DisplayList#queueDepthSort - * @since 3.0.0 - */ - queueDepthSort: function () - { - this.sortChildrenFlag = true; - }, - - /** - * Immediately sorts the display list if the flag is set. - * - * @method Phaser.GameObjects.DisplayList#depthSort - * @since 3.0.0 - */ - depthSort: function () - { - if (this.sortChildrenFlag) - { - StableSort.inplace(this.list, this.sortByDepth); - - this.sortChildrenFlag = false; - } - }, - - /** - * [description] - * - * @method Phaser.GameObjects.DisplayList#sortByDepth - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} childA - [description] - * @param {Phaser.GameObjects.GameObject} childB - [description] - * - * @return {integer} [description] - */ - sortByDepth: function (childA, childB) - { - return childA._depth - childB._depth; - }, - - /** - * Given an array of Game Objects, sort the array and return it, - * so that the objects are in index order with the lowest at the bottom. - * - * @method Phaser.GameObjects.DisplayList#sortGameObjects - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] - * - * @return {array} [description] - */ - sortGameObjects: function (gameObjects) - { - if (gameObjects === undefined) { gameObjects = this.list; } - - this.scene.sys.depthSort(); - - return gameObjects.sort(this.sortIndexHandler.bind(this)); - }, - - /** - * Note that the given array is sorted in place, even though it isn't returned directly it will still be updated. - * - * @method Phaser.GameObjects.DisplayList#getTopGameObject - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] - * - * @return {Phaser.GameObjects.GameObject} The top-most Game Object on the Display List. - */ - getTopGameObject: function (gameObjects) - { - this.sortGameObjects(gameObjects); - - return gameObjects[gameObjects.length - 1]; - } - -}); - -PluginManager.register('DisplayList', DisplayList, 'displayList'); - -module.exports = DisplayList; - - -/***/ }), -/* 265 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -52621,7 +52669,7 @@ else { })(); /***/ }), -/* 266 */ +/* 265 */ /***/ (function(module, exports) { /** @@ -52760,7 +52808,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 267 */ +/* 266 */ /***/ (function(module, exports) { /** @@ -52892,6 +52940,37 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) module.exports = ParseXMLBitmapFont; +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Ellipse = __webpack_require__(135); + +Ellipse.Area = __webpack_require__(554); +Ellipse.Circumference = __webpack_require__(270); +Ellipse.CircumferencePoint = __webpack_require__(136); +Ellipse.Clone = __webpack_require__(555); +Ellipse.Contains = __webpack_require__(68); +Ellipse.ContainsPoint = __webpack_require__(556); +Ellipse.ContainsRect = __webpack_require__(557); +Ellipse.CopyFrom = __webpack_require__(558); +Ellipse.Equals = __webpack_require__(559); +Ellipse.GetBounds = __webpack_require__(560); +Ellipse.GetPoint = __webpack_require__(268); +Ellipse.GetPoints = __webpack_require__(269); +Ellipse.Offset = __webpack_require__(561); +Ellipse.OffsetPoint = __webpack_require__(562); +Ellipse.Random = __webpack_require__(110); + +module.exports = Ellipse; + + /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { @@ -52902,38 +52981,7 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(134); - -Ellipse.Area = __webpack_require__(554); -Ellipse.Circumference = __webpack_require__(271); -Ellipse.CircumferencePoint = __webpack_require__(135); -Ellipse.Clone = __webpack_require__(555); -Ellipse.Contains = __webpack_require__(68); -Ellipse.ContainsPoint = __webpack_require__(556); -Ellipse.ContainsRect = __webpack_require__(557); -Ellipse.CopyFrom = __webpack_require__(558); -Ellipse.Equals = __webpack_require__(559); -Ellipse.GetBounds = __webpack_require__(560); -Ellipse.GetPoint = __webpack_require__(269); -Ellipse.GetPoints = __webpack_require__(270); -Ellipse.Offset = __webpack_require__(561); -Ellipse.OffsetPoint = __webpack_require__(562); -Ellipse.Random = __webpack_require__(109); - -module.exports = Ellipse; - - -/***/ }), -/* 269 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var CircumferencePoint = __webpack_require__(135); +var CircumferencePoint = __webpack_require__(136); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -52965,7 +53013,7 @@ module.exports = GetPoint; /***/ }), -/* 270 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52974,8 +53022,8 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(271); -var CircumferencePoint = __webpack_require__(135); +var Circumference = __webpack_require__(270); +var CircumferencePoint = __webpack_require__(136); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -53017,7 +53065,7 @@ module.exports = GetPoints; /***/ }), -/* 271 */ +/* 270 */ /***/ (function(module, exports) { /** @@ -53049,7 +53097,7 @@ module.exports = Circumference; /***/ }), -/* 272 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53058,7 +53106,7 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(125); +var Commands = __webpack_require__(127); var GameObject = __webpack_require__(2); /** @@ -53315,7 +53363,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 273 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53455,7 +53503,7 @@ module.exports = Range; /***/ }), -/* 274 */ +/* 273 */ /***/ (function(module, exports) { /** @@ -53484,7 +53532,7 @@ module.exports = FloatBetween; /***/ }), -/* 275 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53505,7 +53553,7 @@ module.exports = { /***/ }), -/* 276 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53526,7 +53574,7 @@ module.exports = { /***/ }), -/* 277 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53547,7 +53595,7 @@ module.exports = { /***/ }), -/* 278 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53568,7 +53616,7 @@ module.exports = { /***/ }), -/* 279 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53589,7 +53637,7 @@ module.exports = { /***/ }), -/* 280 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53610,7 +53658,7 @@ module.exports = { /***/ }), -/* 281 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53625,7 +53673,7 @@ module.exports = __webpack_require__(592); /***/ }), -/* 282 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53646,7 +53694,7 @@ module.exports = { /***/ }), -/* 283 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53667,7 +53715,7 @@ module.exports = { /***/ }), -/* 284 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53688,7 +53736,7 @@ module.exports = { /***/ }), -/* 285 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53709,7 +53757,7 @@ module.exports = { /***/ }), -/* 286 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53724,7 +53772,7 @@ module.exports = __webpack_require__(605); /***/ }), -/* 287 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -53761,7 +53809,7 @@ module.exports = HasAny; /***/ }), -/* 288 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53771,11 +53819,11 @@ module.exports = HasAny; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); var GetBoolean = __webpack_require__(73); var GetValue = __webpack_require__(4); -var Sprite = __webpack_require__(37); -var TWEEN_CONST = __webpack_require__(87); +var Sprite = __webpack_require__(38); +var TWEEN_CONST = __webpack_require__(88); var Vector2 = __webpack_require__(6); /** @@ -54183,7 +54231,7 @@ module.exports = PathFollower; /***/ }), -/* 289 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -54214,7 +54262,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 290 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54303,7 +54351,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 291 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54313,7 +54361,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); /** * @classdesc @@ -54557,7 +54605,7 @@ module.exports = Light; /***/ }), -/* 292 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54567,9 +54615,9 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(291); +var Light = __webpack_require__(290); var LightPipeline = __webpack_require__(235); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); /** * @classdesc @@ -54887,7 +54935,7 @@ module.exports = LightsManager; /***/ }), -/* 293 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54903,19 +54951,19 @@ module.exports = LightsManager; module.exports = { Circle: __webpack_require__(653), - Ellipse: __webpack_require__(268), - Intersects: __webpack_require__(294), + Ellipse: __webpack_require__(267), + Intersects: __webpack_require__(293), Line: __webpack_require__(673), Point: __webpack_require__(691), Polygon: __webpack_require__(705), - Rectangle: __webpack_require__(306), + Rectangle: __webpack_require__(305), Triangle: __webpack_require__(734) }; /***/ }), -/* 294 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54933,12 +54981,12 @@ module.exports = { CircleToCircle: __webpack_require__(663), CircleToRectangle: __webpack_require__(664), GetRectangleIntersection: __webpack_require__(665), - LineToCircle: __webpack_require__(296), - LineToLine: __webpack_require__(89), + LineToCircle: __webpack_require__(295), + LineToLine: __webpack_require__(90), LineToRectangle: __webpack_require__(666), - PointToLine: __webpack_require__(297), + PointToLine: __webpack_require__(296), PointToLineSegment: __webpack_require__(667), - RectangleToRectangle: __webpack_require__(295), + RectangleToRectangle: __webpack_require__(294), RectangleToTriangle: __webpack_require__(668), RectangleToValues: __webpack_require__(669), TriangleToCircle: __webpack_require__(670), @@ -54949,7 +54997,7 @@ module.exports = { /***/ }), -/* 295 */ +/* 294 */ /***/ (function(module, exports) { /** @@ -54983,7 +55031,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 296 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55068,7 +55116,7 @@ module.exports = LineToCircle; /***/ }), -/* 297 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -55097,7 +55145,7 @@ module.exports = PointToLine; /***/ }), -/* 298 */ +/* 297 */ /***/ (function(module, exports) { /** @@ -55133,7 +55181,7 @@ module.exports = Decompose; /***/ }), -/* 299 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -55168,7 +55216,7 @@ module.exports = Decompose; /***/ }), -/* 300 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55178,9 +55226,9 @@ module.exports = Decompose; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(301); -var GetPoints = __webpack_require__(108); -var Random = __webpack_require__(110); +var GetPoint = __webpack_require__(300); +var GetPoints = __webpack_require__(109); +var Random = __webpack_require__(111); /** * @classdesc @@ -55465,7 +55513,7 @@ module.exports = Line; /***/ }), -/* 301 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55505,7 +55553,7 @@ module.exports = GetPoint; /***/ }), -/* 302 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55539,7 +55587,7 @@ module.exports = NormalAngle; /***/ }), -/* 303 */ +/* 302 */ /***/ (function(module, exports) { /** @@ -55567,7 +55615,7 @@ module.exports = GetMagnitude; /***/ }), -/* 304 */ +/* 303 */ /***/ (function(module, exports) { /** @@ -55595,7 +55643,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 305 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55605,7 +55653,7 @@ module.exports = GetMagnitudeSq; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(143); +var Contains = __webpack_require__(144); /** * @classdesc @@ -55780,7 +55828,7 @@ module.exports = Polygon; /***/ }), -/* 306 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55794,26 +55842,26 @@ var Rectangle = __webpack_require__(8); Rectangle.Area = __webpack_require__(710); Rectangle.Ceil = __webpack_require__(711); Rectangle.CeilAll = __webpack_require__(712); -Rectangle.CenterOn = __webpack_require__(307); +Rectangle.CenterOn = __webpack_require__(306); Rectangle.Clone = __webpack_require__(713); Rectangle.Contains = __webpack_require__(33); Rectangle.ContainsPoint = __webpack_require__(714); Rectangle.ContainsRect = __webpack_require__(715); Rectangle.CopyFrom = __webpack_require__(716); -Rectangle.Decompose = __webpack_require__(298); +Rectangle.Decompose = __webpack_require__(297); Rectangle.Equals = __webpack_require__(717); Rectangle.FitInside = __webpack_require__(718); Rectangle.FitOutside = __webpack_require__(719); Rectangle.Floor = __webpack_require__(720); Rectangle.FloorAll = __webpack_require__(721); -Rectangle.FromPoints = __webpack_require__(120); -Rectangle.GetAspectRatio = __webpack_require__(144); +Rectangle.FromPoints = __webpack_require__(122); +Rectangle.GetAspectRatio = __webpack_require__(145); Rectangle.GetCenter = __webpack_require__(722); -Rectangle.GetPoint = __webpack_require__(106); -Rectangle.GetPoints = __webpack_require__(181); +Rectangle.GetPoint = __webpack_require__(107); +Rectangle.GetPoints = __webpack_require__(182); Rectangle.GetSize = __webpack_require__(723); Rectangle.Inflate = __webpack_require__(724); -Rectangle.MarchingAnts = __webpack_require__(185); +Rectangle.MarchingAnts = __webpack_require__(186); Rectangle.MergePoints = __webpack_require__(725); Rectangle.MergeRect = __webpack_require__(726); Rectangle.MergeXY = __webpack_require__(727); @@ -55822,7 +55870,7 @@ Rectangle.OffsetPoint = __webpack_require__(729); Rectangle.Overlaps = __webpack_require__(730); Rectangle.Perimeter = __webpack_require__(78); Rectangle.PerimeterPoint = __webpack_require__(731); -Rectangle.Random = __webpack_require__(107); +Rectangle.Random = __webpack_require__(108); Rectangle.Scale = __webpack_require__(732); Rectangle.Union = __webpack_require__(733); @@ -55830,7 +55878,7 @@ module.exports = Rectangle; /***/ }), -/* 307 */ +/* 306 */ /***/ (function(module, exports) { /** @@ -55865,7 +55913,7 @@ module.exports = CenterOn; /***/ }), -/* 308 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55951,7 +55999,7 @@ module.exports = GetPoint; /***/ }), -/* 309 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56042,7 +56090,7 @@ module.exports = GetPoints; /***/ }), -/* 310 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56082,7 +56130,7 @@ module.exports = Centroid; /***/ }), -/* 311 */ +/* 310 */ /***/ (function(module, exports) { /** @@ -56121,7 +56169,7 @@ module.exports = Offset; /***/ }), -/* 312 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56184,7 +56232,7 @@ module.exports = InCenter; /***/ }), -/* 313 */ +/* 312 */ /***/ (function(module, exports) { /** @@ -56233,7 +56281,7 @@ module.exports = InteractiveObject; /***/ }), -/* 314 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56242,7 +56290,7 @@ module.exports = InteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(147); +var MergeXHRSettings = __webpack_require__(148); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -56296,7 +56344,7 @@ module.exports = XHRLoader; /***/ }), -/* 315 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56310,7 +56358,7 @@ var CONST = __webpack_require__(22); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(316); +var HTML5AudioFile = __webpack_require__(315); /** * @classdesc @@ -56535,7 +56583,7 @@ module.exports = AudioFile; /***/ }), -/* 316 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56547,7 +56595,7 @@ module.exports = AudioFile; var Class = __webpack_require__(0); var File = __webpack_require__(18); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(146); +var GetURL = __webpack_require__(147); /** * @classdesc @@ -56683,7 +56731,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 317 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56795,7 +56843,7 @@ module.exports = XMLFile; /***/ }), -/* 318 */ +/* 317 */ /***/ (function(module, exports) { /** @@ -56859,7 +56907,7 @@ module.exports = NumberArray; /***/ }), -/* 319 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56962,7 +57010,7 @@ module.exports = TextFile; /***/ }), -/* 320 */ +/* 319 */ /***/ (function(module, exports) { /** @@ -56999,7 +57047,7 @@ module.exports = Normalize; /***/ }), -/* 321 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57008,7 +57056,7 @@ module.exports = Normalize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Factorial = __webpack_require__(322); +var Factorial = __webpack_require__(321); /** * [description] @@ -57030,7 +57078,7 @@ module.exports = Bernstein; /***/ }), -/* 322 */ +/* 321 */ /***/ (function(module, exports) { /** @@ -57070,7 +57118,7 @@ module.exports = Factorial; /***/ }), -/* 323 */ +/* 322 */ /***/ (function(module, exports) { /** @@ -57105,7 +57153,7 @@ module.exports = Rotate; /***/ }), -/* 324 */ +/* 323 */ /***/ (function(module, exports) { /** @@ -57134,7 +57182,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 325 */ +/* 324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57143,12 +57191,12 @@ module.exports = RoundAwayFromZero; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeImage = __webpack_require__(326); -var ArcadeSprite = __webpack_require__(91); +var ArcadeImage = __webpack_require__(325); +var ArcadeSprite = __webpack_require__(92); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var PhysicsGroup = __webpack_require__(328); -var StaticPhysicsGroup = __webpack_require__(329); +var PhysicsGroup = __webpack_require__(327); +var StaticPhysicsGroup = __webpack_require__(328); /** * @classdesc @@ -57392,7 +57440,7 @@ module.exports = Factory; /***/ }), -/* 326 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57402,7 +57450,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(327); +var Components = __webpack_require__(326); var Image = __webpack_require__(70); /** @@ -57485,7 +57533,7 @@ module.exports = ArcadeImage; /***/ }), -/* 327 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57515,7 +57563,7 @@ module.exports = { /***/ }), -/* 328 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57524,7 +57572,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeSprite = __webpack_require__(91); +var ArcadeSprite = __webpack_require__(92); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var GetFastValue = __webpack_require__(1); @@ -57740,7 +57788,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 329 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57751,7 +57799,7 @@ module.exports = PhysicsGroup; // Phaser.Physics.Arcade.StaticGroup -var ArcadeSprite = __webpack_require__(91); +var ArcadeSprite = __webpack_require__(92); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var Group = __webpack_require__(69); @@ -57887,7 +57935,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 330 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57896,24 +57944,24 @@ module.exports = StaticPhysicsGroup; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(331); +var Body = __webpack_require__(330); var Clamp = __webpack_require__(60); var Class = __webpack_require__(0); -var Collider = __webpack_require__(332); +var Collider = __webpack_require__(331); var CONST = __webpack_require__(58); var DistanceBetween = __webpack_require__(43); var EventEmitter = __webpack_require__(13); var GetValue = __webpack_require__(4); -var ProcessQueue = __webpack_require__(333); +var ProcessQueue = __webpack_require__(332); var ProcessTileCallbacks = __webpack_require__(837); var Rectangle = __webpack_require__(8); -var RTree = __webpack_require__(334); +var RTree = __webpack_require__(333); var SeparateTile = __webpack_require__(838); var SeparateX = __webpack_require__(843); var SeparateY = __webpack_require__(845); var Set = __webpack_require__(61); -var StaticBody = __webpack_require__(337); -var TileIntersectsBody = __webpack_require__(336); +var StaticBody = __webpack_require__(336); +var TileIntersectsBody = __webpack_require__(335); var Vector2 = __webpack_require__(6); /** @@ -57966,6 +58014,15 @@ var World = new Class({ */ this.staticBodies = new Set(); + /** + * Static Bodies + * + * @name Phaser.Physics.Arcade.World#pendingDestroy + * @type {Phaser.Structs.Set} + * @since 3.1.0 + */ + this.pendingDestroy = new Set(); + /** * [description] * @@ -58256,7 +58313,7 @@ var World = new Class({ } else { - this.disableBody(object[i]); + this.disableGameObjectBody(object[i]); } } } @@ -58267,21 +58324,21 @@ var World = new Class({ } else { - this.disableBody(object); + this.disableGameObjectBody(object); } }, /** * [description] * - * @method Phaser.Physics.Arcade.World#disableBody - * @since 3.0.0 + * @method Phaser.Physics.Arcade.World#disableGameObjectBody + * @since 3.1.0 * * @param {Phaser.GameObjects.GameObject} object - [description] * * @return {Phaser.GameObjects.GameObject} [description] */ - disableBody: function (object) + disableGameObjectBody: function (object) { if (object.body) { @@ -58295,13 +58352,36 @@ var World = new Class({ this.staticTree.remove(object.body); } - object.body.destroy(); - object.body = null; + object.body.enable = false; } return object; }, + /** + * [description] + * + * @method Phaser.Physics.Arcade.World#disableBody + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - [description] + */ + disableBody: function (body) + { + if (body.physicsType === CONST.DYNAMIC_BODY) + { + this.tree.remove(body); + this.bodies.delete(body); + } + else if (body.physicsType === CONST.STATIC_BODY) + { + this.staticBodies.delete(body); + this.staticTree.remove(body); + } + + body.enable = false; + }, + /** * [description] * @@ -58551,7 +58631,12 @@ var World = new Class({ { var i; var body; - var bodies = this.bodies.entries; + + var dynamic = this.bodies; + var static = this.staticBodies; + var pending = this.pendingDestroy; + + var bodies = dynamic.entries; var len = bodies.length; for (i = 0; i < len; i++) @@ -58580,7 +58665,7 @@ var World = new Class({ } } - bodies = this.staticBodies.entries; + bodies = static.entries; len = bodies.length; for (i = 0; i < len; i++) @@ -58593,6 +58678,36 @@ var World = new Class({ } } } + + if (pending.size > 0) + { + var dynamicTree = this.tree; + var staticTree = this.staticTree; + + bodies = pending.entries; + len = bodies.length; + + for (i = 0; i < len; i++) + { + body = bodies[i]; + + if (body.physicsType === CONST.DYNAMIC_BODY) + { + dynamicTree.remove(body); + dynamic.delete(body); + } + else if (body.physicsType === CONST.STATIC_BODY) + { + staticTree.remove(body); + static.delete(body); + } + + body.world = undefined; + body.gameObject = undefined; + } + + pending.clear(); + } }, /** @@ -59295,13 +59410,13 @@ var World = new Class({ */ collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext, overlapOnly) { - if (group.length === 0) + var bodyA = sprite.body; + + if (group.length === 0 || !bodyA) { return; } - var bodyA = sprite.body; - // Does sprite collide with anything? var minMax = this.treeMinMax; @@ -59500,6 +59615,13 @@ var World = new Class({ { return; } + + var children = group1.getChildren(); + + for (var i = 0; i < children.length; i++) + { + this.collideSpriteVsGroup(children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly); + } }, /** @@ -59521,6 +59643,12 @@ var World = new Class({ */ destroy: function () { + this.tree.clear(); + this.staticTree.clear(); + this.bodies.clear(); + this.staticBodies.clear(); + this.colliders.destroy(); + this.removeAllListeners(); } @@ -59530,7 +59658,7 @@ module.exports = World; /***/ }), -/* 331 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60608,28 +60736,29 @@ var Body = new Class({ }, /** - * [description] + * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. + * If the body had any velocity or acceleration it is lost as a result of calling this. * * @method Phaser.Physics.Arcade.Body#reset * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The horizontal position to place the Game Object and Body. + * @param {number} y - The vertical position to place the Game Object and Body. */ reset: function (x, y) { this.stop(); - var sprite = this.gameObject; + var gameObject = this.gameObject; - this.position.x = x - sprite.displayOriginX + (sprite.scaleX * this.offset.x); - this.position.y = y - sprite.displayOriginY + (sprite.scaleY * this.offset.y); + gameObject.setPosition(x, y); - this.prev.x = this.position.x; - this.prev.y = this.position.y; + gameObject.getTopLeft(this.position); - this.rotation = this.gameObject.angle; - this.preRotation = this.rotation; + this.prev.copy(this.position); + + this.rotation = gameObject.angle; + this.preRotation = gameObject.angle; this.updateBounds(); this.updateCenter(); @@ -60802,8 +60931,9 @@ var Body = new Class({ */ destroy: function () { - this.gameObject.body = null; - this.gameObject = null; + this.enable = false; + + this.world.pendingDestroy.set(this); }, /** @@ -61384,7 +61514,7 @@ module.exports = Body; /***/ }), -/* 332 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61427,6 +61557,15 @@ var Collider = new Class({ */ this.world = world; + /** + * [description] + * + * @name Phaser.Physics.Arcade.Collider#name + * @type {string} + * @since 3.1.0 + */ + this.name = ''; + /** * [description] * @@ -61492,6 +61631,23 @@ var Collider = new Class({ this.callbackContext = callbackContext; }, + /** + * [description] + * + * @method Phaser.Physics.Arcade.Collider#setName + * @since 3.1.0 + * + * @param {string} name - [description] + * + * @return {Phaser.Physics.Arcade.Collider} [description] + */ + setName: function (name) + { + this.name = name; + + return this; + }, + /** * [description] * @@ -61538,7 +61694,7 @@ module.exports = Collider; /***/ }), -/* 333 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61736,7 +61892,7 @@ module.exports = ProcessQueue; /***/ }), -/* 334 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61745,7 +61901,7 @@ module.exports = ProcessQueue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(335); +var quickselect = __webpack_require__(334); /** * @classdesc @@ -62345,7 +62501,7 @@ module.exports = rbush; /***/ }), -/* 335 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -62463,7 +62619,7 @@ module.exports = QuickSelect; /***/ }), -/* 336 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -62500,7 +62656,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 337 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62625,7 +62781,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.width = gameObject.width; + this.width = gameObject.displayWidth; /** * [description] @@ -62634,31 +62790,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.height = gameObject.height; - - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#sourceWidth - * @type {number} - * @since 3.0.0 - */ - this.sourceWidth = gameObject.width; - - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#sourceHeight - * @type {number} - * @since 3.0.0 - */ - this.sourceHeight = gameObject.height; - - if (gameObject.frame) - { - this.sourceWidth = gameObject.frame.realWidth; - this.sourceHeight = gameObject.frame.realHeight; - } + this.height = gameObject.displayHeight; /** * [description] @@ -62667,7 +62799,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.halfWidth = Math.abs(gameObject.width / 2); + this.halfWidth = Math.abs(this.width / 2); /** * [description] @@ -62676,7 +62808,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.halfHeight = Math.abs(gameObject.height / 2); + this.halfHeight = Math.abs(this.height / 2); /** * [description] @@ -62694,7 +62826,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.velocity = new Vector2(); + this.velocity = Vector2.ZERO; /** * [description] @@ -62713,7 +62845,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.gravity = new Vector2(); + this.gravity = Vector2.ZERO; /** * [description] @@ -62722,7 +62854,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.bounce = new Vector2(); + this.bounce = Vector2.ZERO; // If true this Body will dispatch events @@ -62776,16 +62908,6 @@ var StaticBody = new Class({ */ this.immovable = true; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#moves - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.moves = false; - /** * [description] * @@ -62900,36 +63022,70 @@ var StaticBody = new Class({ * @since 3.0.0 */ this.physicsType = CONST.STATIC_BODY; + }, - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_sx - * @type {number} - * @private - * @since 3.0.0 - */ - this._sx = gameObject.scaleX; + /** + * Changes the Game Object this Body is bound to. + * First it removes its reference from the old Game Object, then sets the new one. + * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object. + * + * @method Phaser.Physics.Arcade.StaticBody#setGameObject + * @since 3.1.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body. + * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object? + * + * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. + */ + setGameObject: function (gameObject, update) + { + if (gameObject && gameObject !== this.gameObject) + { + // Remove this body from the old game object + this.gameObject.body = null; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_sy - * @type {number} - * @private - * @since 3.0.0 - */ - this._sy = gameObject.scaleY; + gameObject.body = this; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); + // Update our reference + this.gameObject = gameObject; + } + + if (update) + { + this.updateFromGameObject(); + } + + return this; + }, + + /** + * Updates this Static Body so that its position and dimensions are updated + * based on the current Game Object it is bound to. + * + * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject + * @since 3.1.0 + * + * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. + */ + updateFromGameObject: function () + { + this.world.staticTree.remove(this); + + var gameObject = this.gameObject; + + gameObject.getTopLeft(this.position); + + this.width = gameObject.displayWidth; + this.height = gameObject.displayHeight; + + this.halfWidth = Math.abs(this.width / 2); + this.halfHeight = Math.abs(this.height / 2); + + this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight); + + this.world.staticTree.insert(this); + + return this; }, /** @@ -62952,12 +63108,12 @@ var StaticBody = new Class({ this.world.staticTree.remove(this); - this.sourceWidth = width; - this.sourceHeight = height; - 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.width = width; + this.height = height; + + this.halfWidth = Math.floor(width / 2); + this.halfHeight = Math.floor(height / 2); + this.offset.set(offsetX, offsetY); this.updateCenter(); @@ -62992,13 +63148,11 @@ var StaticBody = new Class({ this.world.staticTree.remove(this); this.isCircle = true; + this.radius = radius; - this.sourceWidth = radius * 2; - this.sourceHeight = radius * 2; - - this.width = this.sourceWidth * this._sx; - this.height = this.sourceHeight * this._sy; + this.width = radius * 2; + this.height = radius * 2; this.halfWidth = Math.floor(this.width / 2); this.halfHeight = Math.floor(this.height / 2); @@ -63039,17 +63193,14 @@ var StaticBody = new Class({ */ reset: function (x, y) { - var sprite = this.gameObject; + var gameObject = this.gameObject; - if (x === undefined) { x = sprite.x; } - if (y === undefined) { y = sprite.y; } + if (x === undefined) { x = gameObject.x; } + if (y === undefined) { y = gameObject.y; } this.world.staticTree.remove(this); - this.position.x = x - sprite.displayOriginX + (sprite.scaleX * this.offset.x); - this.position.y = y - sprite.displayOriginY + (sprite.scaleY * this.offset.y); - - this.rotation = this.gameObject.angle; + gameObject.getTopLeft(this.position); this.updateCenter(); @@ -63178,8 +63329,9 @@ var StaticBody = new Class({ */ destroy: function () { - this.gameObject.body = null; - this.gameObject = null; + this.enable = false; + + this.world.pendingDestroy.set(this); }, /** @@ -63253,9 +63405,10 @@ var StaticBody = new Class({ set: function (value) { + this.world.staticTree.remove(this); + this.position.x = value; - this.world.staticTree.remove(this); this.world.staticTree.insert(this); } @@ -63277,9 +63430,10 @@ var StaticBody = new Class({ set: function (value) { + this.world.staticTree.remove(this); + this.position.y = value; - this.world.staticTree.remove(this); this.world.staticTree.insert(this); } @@ -63359,10 +63513,10 @@ module.exports = StaticBody; /***/ }), +/* 337 */, /* 338 */, /* 339 */, -/* 340 */, -/* 341 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63405,7 +63559,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 342 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63447,7 +63601,7 @@ module.exports = HasTileAt; /***/ }), -/* 343 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63458,7 +63612,7 @@ module.exports = HasTileAt; var Tile = __webpack_require__(45); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(149); +var CalculateFacesAt = __webpack_require__(150); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -63508,7 +63662,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 344 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63518,10 +63672,10 @@ module.exports = RemoveTileAt; */ var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(152); -var ParseCSV = __webpack_require__(345); -var ParseJSONTiled = __webpack_require__(346); -var ParseWeltmeister = __webpack_require__(351); +var Parse2DArray = __webpack_require__(153); +var ParseCSV = __webpack_require__(344); +var ParseJSONTiled = __webpack_require__(345); +var ParseWeltmeister = __webpack_require__(350); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -63578,7 +63732,7 @@ module.exports = Parse; /***/ }), -/* 345 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63588,7 +63742,7 @@ module.exports = Parse; */ var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(152); +var Parse2DArray = __webpack_require__(153); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -63626,7 +63780,7 @@ module.exports = ParseCSV; /***/ }), -/* 346 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63702,7 +63856,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 347 */ +/* 346 */ /***/ (function(module, exports) { /** @@ -63792,7 +63946,7 @@ module.exports = ParseGID; /***/ }), -/* 348 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63964,7 +64118,7 @@ module.exports = ImageCollection; /***/ }), -/* 349 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63974,7 +64128,7 @@ module.exports = ImageCollection; */ var Pick = __webpack_require__(897); -var ParseGID = __webpack_require__(347); +var ParseGID = __webpack_require__(346); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -64046,7 +64200,7 @@ module.exports = ParseObject; /***/ }), -/* 350 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64152,7 +64306,7 @@ module.exports = ObjectLayer; /***/ }), -/* 351 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64219,7 +64373,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 352 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64229,16 +64383,16 @@ module.exports = ParseWeltmeister; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(353); +var DegToRad = __webpack_require__(36); +var DynamicTilemapLayer = __webpack_require__(352); var Extend = __webpack_require__(23); var Formats = __webpack_require__(19); var LayerData = __webpack_require__(75); -var Rotate = __webpack_require__(323); -var StaticTilemapLayer = __webpack_require__(354); +var Rotate = __webpack_require__(322); +var StaticTilemapLayer = __webpack_require__(353); var Tile = __webpack_require__(45); -var TilemapComponents = __webpack_require__(96); -var Tileset = __webpack_require__(100); +var TilemapComponents = __webpack_require__(97); +var Tileset = __webpack_require__(101); /** * @classdesc @@ -66478,7 +66632,7 @@ module.exports = Tilemap; /***/ }), -/* 353 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66491,7 +66645,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DynamicTilemapLayerRender = __webpack_require__(903); var GameObject = __webpack_require__(2); -var TilemapComponents = __webpack_require__(96); +var TilemapComponents = __webpack_require__(97); /** * @classdesc @@ -67597,7 +67751,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 354 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67610,7 +67764,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var StaticTilemapLayerRender = __webpack_require__(906); -var TilemapComponents = __webpack_require__(96); +var TilemapComponents = __webpack_require__(97); +var Utils = __webpack_require__(34); /** * @classdesc @@ -67850,7 +68005,6 @@ var StaticTilemapLayer = new Class({ var voffset = 0; var vertexCount = 0; var bufferSize = (mapWidth * mapHeight) * pipeline.vertexSize * 6; - var tint = 0xffffffff; if (bufferData === null) { @@ -67891,6 +68045,7 @@ var StaticTilemapLayer = new Class({ var ty2 = tyh; var tx3 = txw; var ty3 = ty; + var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha); vertexViewF32[voffset + 0] = tx0; vertexViewF32[voffset + 1] = ty0; @@ -68632,7 +68787,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 355 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68935,7 +69090,7 @@ module.exports = TimerEvent; /***/ }), -/* 356 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68993,7 +69148,7 @@ module.exports = GetProps; /***/ }), -/* 357 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69039,7 +69194,7 @@ module.exports = GetTweens; /***/ }), -/* 358 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69048,15 +69203,15 @@ module.exports = GetTweens; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(156); +var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(101); +var GetNewValue = __webpack_require__(102); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(155); -var Tween = __webpack_require__(157); -var TweenData = __webpack_require__(158); +var GetValueOp = __webpack_require__(156); +var Tween = __webpack_require__(158); +var TweenData = __webpack_require__(159); /** * [description] @@ -69167,7 +69322,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 359 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69177,16 +69332,16 @@ module.exports = NumberTweenBuilder; */ var Clone = __webpack_require__(52); -var Defaults = __webpack_require__(156); +var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(101); -var GetTargets = __webpack_require__(154); -var GetTweens = __webpack_require__(357); +var GetNewValue = __webpack_require__(102); +var GetTargets = __webpack_require__(155); +var GetTweens = __webpack_require__(356); var GetValue = __webpack_require__(4); -var Timeline = __webpack_require__(360); -var TweenBuilder = __webpack_require__(102); +var Timeline = __webpack_require__(359); +var TweenBuilder = __webpack_require__(103); /** * [description] @@ -69319,7 +69474,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 360 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69330,8 +69485,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); -var TweenBuilder = __webpack_require__(102); -var TWEEN_CONST = __webpack_require__(87); +var TweenBuilder = __webpack_require__(103); +var TWEEN_CONST = __webpack_require__(88); /** * @classdesc @@ -70173,7 +70328,7 @@ module.exports = Timeline; /***/ }), -/* 361 */ +/* 360 */ /***/ (function(module, exports) { /** @@ -70220,7 +70375,7 @@ module.exports = SpliceOne; /***/ }), -/* 362 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71040,10 +71195,11 @@ module.exports = Animation; /***/ }), -/* 363 */, -/* 364 */ +/* 362 */, +/* 363 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(364); __webpack_require__(365); __webpack_require__(366); __webpack_require__(367); @@ -71052,11 +71208,10 @@ __webpack_require__(369); __webpack_require__(370); __webpack_require__(371); __webpack_require__(372); -__webpack_require__(373); /***/ }), -/* 365 */ +/* 364 */ /***/ (function(module, exports) { /** @@ -71096,7 +71251,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 366 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -71112,7 +71267,7 @@ if (!Array.isArray) /***/ }), -/* 367 */ +/* 366 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -71300,7 +71455,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 368 */ +/* 367 */ /***/ (function(module, exports) { /** @@ -71315,7 +71470,7 @@ if (!window.console) /***/ }), -/* 369 */ +/* 368 */ /***/ (function(module, exports) { /** @@ -71363,7 +71518,7 @@ if (!Function.prototype.bind) { /***/ }), -/* 370 */ +/* 369 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -71375,7 +71530,7 @@ if (!Math.trunc) { /***/ }), -/* 371 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -71412,7 +71567,7 @@ if (!Math.trunc) { /***/ }), -/* 372 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -71482,10 +71637,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) /***/ }), -/* 373 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -71537,7 +71692,7 @@ if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "o /***/ }), -/* 374 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -71571,7 +71726,7 @@ module.exports = Angle; /***/ }), -/* 375 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -71608,7 +71763,7 @@ module.exports = Call; /***/ }), -/* 376 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -71664,7 +71819,7 @@ module.exports = GetFirst; /***/ }), -/* 377 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71673,8 +71828,8 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AlignIn = __webpack_require__(166); -var CONST = __webpack_require__(167); +var AlignIn = __webpack_require__(167); +var CONST = __webpack_require__(168); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Zone = __webpack_require__(77); @@ -71777,7 +71932,7 @@ module.exports = GridAlign; /***/ }), -/* 378 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72224,7 +72379,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 379 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72470,7 +72625,7 @@ module.exports = Alpha; /***/ }), -/* 380 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72581,7 +72736,7 @@ module.exports = BlendMode; /***/ }), -/* 381 */ +/* 380 */ /***/ (function(module, exports) { /** @@ -72668,7 +72823,7 @@ module.exports = ComputedSize; /***/ }), -/* 382 */ +/* 381 */ /***/ (function(module, exports) { /** @@ -72752,7 +72907,7 @@ module.exports = Depth; /***/ }), -/* 383 */ +/* 382 */ /***/ (function(module, exports) { /** @@ -72900,7 +73055,7 @@ module.exports = Flip; /***/ }), -/* 384 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72910,7 +73065,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(8); -var RotateAround = __webpack_require__(182); +var RotateAround = __webpack_require__(183); var Vector2 = __webpack_require__(6); /** @@ -73094,7 +73249,7 @@ module.exports = GetBounds; /***/ }), -/* 385 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -73286,7 +73441,7 @@ module.exports = Origin; /***/ }), -/* 386 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73357,7 +73512,7 @@ module.exports = ScaleMode; /***/ }), -/* 387 */ +/* 386 */ /***/ (function(module, exports) { /** @@ -73449,7 +73604,7 @@ module.exports = ScrollFactor; /***/ }), -/* 388 */ +/* 387 */ /***/ (function(module, exports) { /** @@ -73594,7 +73749,7 @@ module.exports = Size; /***/ }), -/* 389 */ +/* 388 */ /***/ (function(module, exports) { /** @@ -73694,7 +73849,7 @@ module.exports = Texture; /***/ }), -/* 390 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -73889,7 +74044,7 @@ module.exports = Tint; /***/ }), -/* 391 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -73942,7 +74097,7 @@ module.exports = ToJSON; /***/ }), -/* 392 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73952,8 +74107,8 @@ module.exports = ToJSON; */ var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(159); -var WrapAngleDegrees = __webpack_require__(160); +var WrapAngle = __webpack_require__(160); +var WrapAngleDegrees = __webpack_require__(161); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -74295,7 +74450,7 @@ module.exports = Transform; /***/ }), -/* 393 */ +/* 392 */ /***/ (function(module, exports) { /** @@ -74375,7 +74530,7 @@ module.exports = Visible; /***/ }), -/* 394 */ +/* 393 */ /***/ (function(module, exports) { /** @@ -74409,7 +74564,7 @@ module.exports = IncAlpha; /***/ }), -/* 395 */ +/* 394 */ /***/ (function(module, exports) { /** @@ -74443,7 +74598,7 @@ module.exports = IncX; /***/ }), -/* 396 */ +/* 395 */ /***/ (function(module, exports) { /** @@ -74479,7 +74634,7 @@ module.exports = IncXY; /***/ }), -/* 397 */ +/* 396 */ /***/ (function(module, exports) { /** @@ -74513,7 +74668,7 @@ module.exports = IncY; /***/ }), -/* 398 */ +/* 397 */ /***/ (function(module, exports) { /** @@ -74558,7 +74713,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 399 */ +/* 398 */ /***/ (function(module, exports) { /** @@ -74606,7 +74761,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 400 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74615,7 +74770,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoints = __webpack_require__(108); +var GetPoints = __webpack_require__(109); /** * [description] @@ -74648,7 +74803,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 401 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74657,9 +74812,9 @@ module.exports = PlaceOnLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MarchingAnts = __webpack_require__(185); -var RotateLeft = __webpack_require__(186); -var RotateRight = __webpack_require__(187); +var MarchingAnts = __webpack_require__(186); +var RotateLeft = __webpack_require__(187); +var RotateRight = __webpack_require__(188); // Place the items in the array around the perimeter of the given rectangle. @@ -74707,7 +74862,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 402 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74717,7 +74872,7 @@ module.exports = PlaceOnRectangle; */ // var GetPointsOnLine = require('../geom/line/GetPointsOnLine'); -var BresenhamPoints = __webpack_require__(188); +var BresenhamPoints = __webpack_require__(189); /** * [description] @@ -74765,7 +74920,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 403 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -74800,7 +74955,7 @@ module.exports = PlayAnimation; /***/ }), -/* 404 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74809,7 +74964,7 @@ module.exports = PlayAnimation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(105); +var Random = __webpack_require__(106); /** * [description] @@ -74836,7 +74991,7 @@ module.exports = RandomCircle; /***/ }), -/* 405 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74845,7 +75000,7 @@ module.exports = RandomCircle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(109); +var Random = __webpack_require__(110); /** * [description] @@ -74872,7 +75027,7 @@ module.exports = RandomEllipse; /***/ }), -/* 406 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74881,7 +75036,7 @@ module.exports = RandomEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(110); +var Random = __webpack_require__(111); /** * [description] @@ -74908,7 +75063,7 @@ module.exports = RandomLine; /***/ }), -/* 407 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74917,7 +75072,7 @@ module.exports = RandomLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(107); +var Random = __webpack_require__(108); /** * [description] @@ -74944,7 +75099,7 @@ module.exports = RandomRectangle; /***/ }), -/* 408 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74953,7 +75108,7 @@ module.exports = RandomRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(111); +var Random = __webpack_require__(112); /** * [description] @@ -74980,7 +75135,7 @@ module.exports = RandomTriangle; /***/ }), -/* 409 */ +/* 408 */ /***/ (function(module, exports) { /** @@ -75017,7 +75172,7 @@ module.exports = Rotate; /***/ }), -/* 410 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75026,7 +75181,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundDistance = __webpack_require__(112); +var RotateAroundDistance = __webpack_require__(113); var DistanceBetween = __webpack_require__(43); /** @@ -75060,7 +75215,7 @@ module.exports = RotateAround; /***/ }), -/* 411 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75069,7 +75224,7 @@ module.exports = RotateAround; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(112); +var MathRotateAroundDistance = __webpack_require__(113); /** * [description] @@ -75107,7 +75262,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 412 */ +/* 411 */ /***/ (function(module, exports) { /** @@ -75141,7 +75296,7 @@ module.exports = ScaleX; /***/ }), -/* 413 */ +/* 412 */ /***/ (function(module, exports) { /** @@ -75177,7 +75332,7 @@ module.exports = ScaleXY; /***/ }), -/* 414 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -75211,7 +75366,7 @@ module.exports = ScaleY; /***/ }), -/* 415 */ +/* 414 */ /***/ (function(module, exports) { /** @@ -75248,7 +75403,7 @@ module.exports = SetAlpha; /***/ }), -/* 416 */ +/* 415 */ /***/ (function(module, exports) { /** @@ -75282,7 +75437,7 @@ module.exports = SetBlendMode; /***/ }), -/* 417 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -75319,7 +75474,7 @@ module.exports = SetDepth; /***/ }), -/* 418 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -75344,7 +75499,7 @@ var SetHitArea = function (items, hitArea, hitAreaCallback) { for (var i = 0; i < items.length; i++) { - items[i].setHitArea(hitArea, hitAreaCallback); + items[i].setInteractive(hitArea, hitAreaCallback); } return items; @@ -75354,7 +75509,7 @@ module.exports = SetHitArea; /***/ }), -/* 419 */ +/* 418 */ /***/ (function(module, exports) { /** @@ -75389,7 +75544,7 @@ module.exports = SetOrigin; /***/ }), -/* 420 */ +/* 419 */ /***/ (function(module, exports) { /** @@ -75426,7 +75581,7 @@ module.exports = SetRotation; /***/ }), -/* 421 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -75469,7 +75624,7 @@ module.exports = SetScale; /***/ }), -/* 422 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -75506,7 +75661,7 @@ module.exports = SetScaleX; /***/ }), -/* 423 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -75543,7 +75698,7 @@ module.exports = SetScaleY; /***/ }), -/* 424 */ +/* 423 */ /***/ (function(module, exports) { /** @@ -75580,7 +75735,7 @@ module.exports = SetTint; /***/ }), -/* 425 */ +/* 424 */ /***/ (function(module, exports) { /** @@ -75614,7 +75769,7 @@ module.exports = SetVisible; /***/ }), -/* 426 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -75651,7 +75806,7 @@ module.exports = SetX; /***/ }), -/* 427 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -75692,7 +75847,7 @@ module.exports = SetXY; /***/ }), -/* 428 */ +/* 427 */ /***/ (function(module, exports) { /** @@ -75729,7 +75884,7 @@ module.exports = SetY; /***/ }), -/* 429 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75856,7 +76011,7 @@ module.exports = ShiftPosition; /***/ }), -/* 430 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75886,7 +76041,7 @@ module.exports = Shuffle; /***/ }), -/* 431 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75895,7 +76050,7 @@ module.exports = Shuffle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmootherStep = __webpack_require__(189); +var MathSmootherStep = __webpack_require__(190); /** * [description] @@ -75940,7 +76095,7 @@ module.exports = SmootherStep; /***/ }), -/* 432 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75949,7 +76104,7 @@ module.exports = SmootherStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmoothStep = __webpack_require__(190); +var MathSmoothStep = __webpack_require__(191); /** * [description] @@ -75994,7 +76149,7 @@ module.exports = SmoothStep; /***/ }), -/* 433 */ +/* 432 */ /***/ (function(module, exports) { /** @@ -76046,7 +76201,7 @@ module.exports = Spread; /***/ }), -/* 434 */ +/* 433 */ /***/ (function(module, exports) { /** @@ -76079,7 +76234,7 @@ module.exports = ToggleVisible; /***/ }), -/* 435 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76094,9 +76249,31 @@ module.exports = ToggleVisible; module.exports = { - Animation: __webpack_require__(191), - AnimationFrame: __webpack_require__(192), - AnimationManager: __webpack_require__(193) + Animation: __webpack_require__(192), + AnimationFrame: __webpack_require__(193), + AnimationManager: __webpack_require__(194) + +}; + + +/***/ }), +/* 435 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Cache + */ + +module.exports = { + + BaseCache: __webpack_require__(196), + CacheManager: __webpack_require__(197) }; @@ -76112,13 +76289,14 @@ module.exports = { */ /** - * @namespace Phaser.Cache + * @namespace Phaser.Cameras */ module.exports = { - BaseCache: __webpack_require__(195), - CacheManager: __webpack_require__(196) + Controls: __webpack_require__(437), + Scene2D: __webpack_require__(440), + Sprite3D: __webpack_require__(442) }; @@ -76134,14 +76312,13 @@ module.exports = { */ /** - * @namespace Phaser.Cameras + * @namespace Phaser.Cameras.Controls */ module.exports = { - Controls: __webpack_require__(438), - Scene2D: __webpack_require__(441), - Sprite3D: __webpack_require__(443) + Fixed: __webpack_require__(438), + Smoothed: __webpack_require__(439) }; @@ -76150,28 +76327,6 @@ module.exports = { /* 438 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Cameras.Controls - */ - -module.exports = { - - Fixed: __webpack_require__(439), - Smoothed: __webpack_require__(440) - -}; - - -/***/ }), -/* 439 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -76462,7 +76617,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 440 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76927,7 +77082,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 441 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76942,14 +77097,14 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(197), - CameraManager: __webpack_require__(442) + Camera: __webpack_require__(115), + CameraManager: __webpack_require__(441) }; /***/ }), -/* 442 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76958,7 +77113,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(197); +var Camera = __webpack_require__(115); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginManager = __webpack_require__(11); @@ -77429,7 +77584,7 @@ module.exports = CameraManager; /***/ }), -/* 443 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77444,8 +77599,8 @@ module.exports = CameraManager; module.exports = { - Camera: __webpack_require__(116), - CameraManager: __webpack_require__(447), + Camera: __webpack_require__(118), + CameraManager: __webpack_require__(446), OrthographicCamera: __webpack_require__(209), PerspectiveCamera: __webpack_require__(210) @@ -77453,7 +77608,7 @@ module.exports = { /***/ }), -/* 444 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77467,12 +77622,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(445); + renderWebGL = __webpack_require__(444); } if (true) { - renderCanvas = __webpack_require__(446); + renderCanvas = __webpack_require__(445); } module.exports = { @@ -77484,7 +77639,7 @@ module.exports = { /***/ }), -/* 445 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77523,7 +77678,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 446 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77562,7 +77717,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 447 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77817,7 +77972,7 @@ module.exports = CameraManager; /***/ }), -/* 448 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77833,13 +77988,13 @@ module.exports = CameraManager; module.exports = { GenerateTexture: __webpack_require__(211), - Palettes: __webpack_require__(449) + Palettes: __webpack_require__(448) }; /***/ }), -/* 449 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77855,16 +78010,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(212), - C64: __webpack_require__(450), - CGA: __webpack_require__(451), - JMP: __webpack_require__(452), - MSX: __webpack_require__(453) + C64: __webpack_require__(449), + CGA: __webpack_require__(450), + JMP: __webpack_require__(451), + MSX: __webpack_require__(452) }; /***/ }), -/* 450 */ +/* 449 */ /***/ (function(module, exports) { /** @@ -77918,7 +78073,7 @@ module.exports = { /***/ }), -/* 451 */ +/* 450 */ /***/ (function(module, exports) { /** @@ -77972,7 +78127,7 @@ module.exports = { /***/ }), -/* 452 */ +/* 451 */ /***/ (function(module, exports) { /** @@ -78026,7 +78181,7 @@ module.exports = { /***/ }), -/* 453 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -78080,7 +78235,7 @@ module.exports = { /***/ }), -/* 454 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78095,7 +78250,7 @@ module.exports = { module.exports = { - Path: __webpack_require__(455), + Path: __webpack_require__(454), CubicBezier: __webpack_require__(213), Curve: __webpack_require__(66), @@ -78107,7 +78262,7 @@ module.exports = { /***/ }), -/* 455 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78123,7 +78278,7 @@ var CubicBezierCurve = __webpack_require__(213); var EllipseCurve = __webpack_require__(215); var GameObjectFactory = __webpack_require__(9); var LineCurve = __webpack_require__(217); -var MovePathTo = __webpack_require__(456); +var MovePathTo = __webpack_require__(455); var Rectangle = __webpack_require__(8); var SplineCurve = __webpack_require__(218); var Vector2 = __webpack_require__(6); @@ -78872,7 +79027,7 @@ module.exports = Path; /***/ }), -/* 456 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79008,7 +79163,7 @@ module.exports = MoveTo; /***/ }), -/* 457 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79024,13 +79179,13 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(79), - DataManagerPlugin: __webpack_require__(458) + DataManagerPlugin: __webpack_require__(457) }; /***/ }), -/* 458 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79138,7 +79293,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 459 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79153,17 +79308,17 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(460), - Bounds: __webpack_require__(475), - Canvas: __webpack_require__(478), + Align: __webpack_require__(459), + Bounds: __webpack_require__(474), + Canvas: __webpack_require__(477), Color: __webpack_require__(220), - Masks: __webpack_require__(489) + Masks: __webpack_require__(488) }; /***/ }), -/* 460 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79178,8 +79333,38 @@ module.exports = { module.exports = { - In: __webpack_require__(461), - To: __webpack_require__(462) + In: __webpack_require__(460), + To: __webpack_require__(461) + +}; + + +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Display.Align.In + */ + +module.exports = { + + BottomCenter: __webpack_require__(169), + BottomLeft: __webpack_require__(170), + BottomRight: __webpack_require__(171), + Center: __webpack_require__(172), + LeftCenter: __webpack_require__(174), + QuickSet: __webpack_require__(167), + RightCenter: __webpack_require__(175), + TopCenter: __webpack_require__(176), + TopLeft: __webpack_require__(177), + TopRight: __webpack_require__(178) }; @@ -79195,21 +79380,23 @@ module.exports = { */ /** - * @namespace Phaser.Display.Align.In + * @namespace Phaser.Display.Align.To */ module.exports = { - BottomCenter: __webpack_require__(168), - BottomLeft: __webpack_require__(169), - BottomRight: __webpack_require__(170), - Center: __webpack_require__(171), - LeftCenter: __webpack_require__(173), - QuickSet: __webpack_require__(166), - RightCenter: __webpack_require__(174), - TopCenter: __webpack_require__(175), - TopLeft: __webpack_require__(176), - TopRight: __webpack_require__(177) + BottomCenter: __webpack_require__(462), + BottomLeft: __webpack_require__(463), + BottomRight: __webpack_require__(464), + LeftBottom: __webpack_require__(465), + LeftCenter: __webpack_require__(466), + LeftTop: __webpack_require__(467), + RightBottom: __webpack_require__(468), + RightCenter: __webpack_require__(469), + RightTop: __webpack_require__(470), + TopCenter: __webpack_require__(471), + TopLeft: __webpack_require__(472), + TopRight: __webpack_require__(473) }; @@ -79218,38 +79405,6 @@ module.exports = { /* 462 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Display.Align.To - */ - -module.exports = { - - BottomCenter: __webpack_require__(463), - BottomLeft: __webpack_require__(464), - BottomRight: __webpack_require__(465), - LeftBottom: __webpack_require__(466), - LeftCenter: __webpack_require__(467), - LeftTop: __webpack_require__(468), - RightBottom: __webpack_require__(469), - RightCenter: __webpack_require__(470), - RightTop: __webpack_require__(471), - TopCenter: __webpack_require__(472), - TopLeft: __webpack_require__(473), - TopRight: __webpack_require__(474) - -}; - - -/***/ }), -/* 463 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -79289,7 +79444,7 @@ module.exports = BottomCenter; /***/ }), -/* 464 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79331,7 +79486,7 @@ module.exports = BottomLeft; /***/ }), -/* 465 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79373,7 +79528,7 @@ module.exports = BottomRight; /***/ }), -/* 466 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79415,7 +79570,7 @@ module.exports = LeftBottom; /***/ }), -/* 467 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79457,7 +79612,7 @@ module.exports = LeftCenter; /***/ }), -/* 468 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79499,7 +79654,7 @@ module.exports = LeftTop; /***/ }), -/* 469 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79541,7 +79696,7 @@ module.exports = RightBottom; /***/ }), -/* 470 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79583,7 +79738,7 @@ module.exports = RightCenter; /***/ }), -/* 471 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79625,7 +79780,7 @@ module.exports = RightTop; /***/ }), -/* 472 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79667,7 +79822,7 @@ module.exports = TopCenter; /***/ }), -/* 473 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79709,7 +79864,7 @@ module.exports = TopLeft; /***/ }), -/* 474 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79751,7 +79906,7 @@ module.exports = TopRight; /***/ }), -/* 475 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79766,13 +79921,13 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(172), + CenterOn: __webpack_require__(173), GetBottom: __webpack_require__(24), GetCenterX: __webpack_require__(47), GetCenterY: __webpack_require__(50), GetLeft: __webpack_require__(26), - GetOffsetX: __webpack_require__(476), - GetOffsetY: __webpack_require__(477), + GetOffsetX: __webpack_require__(475), + GetOffsetY: __webpack_require__(476), GetRight: __webpack_require__(28), GetTop: __webpack_require__(30), SetBottom: __webpack_require__(25), @@ -79786,7 +79941,7 @@ module.exports = { /***/ }), -/* 476 */ +/* 475 */ /***/ (function(module, exports) { /** @@ -79816,7 +79971,7 @@ module.exports = GetOffsetX; /***/ }), -/* 477 */ +/* 476 */ /***/ (function(module, exports) { /** @@ -79846,7 +80001,7 @@ module.exports = GetOffsetY; /***/ }), -/* 478 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79863,15 +80018,15 @@ module.exports = { Interpolation: __webpack_require__(219), Pool: __webpack_require__(20), - Smoothing: __webpack_require__(119), - TouchAction: __webpack_require__(479), - UserSelect: __webpack_require__(480) + Smoothing: __webpack_require__(121), + TouchAction: __webpack_require__(478), + UserSelect: __webpack_require__(479) }; /***/ }), -/* 479 */ +/* 478 */ /***/ (function(module, exports) { /** @@ -79906,7 +80061,7 @@ module.exports = TouchAction; /***/ }), -/* 480 */ +/* 479 */ /***/ (function(module, exports) { /** @@ -79953,7 +80108,7 @@ module.exports = UserSelect; /***/ }), -/* 481 */ +/* 480 */ /***/ (function(module, exports) { /** @@ -80001,7 +80156,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 482 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80010,7 +80165,7 @@ module.exports = ColorToRGBA; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); var HueToComponent = __webpack_require__(222); /** @@ -80051,7 +80206,7 @@ module.exports = HSLToColor; /***/ }), -/* 483 */ +/* 482 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -80079,7 +80234,7 @@ module.exports = function(module) { /***/ }), -/* 484 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80120,7 +80275,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 485 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80223,7 +80378,7 @@ module.exports = { /***/ }), -/* 486 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80233,7 +80388,7 @@ module.exports = { */ var Between = __webpack_require__(226); -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -80259,7 +80414,7 @@ module.exports = RandomRGB; /***/ }), -/* 487 */ +/* 486 */ /***/ (function(module, exports) { /** @@ -80323,7 +80478,7 @@ module.exports = RGBToHSV; /***/ }), -/* 488 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80367,7 +80522,7 @@ module.exports = RGBToString; /***/ }), -/* 489 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80382,14 +80537,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(490), - GeometryMask: __webpack_require__(491) + BitmapMask: __webpack_require__(489), + GeometryMask: __webpack_require__(490) }; /***/ }), -/* 490 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80604,7 +80759,7 @@ module.exports = BitmapMask; /***/ }), -/* 491 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80748,7 +80903,7 @@ module.exports = GeometryMask; /***/ }), -/* 492 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80763,7 +80918,7 @@ module.exports = GeometryMask; module.exports = { - AddToDOM: __webpack_require__(122), + AddToDOM: __webpack_require__(124), DOMContentLoaded: __webpack_require__(227), ParseXML: __webpack_require__(228), RemoveFromDOM: __webpack_require__(229), @@ -80773,7 +80928,7 @@ module.exports = { /***/ }), -/* 493 */ +/* 492 */ /***/ (function(module, exports) { // shim for using process in browser @@ -80963,7 +81118,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 494 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81145,7 +81300,7 @@ module.exports = EventEmitter; /***/ }), -/* 495 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81154,16 +81309,16 @@ module.exports = EventEmitter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(122); -var AnimationManager = __webpack_require__(193); -var CacheManager = __webpack_require__(196); +var AddToDOM = __webpack_require__(124); +var AnimationManager = __webpack_require__(194); +var CacheManager = __webpack_require__(197); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Config = __webpack_require__(496); -var CreateRenderer = __webpack_require__(497); +var Config = __webpack_require__(495); +var CreateRenderer = __webpack_require__(496); var DataManager = __webpack_require__(79); -var DebugHeader = __webpack_require__(514); -var Device = __webpack_require__(515); +var DebugHeader = __webpack_require__(513); +var Device = __webpack_require__(514); var DOMContentLoaded = __webpack_require__(227); var EventEmitter = __webpack_require__(13); var InputManager = __webpack_require__(237); @@ -81172,8 +81327,8 @@ var PluginManager = __webpack_require__(11); var SceneManager = __webpack_require__(249); var SoundManagerCreator = __webpack_require__(253); var TextureManager = __webpack_require__(260); -var TimeStep = __webpack_require__(538); -var VisibilityHandler = __webpack_require__(539); +var TimeStep = __webpack_require__(537); +var VisibilityHandler = __webpack_require__(538); /** * @classdesc @@ -81626,7 +81781,7 @@ module.exports = Game; /***/ }), -/* 496 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81641,7 +81796,7 @@ var GetValue = __webpack_require__(4); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(3); var Plugins = __webpack_require__(231); -var ValueToColor = __webpack_require__(114); +var ValueToColor = __webpack_require__(116); /** * This callback type is completely empty, a no-operation. @@ -81857,7 +82012,7 @@ module.exports = Config; /***/ }), -/* 497 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81869,7 +82024,7 @@ module.exports = Config; var CanvasInterpolation = __webpack_require__(219); var CanvasPool = __webpack_require__(20); var CONST = __webpack_require__(22); -var Features = __webpack_require__(123); +var Features = __webpack_require__(125); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -81945,8 +82100,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(498); - WebGLRenderer = __webpack_require__(503); + CanvasRenderer = __webpack_require__(497); + WebGLRenderer = __webpack_require__(502); // Let the config pick the renderer type, both are included if (config.renderType === CONST.WEBGL) @@ -81986,7 +82141,7 @@ module.exports = CreateRenderer; /***/ }), -/* 498 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81995,14 +82150,14 @@ module.exports = CreateRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitImage = __webpack_require__(499); -var CanvasSnapshot = __webpack_require__(500); +var BlitImage = __webpack_require__(498); +var CanvasSnapshot = __webpack_require__(499); var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var DrawImage = __webpack_require__(501); -var GetBlendModes = __webpack_require__(502); +var DrawImage = __webpack_require__(500); +var GetBlendModes = __webpack_require__(501); var ScaleModes = __webpack_require__(62); -var Smoothing = __webpack_require__(119); +var Smoothing = __webpack_require__(121); /** * @classdesc @@ -82515,7 +82670,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 499 */ +/* 498 */ /***/ (function(module, exports) { /** @@ -82556,7 +82711,7 @@ module.exports = BlitImage; /***/ }), -/* 500 */ +/* 499 */ /***/ (function(module, exports) { /** @@ -82595,7 +82750,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 501 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -82689,7 +82844,7 @@ module.exports = DrawImage; /***/ }), -/* 502 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82739,7 +82894,7 @@ module.exports = GetBlendModes; /***/ }), -/* 503 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82750,13 +82905,13 @@ module.exports = GetBlendModes; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(124); -var Utils = __webpack_require__(38); -var WebGLSnapshot = __webpack_require__(504); +var IsSizePowerOfTwo = __webpack_require__(126); +var Utils = __webpack_require__(34); +var WebGLSnapshot = __webpack_require__(503); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(505); -var FlatTintPipeline = __webpack_require__(508); +var BitmapMaskPipeline = __webpack_require__(504); +var FlatTintPipeline = __webpack_require__(507); var ForwardDiffuseLightPipeline = __webpack_require__(235); var TextureTintPipeline = __webpack_require__(236); @@ -82933,6 +83088,16 @@ var WebGLRenderer = new Class({ // Intenal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit + * @type {int} + * @since 3.1.0 + */ + this.currentActiveTextureUnit = 0; + + /** * [description] * @@ -83510,6 +83675,38 @@ var WebGLRenderer = new Class({ return this; }, + addBlendMode: function (func, equation) + { + var index = this.blendModes.push({ func: func, equation: equation }); + + return index - 1; + }, + + updateBlendMode: function (index, func, equation) + { + if (this.blendModes[index]) + { + this.blendModes[index].func = func; + + if (equation) + { + this.blendModes[index].equation = equation; + } + } + + return this; + }, + + removeBlendMode: function (index) + { + if (index > 16 && this.blendModes[index]) + { + this.blendModes.splice(index, 1); + } + + return this; + }, + /** * [description] * @@ -83529,7 +83726,11 @@ var WebGLRenderer = new Class({ { this.flush(); - gl.activeTexture(gl.TEXTURE0 + textureUnit); + if (this.currentActiveTextureUnit !== textureUnit) + { + gl.activeTexture(gl.TEXTURE0 + textureUnit); + this.currentActiveTextureUnit = textureUnit; + } gl.bindTexture(gl.TEXTURE_2D, texture); this.currentTextures[textureUnit] = texture; @@ -84495,7 +84696,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 504 */ +/* 503 */ /***/ (function(module, exports) { /** @@ -84564,7 +84765,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 505 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84574,9 +84775,9 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(506); -var ShaderSourceVS = __webpack_require__(507); -var Utils = __webpack_require__(38); +var ShaderSourceFS = __webpack_require__(505); +var ShaderSourceVS = __webpack_require__(506); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); /** @@ -84761,9 +84962,10 @@ var BitmapMaskPipeline = new Class({ // Bind bitmap mask pipeline and draw renderer.setPipeline(this); - renderer.setTexture2D(mask.mainTexture, 0); + renderer.setTexture2D(mask.maskTexture, 1); - + renderer.setTexture2D(mask.mainTexture, 0); + // Finally draw a triangle filling the whole screen gl.drawArrays(this.topology, 0, 3); } @@ -84775,19 +84977,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 506 */ +/* 505 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = maskColor.a * mainColor.a;\r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n" /***/ }), -/* 507 */ +/* 506 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n" /***/ }), -/* 508 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84797,12 +84999,12 @@ module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision med */ var Class = __webpack_require__(0); -var Commands = __webpack_require__(125); +var Commands = __webpack_require__(127); var Earcut = __webpack_require__(233); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(509); -var ShaderSourceVS = __webpack_require__(510); -var Utils = __webpack_require__(38); +var ShaderSourceFS = __webpack_require__(508); +var ShaderSourceVS = __webpack_require__(509); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); var Point = function (x, y, width, rgb, alpha) @@ -86045,37 +86247,37 @@ module.exports = FlatTintPipeline; /***/ }), -/* 509 */ +/* 508 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n" /***/ }), -/* 510 */ +/* 509 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n" /***/ }), -/* 511 */ +/* 510 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n" /***/ }), -/* 512 */ +/* 511 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n" /***/ }), -/* 513 */ +/* 512 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n" /***/ }), -/* 514 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86194,7 +86396,7 @@ module.exports = DebugHeader; /***/ }), -/* 515 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86216,18 +86418,18 @@ module.exports = { os: __webpack_require__(67), browser: __webpack_require__(82), - features: __webpack_require__(123), - input: __webpack_require__(516), - audio: __webpack_require__(517), - video: __webpack_require__(518), - fullscreen: __webpack_require__(519), + features: __webpack_require__(125), + input: __webpack_require__(515), + audio: __webpack_require__(516), + video: __webpack_require__(517), + fullscreen: __webpack_require__(518), canvasFeatures: __webpack_require__(232) }; /***/ }), -/* 516 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86307,7 +86509,7 @@ module.exports = init(); /***/ }), -/* 517 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86433,7 +86635,7 @@ module.exports = init(); /***/ }), -/* 518 */ +/* 517 */ /***/ (function(module, exports) { /** @@ -86519,7 +86721,7 @@ module.exports = init(); /***/ }), -/* 519 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -86618,7 +86820,7 @@ module.exports = init(); /***/ }), -/* 520 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86627,7 +86829,7 @@ module.exports = init(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(521); +var AdvanceKeyCombo = __webpack_require__(520); /** * Used internally by the KeyCombo class. @@ -86698,7 +86900,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 521 */ +/* 520 */ /***/ (function(module, exports) { /** @@ -86739,7 +86941,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 522 */ +/* 521 */ /***/ (function(module, exports) { /** @@ -86773,7 +86975,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 523 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86782,7 +86984,7 @@ module.exports = ResetKeyCombo; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(128); var KeyMap = {}; @@ -86795,7 +86997,7 @@ module.exports = KeyMap; /***/ }), -/* 524 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -86850,7 +87052,7 @@ module.exports = ProcessKeyDown; /***/ }), -/* 525 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -86900,7 +87102,7 @@ module.exports = ProcessKeyUp; /***/ }), -/* 526 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86962,7 +87164,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 527 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87008,7 +87210,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 528 */ +/* 527 */ /***/ (function(module, exports) { /** @@ -87056,7 +87258,7 @@ module.exports = InjectionMap; /***/ }), -/* 529 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -87089,7 +87291,7 @@ module.exports = Canvas; /***/ }), -/* 530 */ +/* 529 */ /***/ (function(module, exports) { /** @@ -87122,7 +87324,7 @@ module.exports = Image; /***/ }), -/* 531 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87227,7 +87429,7 @@ module.exports = JSONArray; /***/ }), -/* 532 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87324,7 +87526,7 @@ module.exports = JSONHash; /***/ }), -/* 533 */ +/* 532 */ /***/ (function(module, exports) { /** @@ -87397,7 +87599,7 @@ module.exports = Pyxel; /***/ }), -/* 534 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87509,7 +87711,7 @@ module.exports = SpriteSheet; /***/ }), -/* 535 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87692,7 +87894,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 536 */ +/* 535 */ /***/ (function(module, exports) { /** @@ -87775,7 +87977,7 @@ module.exports = StarlingXML; /***/ }), -/* 537 */ +/* 536 */ /***/ (function(module, exports) { /** @@ -87939,7 +88141,7 @@ TextureImporter: /***/ }), -/* 538 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88561,7 +88763,7 @@ module.exports = TimeStep; /***/ }), -/* 539 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -88675,7 +88877,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 540 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88690,25 +88892,25 @@ module.exports = VisibilityHandler; var GameObjects = { - DisplayList: __webpack_require__(264), + DisplayList: __webpack_require__(540), GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), UpdateList: __webpack_require__(541), Components: __webpack_require__(12), - BitmapText: __webpack_require__(130), - Blitter: __webpack_require__(131), - DynamicBitmapText: __webpack_require__(132), - Graphics: __webpack_require__(133), + BitmapText: __webpack_require__(131), + Blitter: __webpack_require__(132), + DynamicBitmapText: __webpack_require__(133), + Graphics: __webpack_require__(134), Group: __webpack_require__(69), Image: __webpack_require__(70), - Particles: __webpack_require__(136), - PathFollower: __webpack_require__(288), + Particles: __webpack_require__(137), + PathFollower: __webpack_require__(287), Sprite3D: __webpack_require__(81), - Sprite: __webpack_require__(37), - Text: __webpack_require__(138), - TileSprite: __webpack_require__(139), + Sprite: __webpack_require__(38), + Text: __webpack_require__(139), + TileSprite: __webpack_require__(140), Zone: __webpack_require__(77), // Game Object Factories @@ -88749,8 +88951,8 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(88); - GameObjects.Quad = __webpack_require__(140); + GameObjects.Mesh = __webpack_require__(89); + GameObjects.Quad = __webpack_require__(141); GameObjects.Factories.Mesh = __webpack_require__(648); GameObjects.Factories.Quad = __webpack_require__(649); @@ -88758,15 +88960,187 @@ if (true) GameObjects.Creators.Mesh = __webpack_require__(650); GameObjects.Creators.Quad = __webpack_require__(651); - GameObjects.Light = __webpack_require__(291); + GameObjects.Light = __webpack_require__(290); - __webpack_require__(292); + __webpack_require__(291); __webpack_require__(652); } module.exports = GameObjects; +/***/ }), +/* 540 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var List = __webpack_require__(87); +var PluginManager = __webpack_require__(11); +var StableSort = __webpack_require__(264); + +/** + * @classdesc + * [description] + * + * @class DisplayList + * @extends Phaser.Structs.List + * @memberOf Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + */ +var DisplayList = new Class({ + + Extends: List, + + initialize: + + function DisplayList (scene) + { + List.call(this, scene); + + /** + * [description] + * + * @name Phaser.GameObjects.DisplayList#sortChildrenFlag + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.sortChildrenFlag = false; + + /** + * [description] + * + * @name Phaser.GameObjects.DisplayList#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * [description] + * + * @name Phaser.GameObjects.DisplayList#systems + * @type {Phaser.Scenes.Systems} + * @since 3.0.0 + */ + this.systems = scene.sys; + + if (!scene.sys.settings.isBooted) + { + scene.sys.events.once('boot', this.boot, this); + } + }, + + /** + * [description] + * + * @method Phaser.GameObjects.DisplayList#boot + * @since 3.0.0 + */ + boot: function () + { + var eventEmitter = this.systems.events; + + eventEmitter.on('shutdown', this.shutdown, this); + eventEmitter.on('destroy', this.destroy, this); + }, + + /** + * Force a sort of the display list on the next call to depthSort. + * + * @method Phaser.GameObjects.DisplayList#queueDepthSort + * @since 3.0.0 + */ + queueDepthSort: function () + { + this.sortChildrenFlag = true; + }, + + /** + * Immediately sorts the display list if the flag is set. + * + * @method Phaser.GameObjects.DisplayList#depthSort + * @since 3.0.0 + */ + depthSort: function () + { + if (this.sortChildrenFlag) + { + StableSort.inplace(this.list, this.sortByDepth); + + this.sortChildrenFlag = false; + } + }, + + /** + * [description] + * + * @method Phaser.GameObjects.DisplayList#sortByDepth + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} childA - [description] + * @param {Phaser.GameObjects.GameObject} childB - [description] + * + * @return {integer} [description] + */ + sortByDepth: function (childA, childB) + { + return childA._depth - childB._depth; + }, + + /** + * Given an array of Game Objects, sort the array and return it, + * so that the objects are in index order with the lowest at the bottom. + * + * @method Phaser.GameObjects.DisplayList#sortGameObjects + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] + * + * @return {array} [description] + */ + sortGameObjects: function (gameObjects) + { + if (gameObjects === undefined) { gameObjects = this.list; } + + this.scene.sys.depthSort(); + + return gameObjects.sort(this.sortIndexHandler.bind(this)); + }, + + /** + * Note that the given array is sorted in place, even though it isn't returned directly it will still be updated. + * + * @method Phaser.GameObjects.DisplayList#getTopGameObject + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] + * + * @return {Phaser.GameObjects.GameObject} The top-most Game Object on the Display List. + */ + getTopGameObject: function (gameObjects) + { + this.sortGameObjects(gameObjects); + + return gameObjects[gameObjects.length - 1]; + } + +}); + +PluginManager.register('DisplayList', DisplayList, 'displayList'); + +module.exports = DisplayList; + + /***/ }), /* 541 */ /***/ (function(module, exports, __webpack_require__) { @@ -89050,7 +89424,7 @@ module.exports = UpdateList; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(267); +var ParseXMLBitmapFont = __webpack_require__(266); var ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing) { @@ -90311,7 +90685,7 @@ module.exports = Area; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(134); +var Ellipse = __webpack_require__(135); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -90584,12 +90958,12 @@ if (true) renderWebGL = __webpack_require__(564); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(272); + renderCanvas = __webpack_require__(271); } if (true) { - renderCanvas = __webpack_require__(272); + renderCanvas = __webpack_require__(271); } module.exports = { @@ -90980,14 +91354,14 @@ var DeathZone = __webpack_require__(570); var EdgeZone = __webpack_require__(571); var EmitterOp = __webpack_require__(572); var GetFastValue = __webpack_require__(1); -var GetRandomElement = __webpack_require__(137); +var GetRandomElement = __webpack_require__(138); var GetValue = __webpack_require__(4); -var HasAny = __webpack_require__(287); +var HasAny = __webpack_require__(286); var HasValue = __webpack_require__(72); var Particle = __webpack_require__(606); var RandomZone = __webpack_require__(607); var Rectangle = __webpack_require__(8); -var StableSort = __webpack_require__(265); +var StableSort = __webpack_require__(264); var Vector2 = __webpack_require__(6); var Wrap = __webpack_require__(42); @@ -93273,7 +93647,7 @@ module.exports = EdgeZone; */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(274); +var FloatBetween = __webpack_require__(273); var GetEaseFunction = __webpack_require__(71); var GetFastValue = __webpack_require__(1); var Wrap = __webpack_require__(42); @@ -93832,18 +94206,18 @@ module.exports = EmitterOp; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(275); -var Bounce = __webpack_require__(276); -var Circular = __webpack_require__(277); -var Cubic = __webpack_require__(278); -var Elastic = __webpack_require__(279); -var Expo = __webpack_require__(280); -var Linear = __webpack_require__(281); -var Quadratic = __webpack_require__(282); -var Quartic = __webpack_require__(283); -var Quintic = __webpack_require__(284); -var Sine = __webpack_require__(285); -var Stepped = __webpack_require__(286); +var Back = __webpack_require__(274); +var Bounce = __webpack_require__(275); +var Circular = __webpack_require__(276); +var Cubic = __webpack_require__(277); +var Elastic = __webpack_require__(278); +var Expo = __webpack_require__(279); +var Linear = __webpack_require__(280); +var Quadratic = __webpack_require__(281); +var Quartic = __webpack_require__(282); +var Quintic = __webpack_require__(283); +var Sine = __webpack_require__(284); +var Stepped = __webpack_require__(285); // EaseMap module.exports = { @@ -95073,7 +95447,7 @@ module.exports = Stepped; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); var DistanceBetween = __webpack_require__(43); /** @@ -97332,7 +97706,7 @@ module.exports = TileSpriteCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(131); +var Blitter = __webpack_require__(132); var GameObjectFactory = __webpack_require__(9); /** @@ -97374,7 +97748,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var DynamicBitmapText = __webpack_require__(132); +var DynamicBitmapText = __webpack_require__(133); var GameObjectFactory = __webpack_require__(9); /** @@ -97417,7 +97791,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Graphics = __webpack_require__(133); +var Graphics = __webpack_require__(134); var GameObjectFactory = __webpack_require__(9); /** @@ -97545,7 +97919,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var ParticleEmitterManager = __webpack_require__(136); +var ParticleEmitterManager = __webpack_require__(137); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -97591,7 +97965,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(9); -var PathFollower = __webpack_require__(288); +var PathFollower = __webpack_require__(287); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -97687,7 +98061,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -97733,7 +98107,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(130); +var BitmapText = __webpack_require__(131); var GameObjectFactory = __webpack_require__(9); /** @@ -97776,7 +98150,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(138); +var Text = __webpack_require__(139); var GameObjectFactory = __webpack_require__(9); /** @@ -97818,7 +98192,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileSprite = __webpack_require__(139); +var TileSprite = __webpack_require__(140); var GameObjectFactory = __webpack_require__(9); /** @@ -97904,7 +98278,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(131); +var Blitter = __webpack_require__(132); var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); @@ -97946,7 +98320,7 @@ GameObjectCreator.register('blitter', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(132); +var BitmapText = __webpack_require__(133); var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); @@ -97991,7 +98365,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) */ var GameObjectCreator = __webpack_require__(14); -var Graphics = __webpack_require__(133); +var Graphics = __webpack_require__(134); /** * Creates a new Graphics Game Object and returns it. @@ -98101,7 +98475,7 @@ GameObjectCreator.register('image', function (config) var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var GetFastValue = __webpack_require__(1); -var ParticleEmitterManager = __webpack_require__(136); +var ParticleEmitterManager = __webpack_require__(137); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -98156,7 +98530,7 @@ GameObjectCreator.register('particles', function (config) */ var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(290); +var BuildGameObjectAnimation = __webpack_require__(289); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var Sprite3D = __webpack_require__(81); @@ -98205,10 +98579,10 @@ GameObjectCreator.register('sprite3D', function (config) */ var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(290); +var BuildGameObjectAnimation = __webpack_require__(289); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * Creates a new Sprite Game Object and returns it. @@ -98253,7 +98627,7 @@ GameObjectCreator.register('sprite', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(130); +var BitmapText = __webpack_require__(131); var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); @@ -98301,7 +98675,7 @@ GameObjectCreator.register('bitmapText', function (config) var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Text = __webpack_require__(138); +var Text = __webpack_require__(139); /** * Creates a new Text Game Object and returns it. @@ -98380,7 +98754,7 @@ GameObjectCreator.register('text', function (config) var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var TileSprite = __webpack_require__(139); +var TileSprite = __webpack_require__(140); /** * Creates a new TileSprite Game Object and returns it. @@ -98561,7 +98935,7 @@ module.exports = MeshCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Mesh = __webpack_require__(88); +var Mesh = __webpack_require__(89); var GameObjectFactory = __webpack_require__(9); /** @@ -98611,7 +98985,7 @@ if (true) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Quad = __webpack_require__(140); +var Quad = __webpack_require__(141); var GameObjectFactory = __webpack_require__(9); /** @@ -98661,7 +99035,7 @@ var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var Mesh = __webpack_require__(88); +var Mesh = __webpack_require__(89); /** * Creates a new Mesh Game Object and returns it. @@ -98707,7 +99081,7 @@ GameObjectCreator.register('mesh', function (config) var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Quad = __webpack_require__(140); +var Quad = __webpack_require__(141); /** * Creates a new Quad Game Object and returns it. @@ -98749,7 +99123,7 @@ GameObjectCreator.register('quad', function (config) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(292); +var LightsManager = __webpack_require__(291); var PluginManager = __webpack_require__(11); /** @@ -98846,8 +99220,8 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(63); Circle.Area = __webpack_require__(654); -Circle.Circumference = __webpack_require__(180); -Circle.CircumferencePoint = __webpack_require__(104); +Circle.Circumference = __webpack_require__(181); +Circle.CircumferencePoint = __webpack_require__(105); Circle.Clone = __webpack_require__(655); Circle.Contains = __webpack_require__(32); Circle.ContainsPoint = __webpack_require__(656); @@ -98855,11 +99229,11 @@ Circle.ContainsRect = __webpack_require__(657); Circle.CopyFrom = __webpack_require__(658); Circle.Equals = __webpack_require__(659); Circle.GetBounds = __webpack_require__(660); -Circle.GetPoint = __webpack_require__(178); -Circle.GetPoints = __webpack_require__(179); +Circle.GetPoint = __webpack_require__(179); +Circle.GetPoints = __webpack_require__(180); Circle.Offset = __webpack_require__(661); Circle.OffsetPoint = __webpack_require__(662); -Circle.Random = __webpack_require__(105); +Circle.Random = __webpack_require__(106); module.exports = Circle; @@ -99252,7 +99626,7 @@ module.exports = CircleToRectangle; */ var Rectangle = __webpack_require__(8); -var RectangleToRectangle = __webpack_require__(295); +var RectangleToRectangle = __webpack_require__(294); /** * [description] @@ -99395,7 +99769,7 @@ module.exports = LineToRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PointToLine = __webpack_require__(297); +var PointToLine = __webpack_require__(296); /** * [description] @@ -99436,10 +99810,10 @@ module.exports = PointToLineSegment; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToLine = __webpack_require__(89); +var LineToLine = __webpack_require__(90); var Contains = __webpack_require__(33); -var ContainsArray = __webpack_require__(141); -var Decompose = __webpack_require__(298); +var ContainsArray = __webpack_require__(142); +var Decompose = __webpack_require__(297); /** * [description] @@ -99569,7 +99943,7 @@ module.exports = RectangleToValues; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToCircle = __webpack_require__(296); +var LineToCircle = __webpack_require__(295); var Contains = __webpack_require__(53); /** @@ -99633,7 +100007,7 @@ module.exports = TriangleToCircle; */ var Contains = __webpack_require__(53); -var LineToLine = __webpack_require__(89); +var LineToLine = __webpack_require__(90); /** * [description] @@ -99686,9 +100060,9 @@ module.exports = TriangleToLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ContainsArray = __webpack_require__(141); -var Decompose = __webpack_require__(299); -var LineToLine = __webpack_require__(89); +var ContainsArray = __webpack_require__(142); +var Decompose = __webpack_require__(298); +var LineToLine = __webpack_require__(90); /** * [description] @@ -99774,30 +100148,30 @@ module.exports = TriangleToTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(300); +var Line = __webpack_require__(299); Line.Angle = __webpack_require__(54); -Line.BresenhamPoints = __webpack_require__(188); +Line.BresenhamPoints = __webpack_require__(189); Line.CenterOn = __webpack_require__(674); Line.Clone = __webpack_require__(675); Line.CopyFrom = __webpack_require__(676); Line.Equals = __webpack_require__(677); Line.GetMidPoint = __webpack_require__(678); Line.GetNormal = __webpack_require__(679); -Line.GetPoint = __webpack_require__(301); -Line.GetPoints = __webpack_require__(108); +Line.GetPoint = __webpack_require__(300); +Line.GetPoints = __webpack_require__(109); Line.Height = __webpack_require__(680); Line.Length = __webpack_require__(65); -Line.NormalAngle = __webpack_require__(302); +Line.NormalAngle = __webpack_require__(301); Line.NormalX = __webpack_require__(681); Line.NormalY = __webpack_require__(682); Line.Offset = __webpack_require__(683); Line.PerpSlope = __webpack_require__(684); -Line.Random = __webpack_require__(110); +Line.Random = __webpack_require__(111); Line.ReflectAngle = __webpack_require__(685); Line.Rotate = __webpack_require__(686); Line.RotateAroundPoint = __webpack_require__(687); -Line.RotateAroundXY = __webpack_require__(142); +Line.RotateAroundXY = __webpack_require__(143); Line.SetToAngle = __webpack_require__(688); Line.Slope = __webpack_require__(689); Line.Width = __webpack_require__(690); @@ -99855,7 +100229,7 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(300); +var Line = __webpack_require__(299); /** * [description] @@ -100179,7 +100553,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(54); -var NormalAngle = __webpack_require__(302); +var NormalAngle = __webpack_require__(301); /** * Returns the reflected angle between two lines. @@ -100214,7 +100588,7 @@ module.exports = ReflectAngle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(142); +var RotateAroundXY = __webpack_require__(143); /** * [description] @@ -100248,7 +100622,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(142); +var RotateAroundXY = __webpack_require__(143); /** * [description] @@ -100382,8 +100756,8 @@ Point.CopyFrom = __webpack_require__(694); Point.Equals = __webpack_require__(695); Point.Floor = __webpack_require__(696); Point.GetCentroid = __webpack_require__(697); -Point.GetMagnitude = __webpack_require__(303); -Point.GetMagnitudeSq = __webpack_require__(304); +Point.GetMagnitude = __webpack_require__(302); +Point.GetMagnitudeSq = __webpack_require__(303); Point.GetRectangleFromPoints = __webpack_require__(698); Point.Interpolate = __webpack_require__(699); Point.Invert = __webpack_require__(700); @@ -100779,7 +101153,7 @@ module.exports = Negative; */ var Point = __webpack_require__(5); -var GetMagnitudeSq = __webpack_require__(304); +var GetMagnitudeSq = __webpack_require__(303); /** * [description] @@ -100864,7 +101238,7 @@ module.exports = ProjectUnit; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetMagnitude = __webpack_require__(303); +var GetMagnitude = __webpack_require__(302); /** * [description] @@ -100906,10 +101280,10 @@ module.exports = SetMagnitude; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(305); +var Polygon = __webpack_require__(304); Polygon.Clone = __webpack_require__(706); -Polygon.Contains = __webpack_require__(143); +Polygon.Contains = __webpack_require__(144); Polygon.ContainsPoint = __webpack_require__(707); Polygon.GetAABB = __webpack_require__(708); Polygon.GetNumberArray = __webpack_require__(709); @@ -100927,7 +101301,7 @@ module.exports = Polygon; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(305); +var Polygon = __webpack_require__(304); /** * [description] @@ -100957,7 +101331,7 @@ module.exports = Clone; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(143); +var Contains = __webpack_require__(144); /** * [description] @@ -101339,7 +101713,7 @@ module.exports = Equals; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(144); +var GetAspectRatio = __webpack_require__(145); // Fits the target rectangle into the source rectangle. // Preserves aspect ratio. @@ -101390,7 +101764,7 @@ module.exports = FitInside; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(144); +var GetAspectRatio = __webpack_require__(145); // Fits the target rectangle around the source rectangle. // Preserves aspect ration. @@ -101582,7 +101956,7 @@ module.exports = GetSize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(307); +var CenterOn = __webpack_require__(306); // Increases the size of the Rectangle object by the specified amounts. // The center point of the Rectangle object stays the same, and its size increases @@ -101859,7 +102233,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(5); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); /** * [description] @@ -101999,25 +102373,25 @@ Triangle.BuildEquilateral = __webpack_require__(736); Triangle.BuildFromPolygon = __webpack_require__(737); Triangle.BuildRight = __webpack_require__(738); Triangle.CenterOn = __webpack_require__(739); -Triangle.Centroid = __webpack_require__(310); +Triangle.Centroid = __webpack_require__(309); Triangle.CircumCenter = __webpack_require__(740); Triangle.CircumCircle = __webpack_require__(741); Triangle.Clone = __webpack_require__(742); Triangle.Contains = __webpack_require__(53); -Triangle.ContainsArray = __webpack_require__(141); +Triangle.ContainsArray = __webpack_require__(142); Triangle.ContainsPoint = __webpack_require__(743); Triangle.CopyFrom = __webpack_require__(744); -Triangle.Decompose = __webpack_require__(299); +Triangle.Decompose = __webpack_require__(298); Triangle.Equals = __webpack_require__(745); -Triangle.GetPoint = __webpack_require__(308); -Triangle.GetPoints = __webpack_require__(309); -Triangle.InCenter = __webpack_require__(312); +Triangle.GetPoint = __webpack_require__(307); +Triangle.GetPoints = __webpack_require__(308); +Triangle.InCenter = __webpack_require__(311); Triangle.Perimeter = __webpack_require__(746); -Triangle.Offset = __webpack_require__(311); -Triangle.Random = __webpack_require__(111); +Triangle.Offset = __webpack_require__(310); +Triangle.Random = __webpack_require__(112); Triangle.Rotate = __webpack_require__(747); Triangle.RotateAroundPoint = __webpack_require__(748); -Triangle.RotateAroundXY = __webpack_require__(145); +Triangle.RotateAroundXY = __webpack_require__(146); module.exports = Triangle; @@ -102243,8 +102617,8 @@ module.exports = BuildRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Centroid = __webpack_require__(310); -var Offset = __webpack_require__(311); +var Centroid = __webpack_require__(309); +var Offset = __webpack_require__(310); /** * [description] @@ -102597,8 +102971,8 @@ module.exports = Perimeter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(145); -var InCenter = __webpack_require__(312); +var RotateAroundXY = __webpack_require__(146); +var InCenter = __webpack_require__(311); /** * [description] @@ -102631,7 +103005,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(145); +var RotateAroundXY = __webpack_require__(146); /** * [description] @@ -102672,7 +103046,7 @@ module.exports = { Gamepad: __webpack_require__(750), InputManager: __webpack_require__(237), InputPlugin: __webpack_require__(755), - InteractiveObject: __webpack_require__(313), + InteractiveObject: __webpack_require__(312), Keyboard: __webpack_require__(756), Mouse: __webpack_require__(761), Pointer: __webpack_require__(246), @@ -102885,10 +103259,10 @@ var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); var DistanceBetween = __webpack_require__(43); -var Ellipse = __webpack_require__(134); +var Ellipse = __webpack_require__(135); var EllipseContains = __webpack_require__(68); var EventEmitter = __webpack_require__(13); -var InteractiveObject = __webpack_require__(313); +var InteractiveObject = __webpack_require__(312); var PluginManager = __webpack_require__(11); var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); @@ -104472,7 +104846,7 @@ module.exports = { KeyboardManager: __webpack_require__(242), Key: __webpack_require__(243), - KeyCodes: __webpack_require__(126), + KeyCodes: __webpack_require__(128), KeyCombo: __webpack_require__(244), @@ -104688,11 +105062,11 @@ module.exports = { File: __webpack_require__(18), FileTypesManager: __webpack_require__(7), - GetURL: __webpack_require__(146), + GetURL: __webpack_require__(147), LoaderPlugin: __webpack_require__(780), - MergeXHRSettings: __webpack_require__(147), - XHRLoader: __webpack_require__(314), - XHRSettings: __webpack_require__(90) + MergeXHRSettings: __webpack_require__(148), + XHRLoader: __webpack_require__(313), + XHRSettings: __webpack_require__(91) }; @@ -104738,12 +105112,12 @@ module.exports = { AnimationJSONFile: __webpack_require__(765), AtlasJSONFile: __webpack_require__(766), - AudioFile: __webpack_require__(315), + AudioFile: __webpack_require__(314), AudioSprite: __webpack_require__(767), BinaryFile: __webpack_require__(768), BitmapFontFile: __webpack_require__(769), GLSLFile: __webpack_require__(770), - HTML5AudioFile: __webpack_require__(316), + HTML5AudioFile: __webpack_require__(315), HTMLFile: __webpack_require__(771), ImageFile: __webpack_require__(57), JSONFile: __webpack_require__(56), @@ -104752,11 +105126,11 @@ module.exports = { ScriptFile: __webpack_require__(774), SpriteSheetFile: __webpack_require__(775), SVGFile: __webpack_require__(776), - TextFile: __webpack_require__(319), + TextFile: __webpack_require__(318), TilemapCSVFile: __webpack_require__(777), TilemapJSONFile: __webpack_require__(778), UnityAtlasFile: __webpack_require__(779), - XMLFile: __webpack_require__(317) + XMLFile: __webpack_require__(316) }; @@ -104931,7 +105305,7 @@ module.exports = AtlasJSONFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(315); +var AudioFile = __webpack_require__(314); var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(56); @@ -105113,7 +105487,7 @@ module.exports = BinaryFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var XMLFile = __webpack_require__(317); +var XMLFile = __webpack_require__(316); /** * An Bitmap Font File. @@ -105462,7 +105836,7 @@ module.exports = HTMLFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); var JSONFile = __webpack_require__(56); -var NumberArray = __webpack_require__(318); +var NumberArray = __webpack_require__(317); /** * Adds a Multi File Texture Atlas to the current load queue. @@ -106232,7 +106606,7 @@ module.exports = TilemapJSONFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var TextFile = __webpack_require__(319); +var TextFile = __webpack_require__(318); /** * An Atlas JSON File. @@ -106315,9 +106689,9 @@ var CustomSet = __webpack_require__(61); var EventEmitter = __webpack_require__(13); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(1); -var ParseXMLBitmapFont = __webpack_require__(267); +var ParseXMLBitmapFont = __webpack_require__(266); var PluginManager = __webpack_require__(11); -var XHRSettings = __webpack_require__(90); +var XHRSettings = __webpack_require__(91); /** * @classdesc @@ -107311,15 +107685,15 @@ var PhaserMath = { // Single functions Average: __webpack_require__(809), - Bernstein: __webpack_require__(321), + Bernstein: __webpack_require__(320), Between: __webpack_require__(226), - CatmullRom: __webpack_require__(121), + CatmullRom: __webpack_require__(123), CeilTo: __webpack_require__(810), Clamp: __webpack_require__(60), - DegToRad: __webpack_require__(35), + DegToRad: __webpack_require__(36), Difference: __webpack_require__(811), - Factorial: __webpack_require__(322), - FloatBetween: __webpack_require__(274), + Factorial: __webpack_require__(321), + FloatBetween: __webpack_require__(273), FloorTo: __webpack_require__(812), FromPercent: __webpack_require__(64), GetSpeed: __webpack_require__(813), @@ -107333,14 +107707,14 @@ var PhaserMath = { RandomXY: __webpack_require__(819), RandomXYZ: __webpack_require__(204), RandomXYZW: __webpack_require__(205), - Rotate: __webpack_require__(323), - RotateAround: __webpack_require__(182), - RotateAroundDistance: __webpack_require__(112), - RoundAwayFromZero: __webpack_require__(324), + Rotate: __webpack_require__(322), + RotateAround: __webpack_require__(183), + RotateAroundDistance: __webpack_require__(113), + RoundAwayFromZero: __webpack_require__(323), RoundTo: __webpack_require__(820), SinCosTableGenerator: __webpack_require__(821), - SmootherStep: __webpack_require__(189), - SmoothStep: __webpack_require__(190), + SmootherStep: __webpack_require__(190), + SmoothStep: __webpack_require__(191), TransformXY: __webpack_require__(248), Within: __webpack_require__(822), Wrap: __webpack_require__(42), @@ -107348,9 +107722,9 @@ var PhaserMath = { // Vector classes Vector2: __webpack_require__(6), Vector3: __webpack_require__(51), - Vector4: __webpack_require__(118), + Vector4: __webpack_require__(120), Matrix3: __webpack_require__(208), - Matrix4: __webpack_require__(117), + Matrix4: __webpack_require__(119), Quaternion: __webpack_require__(207), RotateVec3: __webpack_require__(206) @@ -107388,9 +107762,9 @@ module.exports = { Reverse: __webpack_require__(787), RotateTo: __webpack_require__(788), ShortestBetween: __webpack_require__(789), - Normalize: __webpack_require__(320), - Wrap: __webpack_require__(159), - WrapDegrees: __webpack_require__(160) + Normalize: __webpack_require__(319), + Wrap: __webpack_require__(160), + WrapDegrees: __webpack_require__(161) }; @@ -107525,7 +107899,7 @@ module.exports = BetweenPointsY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Normalize = __webpack_require__(320); +var Normalize = __webpack_require__(319); /** * [description] @@ -107765,18 +108139,18 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(275), - Bounce: __webpack_require__(276), - Circular: __webpack_require__(277), - Cubic: __webpack_require__(278), - Elastic: __webpack_require__(279), - Expo: __webpack_require__(280), - Linear: __webpack_require__(281), - Quadratic: __webpack_require__(282), - Quartic: __webpack_require__(283), - Quintic: __webpack_require__(284), - Sine: __webpack_require__(285), - Stepped: __webpack_require__(286) + Back: __webpack_require__(274), + Bounce: __webpack_require__(275), + Circular: __webpack_require__(276), + Cubic: __webpack_require__(277), + Elastic: __webpack_require__(278), + Expo: __webpack_require__(279), + Linear: __webpack_require__(280), + Quadratic: __webpack_require__(281), + Quartic: __webpack_require__(282), + Quintic: __webpack_require__(283), + Sine: __webpack_require__(284), + Stepped: __webpack_require__(285) }; @@ -107999,7 +108373,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bernstein = __webpack_require__(321); +var Bernstein = __webpack_require__(320); /** * [description] @@ -108038,7 +108412,7 @@ module.exports = BezierInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CatmullRom = __webpack_require__(121); +var CatmullRom = __webpack_require__(123); /** * [description] @@ -108101,8 +108475,8 @@ module.exports = CatmullRomInterpolation; module.exports = { - GetNext: __webpack_require__(289), - IsSize: __webpack_require__(124), + GetNext: __webpack_require__(288), + IsSize: __webpack_require__(126), IsValue: __webpack_require__(804) }; @@ -108791,15 +109165,15 @@ module.exports = Within; module.exports = { ArcadePhysics: __webpack_require__(824), - Body: __webpack_require__(331), - Collider: __webpack_require__(332), - Factory: __webpack_require__(325), - Group: __webpack_require__(328), - Image: __webpack_require__(326), - Sprite: __webpack_require__(91), - StaticBody: __webpack_require__(337), - StaticGroup: __webpack_require__(329), - World: __webpack_require__(330) + Body: __webpack_require__(330), + Collider: __webpack_require__(331), + Factory: __webpack_require__(324), + Group: __webpack_require__(327), + Image: __webpack_require__(325), + Sprite: __webpack_require__(92), + StaticBody: __webpack_require__(336), + StaticGroup: __webpack_require__(328), + World: __webpack_require__(329) }; @@ -108815,13 +109189,13 @@ module.exports = { */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(325); +var Factory = __webpack_require__(324); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(103); +var Merge = __webpack_require__(104); var PluginManager = __webpack_require__(11); -var World = __webpack_require__(330); +var World = __webpack_require__(329); var DistanceBetween = __webpack_require__(43); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); // All methods in this class are available under `this.physics` in a Scene. @@ -109739,18 +110113,16 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#enableBody * @since 3.0.0 * - * @param {[type]} reset - [description] - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} enableGameObject - [description] - * @param {[type]} showGameObject - [description] + * @param {boolean} reset - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {boolean} enableGameObject - [description] + * @param {boolean} showGameObject - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ enableBody: function (reset, x, y, enableGameObject, showGameObject) { - this.body.enable = true; - if (reset) { this.body.reset(x, y); @@ -109766,6 +110138,8 @@ var Enable = { this.body.gameObject.visible = true; } + this.body.enable = true; + return this; }, @@ -109775,10 +110149,10 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#disableBody * @since 3.0.0 * - * @param {[type]} disableGameObject - [description] - * @param {[type]} hideGameObject - [description] + * @param {boolean} [disableGameObject=false] - [description] + * @param {boolean} [hideGameObject=false] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ disableBody: function (disableGameObject, hideGameObject) { @@ -109799,6 +110173,24 @@ var Enable = { this.body.gameObject.visible = false; } + return this; + }, + + /** + * Syncs the Bodies position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + * + * @method Phaser.Physics.Arcade.Components.Enable#refreshBody + * @since 3.1.0 + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + refreshBody: function () + { + this.body.updateFromGameObject(); + return this; } @@ -110266,7 +110658,7 @@ module.exports = ProcessTileCallbacks; var TileCheckX = __webpack_require__(839); var TileCheckY = __webpack_require__(841); -var TileIntersectsBody = __webpack_require__(336); +var TileIntersectsBody = __webpack_require__(335); /** * The core separation function to separate a physics body and a tile. @@ -110967,7 +111359,7 @@ module.exports = { SceneManager: __webpack_require__(249), ScenePlugin: __webpack_require__(857), Settings: __webpack_require__(252), - Systems: __webpack_require__(127) + Systems: __webpack_require__(129) }; @@ -111553,10 +111945,10 @@ module.exports = { module.exports = { - List: __webpack_require__(129), - Map: __webpack_require__(113), - ProcessQueue: __webpack_require__(333), - RTree: __webpack_require__(334), + List: __webpack_require__(87), + Map: __webpack_require__(114), + ProcessQueue: __webpack_require__(332), + RTree: __webpack_require__(333), Set: __webpack_require__(61) }; @@ -111581,7 +111973,7 @@ module.exports = { Parsers: __webpack_require__(261), FilterMode: __webpack_require__(861), - Frame: __webpack_require__(128), + Frame: __webpack_require__(130), Texture: __webpack_require__(262), TextureManager: __webpack_require__(260), TextureSource: __webpack_require__(263) @@ -111644,24 +112036,24 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(96), + Components: __webpack_require__(97), Parsers: __webpack_require__(892), Formats: __webpack_require__(19), - ImageCollection: __webpack_require__(348), - ParseToTilemap: __webpack_require__(153), + ImageCollection: __webpack_require__(347), + ParseToTilemap: __webpack_require__(154), Tile: __webpack_require__(45), - Tilemap: __webpack_require__(352), + Tilemap: __webpack_require__(351), TilemapCreator: __webpack_require__(909), TilemapFactory: __webpack_require__(910), - Tileset: __webpack_require__(100), + Tileset: __webpack_require__(101), LayerData: __webpack_require__(75), MapData: __webpack_require__(76), - ObjectLayer: __webpack_require__(350), + ObjectLayer: __webpack_require__(349), - DynamicTilemapLayer: __webpack_require__(353), - StaticTilemapLayer: __webpack_require__(354) + DynamicTilemapLayer: __webpack_require__(352), + StaticTilemapLayer: __webpack_require__(353) }; @@ -111677,7 +112069,7 @@ module.exports = { */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -111741,10 +112133,10 @@ module.exports = Copy; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(98); -var TileToWorldY = __webpack_require__(99); +var TileToWorldX = __webpack_require__(99); +var TileToWorldY = __webpack_require__(100); var GetTilesWithin = __webpack_require__(15); -var ReplaceByIndex = __webpack_require__(341); +var ReplaceByIndex = __webpack_require__(340); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -111897,7 +112289,7 @@ module.exports = CullTiles; */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); var SetTileCollision = __webpack_require__(44); /** @@ -112177,7 +112569,7 @@ module.exports = ForEachTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(97); +var GetTileAt = __webpack_require__(98); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -112218,12 +112610,12 @@ module.exports = GetTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Geom = __webpack_require__(293); +var Geom = __webpack_require__(292); var GetTilesWithin = __webpack_require__(15); -var Intersects = __webpack_require__(294); +var Intersects = __webpack_require__(293); var NOOP = __webpack_require__(3); -var TileToWorldX = __webpack_require__(98); -var TileToWorldY = __webpack_require__(99); +var TileToWorldX = __webpack_require__(99); +var TileToWorldY = __webpack_require__(100); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -112369,7 +112761,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasTileAt = __webpack_require__(342); +var HasTileAt = __webpack_require__(341); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -112408,7 +112800,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PutTileAt = __webpack_require__(150); +var PutTileAt = __webpack_require__(151); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -112450,8 +112842,8 @@ module.exports = PutTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CalculateFacesWithin = __webpack_require__(34); -var PutTileAt = __webpack_require__(150); +var CalculateFacesWithin = __webpack_require__(35); +var PutTileAt = __webpack_require__(151); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -112515,7 +112907,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(15); -var GetRandomElement = __webpack_require__(137); +var GetRandomElement = __webpack_require__(138); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -112571,7 +112963,7 @@ module.exports = Randomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RemoveTileAt = __webpack_require__(343); +var RemoveTileAt = __webpack_require__(342); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -112699,8 +113091,8 @@ module.exports = RenderDebug; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(151); +var CalculateFacesWithin = __webpack_require__(35); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -112760,8 +113152,8 @@ module.exports = SetCollision; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(151); +var CalculateFacesWithin = __webpack_require__(35); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -112826,8 +113218,8 @@ module.exports = SetCollisionBetween; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(151); +var CalculateFacesWithin = __webpack_require__(35); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -112881,7 +113273,7 @@ module.exports = SetCollisionByExclusion; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); var HasValue = __webpack_require__(72); /** @@ -112955,7 +113347,7 @@ module.exports = SetCollisionByProperty; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -113195,8 +113587,8 @@ module.exports = SwapByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(98); -var TileToWorldY = __webpack_require__(99); +var TileToWorldX = __webpack_require__(99); +var TileToWorldY = __webpack_require__(100); var Vector2 = __webpack_require__(6); /** @@ -113368,12 +113760,12 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(344), - Parse2DArray: __webpack_require__(152), - ParseCSV: __webpack_require__(345), + Parse: __webpack_require__(343), + Parse2DArray: __webpack_require__(153), + ParseCSV: __webpack_require__(344), - Impact: __webpack_require__(351), - Tiled: __webpack_require__(346) + Impact: __webpack_require__(350), + Tiled: __webpack_require__(345) }; @@ -113391,7 +113783,7 @@ module.exports = { var Base64Decode = __webpack_require__(894); var GetFastValue = __webpack_require__(1); var LayerData = __webpack_require__(75); -var ParseGID = __webpack_require__(347); +var ParseGID = __webpack_require__(346); var Tile = __webpack_require__(45); /** @@ -113609,9 +114001,9 @@ module.exports = ParseImageLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(100); -var ImageCollection = __webpack_require__(348); -var ParseObject = __webpack_require__(349); +var Tileset = __webpack_require__(101); +var ImageCollection = __webpack_require__(347); +var ParseObject = __webpack_require__(348); /** * Tilesets & Image Collections @@ -113758,8 +114150,8 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(349); -var ObjectLayer = __webpack_require__(350); +var ParseObject = __webpack_require__(348); +var ObjectLayer = __webpack_require__(349); /** * [description] @@ -114046,7 +114438,7 @@ module.exports = ParseTileLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(100); +var Tileset = __webpack_require__(101); /** * [description] @@ -114407,7 +114799,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(14); -var ParseToTilemap = __webpack_require__(153); +var ParseToTilemap = __webpack_require__(154); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -114467,7 +114859,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(9); -var ParseToTilemap = __webpack_require__(153); +var ParseToTilemap = __webpack_require__(154); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -114539,7 +114931,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { Clock: __webpack_require__(912), - TimerEvent: __webpack_require__(355) + TimerEvent: __webpack_require__(354) }; @@ -114556,7 +114948,7 @@ module.exports = { var Class = __webpack_require__(0); var PluginManager = __webpack_require__(11); -var TimerEvent = __webpack_require__(355); +var TimerEvent = __webpack_require__(354); /** * @classdesc @@ -114931,9 +115323,9 @@ module.exports = { Builders: __webpack_require__(914), TweenManager: __webpack_require__(916), - Tween: __webpack_require__(157), - TweenData: __webpack_require__(158), - Timeline: __webpack_require__(360) + Tween: __webpack_require__(158), + TweenData: __webpack_require__(159), + Timeline: __webpack_require__(359) }; @@ -114956,14 +115348,14 @@ module.exports = { GetBoolean: __webpack_require__(73), GetEaseFunction: __webpack_require__(71), - GetNewValue: __webpack_require__(101), - GetProps: __webpack_require__(356), - GetTargets: __webpack_require__(154), - GetTweens: __webpack_require__(357), - GetValueOp: __webpack_require__(155), - NumberTweenBuilder: __webpack_require__(358), - TimelineBuilder: __webpack_require__(359), - TweenBuilder: __webpack_require__(102), + GetNewValue: __webpack_require__(102), + GetProps: __webpack_require__(355), + GetTargets: __webpack_require__(155), + GetTweens: __webpack_require__(356), + GetValueOp: __webpack_require__(156), + NumberTweenBuilder: __webpack_require__(357), + TimelineBuilder: __webpack_require__(358), + TweenBuilder: __webpack_require__(103), }; @@ -115051,11 +115443,11 @@ module.exports = [ */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(358); +var NumberTweenBuilder = __webpack_require__(357); var PluginManager = __webpack_require__(11); -var TimelineBuilder = __webpack_require__(359); -var TWEEN_CONST = __webpack_require__(87); -var TweenBuilder = __webpack_require__(102); +var TimelineBuilder = __webpack_require__(358); +var TWEEN_CONST = __webpack_require__(88); +var TweenBuilder = __webpack_require__(103); // Phaser.Tweens.TweenManager @@ -115734,16 +116126,16 @@ module.exports = { module.exports = { FindClosestInSorted: __webpack_require__(919), - GetRandomElement: __webpack_require__(137), - NumberArray: __webpack_require__(318), + GetRandomElement: __webpack_require__(138), + NumberArray: __webpack_require__(317), NumberArrayStep: __webpack_require__(920), - QuickSelect: __webpack_require__(335), - Range: __webpack_require__(273), + QuickSelect: __webpack_require__(334), + Range: __webpack_require__(272), RemoveRandomElement: __webpack_require__(921), - RotateLeft: __webpack_require__(186), - RotateRight: __webpack_require__(187), + RotateLeft: __webpack_require__(187), + RotateRight: __webpack_require__(188), Shuffle: __webpack_require__(80), - SpliceOne: __webpack_require__(361) + SpliceOne: __webpack_require__(360) }; @@ -115806,7 +116198,7 @@ module.exports = FindClosestInSorted; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(324); +var RoundAwayFromZero = __webpack_require__(323); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -115883,7 +116275,7 @@ module.exports = NumberArrayStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SpliceOne = __webpack_require__(361); +var SpliceOne = __webpack_require__(360); /** * Removes a random object from the given array and returns it. @@ -115934,10 +116326,10 @@ module.exports = { GetMinMaxValue: __webpack_require__(923), GetValue: __webpack_require__(4), HasAll: __webpack_require__(924), - HasAny: __webpack_require__(287), + HasAny: __webpack_require__(286), HasValue: __webpack_require__(72), - IsPlainObject: __webpack_require__(164), - Merge: __webpack_require__(103), + IsPlainObject: __webpack_require__(165), + Merge: __webpack_require__(104), MergeRight: __webpack_require__(925) }; @@ -116079,7 +116471,7 @@ module.exports = MergeRight; module.exports = { Format: __webpack_require__(927), - Pad: __webpack_require__(194), + Pad: __webpack_require__(195), Reverse: __webpack_require__(928), UppercaseFirst: __webpack_require__(251) @@ -116222,7 +116614,7 @@ module.exports = ReverseString; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(364); +__webpack_require__(363); var CONST = __webpack_require__(22); var Extend = __webpack_require__(23); @@ -116233,20 +116625,20 @@ var Extend = __webpack_require__(23); var Phaser = { - Actions: __webpack_require__(165), - Animation: __webpack_require__(435), - Cache: __webpack_require__(436), - Cameras: __webpack_require__(437), + Actions: __webpack_require__(166), + Animation: __webpack_require__(434), + Cache: __webpack_require__(435), + Cameras: __webpack_require__(436), Class: __webpack_require__(0), - Create: __webpack_require__(448), - Curves: __webpack_require__(454), - Data: __webpack_require__(457), - Display: __webpack_require__(459), - DOM: __webpack_require__(492), - EventEmitter: __webpack_require__(494), - Game: __webpack_require__(495), - GameObjects: __webpack_require__(540), - Geom: __webpack_require__(293), + Create: __webpack_require__(447), + Curves: __webpack_require__(453), + Data: __webpack_require__(456), + Display: __webpack_require__(458), + DOM: __webpack_require__(491), + EventEmitter: __webpack_require__(493), + Game: __webpack_require__(494), + GameObjects: __webpack_require__(539), + Geom: __webpack_require__(292), Input: __webpack_require__(749), Loader: __webpack_require__(763), Math: __webpack_require__(781), @@ -116281,7 +116673,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 6e7188e1a..42763fcc0 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()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=989)}([function(t,e){function i(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){var o=(l=e,c=r,f=void 0,p=void 0,p=(d=i)?l[c]:Object.getOwnPropertyDescriptor(l,c),!d&&p.value&&"object"==typeof p.value&&(p=p.value),!!(p&&(f=p,f.get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===p.enumerable&&(p.enumerable=!0),void 0===p.configurable&&(p.configurable=!0),p));if(!1!==o){if(a=(n||t).prototype,h=r,u=void 0,(u=Object.getOwnPropertyDescriptor(a,h))&&(u.value&&"object"==typeof u.value&&(u=u.value),!1===u.configurable)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var a,h,u,l,c,d,f,p}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(181),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,u=null,l=null,c=s(t,e,i,r,null,o),d=0;d>>0},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){for(var e=0,i=0;ithis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return this.getLeft(t)+this.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],u=s[4],l=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+y)*w,this.y=(e*o+i*l+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,v=(d*c-l*f)*g,y=(u*f-l*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(308),o=i(309),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.values.forEach(function(t){e.add(t)}),this.entries.forEach(function(t){e.add(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.add(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.add(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(178),o=i(179),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(120),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(493))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(165),s=i(0),r=i(1),o=i(4),a=i(273),h=i(61),u=i(37),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(37),o=i(6),a=i(118),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=i(0),s=i(38),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes)},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(t,e){return this},onPostRender:function(){return this},flush:function(){var t=this.gl,e=this.vertexCount,i=(this.vertexBuffer,this.vertexData,this.topology),n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration,config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0):(console.error("addMarker - Marker has to have a valid name!"),!1):(console.error("addMarker - Marker object has to be provided!"),!1)},updateMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1):(console.error("updateMarker - Marker has to have a valid name!"),!1):(console.error("updateMarker - Marker object has to be provided!"),!1)},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):(console.error("removeMarker - Marker with name '"+e.name+"' does not exist for sound '"+this.key+"'!"),null)},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(645),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(327),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},,,,,function(t,e,i){t.exports={CalculateFacesAt:i(149),CalculateFacesWithin:i(34),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(97),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(342),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(150),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(343),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(341),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(98),TileToWorldXY:i(889),TileToWorldY:i(99),WeightedRandomize:i(890),WorldToTileX:i(40),WorldToTileXY:i(891),WorldToTileY:i(41)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(84),r=i(526),o=i(527),a=i(231),h=i(252),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(266),a=i(542),h=i(543),u=i(544),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(547),s=i(550),r=i(0),o=i(12),a=i(264),h=i(128),u=i(2),l=new r({Extends:u,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){u.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new a,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof h||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=l},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(266),a=i(551),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(0),s=i(125),r=i(12),o=i(268),a=i(2),h=i(4),u=i(16),l=i(563),c=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Pipeline,r.Transform,r.Visible,r.ScrollFactor,l],initialize:function(t,e){var i=h(e,"x",0),n=h(e,"y",0);a.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return h(t,"lineStyle",null)&&(this.defaultStrokeWidth=h(t,"lineStyle.width",1),this.defaultStrokeColor=h(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(t,"fillStyle",null)&&(this.defaultFillColor=h(t,"fillStyle.color",16777215),this.defaultFillAlpha=h(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(s.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(s.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(s.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(s.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(s.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(s.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(s.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(s.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.FILL_TRIANGLE,t,e,i,n,r,o),this},strokeTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.STROKE_TRIANGLE,t,e,i,n,r,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(s.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(s.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(s.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(s.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),c.TargetCamera.setViewport(0,0,e,i),c.TargetCamera.scrollX=this.x,c.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,c.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});t.exports=c},function(t,e,i){var n=i(0),s=i(68),r=i(269),o=i(270),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(568),a=i(129),h=i(569),u=i(608),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;su){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var y=l[c].length?c:c+1,m=l.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h]+" ")}r0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(u[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(u[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&l(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(289),h=i(617),u=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,u){var l=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=l,this.setTexture(h,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT,gl.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=l*l+c*c,g=l*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,w=t.y1,b=0;b=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this.emit("pause",this),this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.manager.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this.emit("resume",this),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration)r=1,o=s.duration;else if(n>s.delay&&n<=s.t1)r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r;else if(n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)}s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-180,180)}},,,function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(374),Call:i(375),GetFirst:i(376),GridAlign:i(377),IncAlpha:i(394),IncX:i(395),IncXY:i(396),IncY:i(397),PlaceOnCircle:i(398),PlaceOnEllipse:i(399),PlaceOnLine:i(400),PlaceOnRectangle:i(401),PlaceOnTriangle:i(402),PlayAnimation:i(403),RandomCircle:i(404),RandomEllipse:i(405),RandomLine:i(406),RandomRectangle:i(407),RandomTriangle:i(408),Rotate:i(409),RotateAround:i(410),RotateAroundDistance:i(411),ScaleX:i(412),ScaleXY:i(413),ScaleY:i(414),SetAlpha:i(415),SetBlendMode:i(416),SetDepth:i(417),SetHitArea:i(418),SetOrigin:i(419),SetRotation:i(420),SetScale:i(421),SetScaleX:i(422),SetScaleY:i(423),SetTint:i(424),SetVisible:i(425),SetX:i(426),SetXY:i(427),SetY:i(428),ShiftPosition:i(429),Shuffle:i(430),SmootherStep:i(431),SmoothStep:i(432),Spread:i(433),ToggleVisible:i(434)}},function(t,e,i){var n=i(167),s=[];s[n.BOTTOM_CENTER]=i(168),s[n.BOTTOM_LEFT]=i(169),s[n.BOTTOM_RIGHT]=i(170),s[n.CENTER]=i(171),s[n.LEFT_CENTER]=i(173),s[n.RIGHT_CENTER]=i(174),s[n.TOP_CENTER]=i(175),s[n.TOP_LEFT]=i(176),s[n.TOP_RIGHT]=i(177);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(47),r=i(25),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(172),s=i(47),r=i(50);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(48),s=i(49);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(50),s=i(26),r=i(49),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(50),s=i(28),r=i(49),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(47),s=i(30),r=i(48),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(180),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=u),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=u[0],u[0].prevFrame=o;var v=1/(u.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(191),s=i(0),r=i(113),o=i(13),a=i(4),h=i(194),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(195),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e-y||T>-m||b-y||S>-m||A-y||T>-m||b-y||S>-m||A-v&&S*n+C*r+h>-y&&(S+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],u=n[4],l=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*l-a*u)*c,y=(r*u-s*l)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,b=this.scrollX,T=this.scrollY,A=t+(b*m-T*x)*w,S=e+(b*x+T*m)*w;return i.x=A*d+S*p+v,i.y=A*f+S*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;el&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom)}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=u},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e,i){var n=i(36),s=i(201);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(117),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*u,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*u,e[5]=g*s+v*a+y*l,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*u,e[8]=m*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=u+v,y[6]=l-g,y[1]=u-v,y[4]=1-(h+f),y[7]=d+p,y[2]=l+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,A=s*l-o*h,S=r*l-o*u,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,L=d*m-p*v,P=f*m-p*y,F=x*P-w*L+b*_+T*E-A*M+S*C;return F?(F=1/F,i[0]=(h*P-u*L+l*_)*F,i[1]=(u*E-a*P-l*M)*F,i[2]=(a*L-h*E+l*C)*F,i[3]=(r*L-s*P-o*_)*F,i[4]=(n*P-r*E+o*M)*F,i[5]=(s*E-n*L-o*C)*F,i[6]=(v*S-y*A+m*T)*F,i[7]=(y*b-g*S-m*w)*F,i[8]=(g*A-v*b+m*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(116),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(116),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(483)(t))},function(t,e,i){var n=i(115);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u={r:i=Math.floor(i*=255),g:i,b:i,color:0},l=s%6;return 0===l?(u.g=h,u.b=o):1===l?(u.r=a,u.b=o):2===l?(u.r=o,u.b=h):3===l?(u.r=o,u.g=a):4===l?(u.r=h,u.g=o):5===l&&(u.g=o,u.b=a),u.color=n(u.r,u.g,u.b),u}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===S(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h,u,l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&(u=c,(h=l).next.i!==u.i&&h.prev.i!==u.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,u)&&x(h,u)&&x(u,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,u))){var d=w(l,c);return l=r(l,l.next),d=r(d,d.next),o(l,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=l&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function w(t,e){var i=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),u=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix;let r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(511),r=i(236),o=(i(38),i(83),new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;for(var n=this.renderer,s=this.program,r=t.lights.cull(e),o=Math.min(r.length,10),a=e.matrix,h={x:0,y:0},u=n.height,l=0;l<10;++l)n.setFloat1(s,"uLights["+l+"].radius",0);if(o<=0)return this;n.setFloat4(s,"uCamera",e.x,e.y,e.rotation,e.zoom),n.setFloat3(s,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b);for(l=0;l0){var i=this.vertexBuffer,n=this.gl,s=this.renderer,r=t.tileset.image.get();s.currentPipeline&&s.currentPipeline.vertexCount>0&&s.flush(),this.vertexBuffer=t.vertexBuffer,s.setTexture2D(r.source.glTexture,0),s.setPipeline(this),n.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=i}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=(a.getTintAppendFloatAlpha,this.vertexViewF32),r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,u=o.config.resolution,l=this.maxQuads,c=e.scrollX,d=e.scrollY,f=e.matrix.matrix,p=f[0],g=f[1],v=f[2],y=f[3],m=f[4],x=f[5],w=Math.sin,b=Math.cos,T=this.vertexComponentCount,A=this.vertexCapacity;o.setTexture2D(t.defaultFrame.source.glTexture,0);for(var S=0;S0&&this.flush();for(var k=0;k<_;++k){for(var R=Math.min(E,l),O=0,D=0;D=A&&this.flush()}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=this.renderer,o=e.roundPixels,h=r.config.resolution,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),b=0,T=t.x-m,A=t.y-x,S=0;Sthis.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,u=o.config.resolution,l=e.matrix.matrix,c=t.frame,d=c.texture.source[c.sourceIndex].glTexture,f=!!d.isRenderTexture,p=t.flipX,g=t.flipY^f,v=c.uvs,y=c.width*(p?-1:1),m=c.height*(g?-1:1),x=-t.displayOriginX+c.x+c.width*(p?1:0),w=-t.displayOriginY+c.y+c.height*(g?1:0),b=x+y,T=w+m,A=t.x-e.scrollX*t.scrollFactorX,S=t.y-e.scrollY*t.scrollFactorY,C=t.scaleX,M=t.scaleY,E=-t.rotation,_=t._alphaTL,L=t._alphaTR,P=t._alphaBL,F=t._alphaBR,k=t._tintTL,R=t._tintTR,O=t._tintBL,D=t._tintBR,I=Math.sin(E),B=Math.cos(E),Y=B*C,X=-I*C,z=I*M,N=B*M,W=A,G=S,U=l[0],V=l[1],H=l[2],j=l[3],q=Y*U+X*H,K=Y*V+X*j,J=z*U+N*H,Z=z*V+N*j,Q=W*U+G*H+l[4],$=W*V+G*j+l[5],tt=x*q+w*J+Q,et=x*K+w*Z+$,it=x*q+T*J+Q,nt=x*K+T*Z+$,st=b*q+T*J+Q,rt=b*K+T*Z+$,ot=b*q+w*J+Q,at=b*K+w*Z+$,ht=n(k,_),ut=n(R,L),lt=n(O,P),ct=n(D,F);o.setTexture2D(d,0),i=this.vertexCount*this.vertexComponentCount,h&&(tt=(tt*u|0)/u,et=(et*u|0)/u,it=(it*u|0)/u,nt=(nt*u|0)/u,st=(st*u|0)/u,rt=(rt*u|0)/u,ot=(ot*u|0)/u,at=(at*u|0)/u),s[i+0]=tt,s[i+1]=et,s[i+2]=v.x0,s[i+3]=v.y0,r[i+4]=ht,s[i+5]=it,s[i+6]=nt,s[i+7]=v.x1,s[i+8]=v.y1,r[i+9]=ut,s[i+10]=st,s[i+11]=rt,s[i+12]=v.x2,s[i+13]=v.y2,r[i+14]=lt,s[i+15]=tt,s[i+16]=et,s[i+17]=v.x0,s[i+18]=v.y0,r[i+19]=ht,s[i+20]=st,s[i+21]=rt,s[i+22]=v.x2,s[i+23]=v.y2,r[i+24]=lt,s[i+25]=ot,s[i+26]=at,s[i+27]=v.x3,s[i+28]=v.y3,r[i+29]=ct,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,u=t.alphas,l=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=e.roundPixels,p=d.config.resolution,g=e.matrix.matrix,v=(g[0],g[1],g[2],g[3],g[4],g[5],t.frame),y=t.texture.source[v.sourceIndex].glTexture,m=t.x-e.scrollX*t.scrollFactorX,x=t.y-e.scrollY*t.scrollFactorY,w=t.scaleX,b=t.scaleY,T=-t.rotation,A=Math.sin(T),S=Math.cos(T),C=S*w,M=-A*w,E=A*b,_=S*b,L=m,P=x,F=g[0],k=g[1],R=g[2],O=g[3],D=C*F+M*R,I=C*k+M*O,B=E*F+_*R,Y=E*k+_*O,X=L*F+P*R+g[4],z=L*k+P*O+g[5],N=0;d.setTexture2D(y,0),N=this.vertexCount*this.vertexComponentCount;for(var W=0,G=0;Wthis.vertexCapacity&&this.flush();var i=t.text,n=i.length,s=a.getTintAppendFloatAlpha,r=this.vertexViewF32,o=this.vertexViewU32,h=this.renderer,u=e.roundPixels,l=h.config.resolution,c=e.matrix.matrix,d=e.width+50,f=e.height+50,p=t.frame,g=t.texture.source[p.sourceIndex],v=e.scrollX*t.scrollFactorX,y=e.scrollY*t.scrollFactorY,m=t.fontData,x=m.lineHeight,w=t.fontSize/m.size,b=m.chars,T=t.alpha,A=s(t._tintTL,T),S=s(t._tintTR,T),C=s(t._tintBL,T),M=s(t._tintBR,T),E=t.x,_=t.y,L=p.cutX,P=p.cutY,F=g.width,k=g.height,R=g.glTexture,O=0,D=0,I=0,B=0,Y=null,X=0,z=0,N=0,W=0,G=0,U=0,V=0,H=0,j=0,q=0,K=0,J=0,Z=null,Q=0,$=E-v+p.x,tt=_-y+p.y,et=-t.rotation,it=t.scaleX,nt=t.scaleY,st=Math.sin(et),rt=Math.cos(et),ot=rt*it,at=-st*it,ht=st*nt,ut=rt*nt,lt=$,ct=tt,dt=c[0],ft=c[1],pt=c[2],gt=c[3],vt=ot*dt+at*pt,yt=ot*ft+at*gt,mt=ht*dt+ut*pt,xt=ht*ft+ut*gt,wt=lt*dt+ct*pt+c[4],bt=lt*ft+ct*gt+c[5],Tt=0;h.setTexture2D(R,0);for(var At=0;Atd||ty0<-50||ty0>f)&&(tx1<-50||tx1>d||ty1<-50||ty1>f)&&(tx2<-50||tx2>d||ty2<-50||ty2>f)&&(tx3<-50||tx3>d||ty3<-50||ty3>f)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Tt=this.vertexCount*this.vertexComponentCount,u&&(tx0=(tx0*l|0)/l,ty0=(ty0*l|0)/l,tx1=(tx1*l|0)/l,ty1=(ty1*l|0)/l,tx2=(tx2*l|0)/l,ty2=(ty2*l|0)/l,tx3=(tx3*l|0)/l,ty3=(ty3*l|0)/l),r[Tt+0]=tx0,r[Tt+1]=ty0,r[Tt+2]=j,r[Tt+3]=K,o[Tt+4]=A,r[Tt+5]=tx1,r[Tt+6]=ty1,r[Tt+7]=j,r[Tt+8]=J,o[Tt+9]=S,r[Tt+10]=tx2,r[Tt+11]=ty2,r[Tt+12]=q,r[Tt+13]=J,o[Tt+14]=C,r[Tt+15]=tx0,r[Tt+16]=ty0,r[Tt+17]=j,r[Tt+18]=K,o[Tt+19]=A,r[Tt+20]=tx2,r[Tt+21]=ty2,r[Tt+22]=q,r[Tt+23]=J,o[Tt+24]=C,r[Tt+25]=tx3,r[Tt+26]=ty3,r[Tt+27]=q,r[Tt+28]=K,o[Tt+29]=M,this.vertexCount+=6))}}else O=0,I=0,D+=x,Z=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,u=t.displayCallback,l=t.text,c=l.length,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=this.renderer,v=e.roundPixels,y=g.config.resolution,m=e.matrix.matrix,x=t.frame,w=t.texture.source[x.sourceIndex],b=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,A=t.scrollX,S=t.scrollY,C=t.fontData,M=C.lineHeight,E=t.fontSize/C.size,_=C.chars,L=t.alpha,P=d(t._tintTL,L),F=d(t._tintTR,L),k=d(t._tintBL,L),R=d(t._tintBR,L),O=t.x,D=t.y,I=x.cutX,B=x.cutY,Y=w.width,X=w.height,z=w.glTexture,N=0,W=0,G=0,U=0,V=null,H=0,j=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=null,rt=0,ot=O+x.x,at=D+x.y,ht=-t.rotation,ut=t.scaleX,lt=t.scaleY,ct=Math.sin(ht),dt=Math.cos(ht),ft=dt*ut,pt=-ct*ut,gt=ct*lt,vt=dt*lt,yt=ot,mt=at,xt=m[0],wt=m[1],bt=m[2],Tt=m[3],At=ft*xt+pt*bt,St=ft*wt+pt*Tt,Ct=gt*xt+vt*bt,Mt=gt*wt+vt*Tt,Et=yt*xt+mt*bt+m[4],_t=yt*wt+mt*Tt+m[5],Lt=t.cropWidth>0||t.cropHeight>0,Pt=0;g.setTexture2D(z,0),Lt&&g.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Ft=0;Ftthis.vertexCapacity&&this.flush(),Pt=this.vertexCount*this.vertexComponentCount,v&&(tx0=(tx0*y|0)/y,ty0=(ty0*y|0)/y,tx1=(tx1*y|0)/y,ty1=(ty1*y|0)/y,tx2=(tx2*y|0)/y,ty2=(ty2*y|0)/y,tx3=(tx3*y|0)/y,ty3=(ty3*y|0)/y),f[Pt+0]=tx0,f[Pt+1]=ty0,f[Pt+2]=tt,f[Pt+3]=it,p[Pt+4]=P,f[Pt+5]=tx1,f[Pt+6]=ty1,f[Pt+7]=tt,f[Pt+8]=nt,p[Pt+9]=F,f[Pt+10]=tx2,f[Pt+11]=ty2,f[Pt+12]=et,f[Pt+13]=nt,p[Pt+14]=k,f[Pt+15]=tx0,f[Pt+16]=ty0,f[Pt+17]=tt,f[Pt+18]=it,p[Pt+19]=P,f[Pt+20]=tx2,f[Pt+21]=ty2,f[Pt+22]=et,f[Pt+23]=nt,p[Pt+24]=k,f[Pt+25]=tx3,f[Pt+26]=ty3,f[Pt+27]=et,f[Pt+28]=it,p[Pt+29]=R,this.vertexCount+=6}}}else N=0,G=0,W+=M,st=null;Lt&&g.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,u=t.alpha,l=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),f^=e.isRenderTexture?1:0,c=-c;a.getTintAppendFloatAlpha;var L,P=this.vertexViewF32,F=this.vertexViewU32,k=this.renderer,R=_.roundPixels,O=k.config.resolution,D=_.matrix.matrix,I=o*(d?1:0)-v,B=h*(f?1:0)-y,Y=I+o*(d?-1:1),X=B+h*(f?-1:1),z=s-_.scrollX*p,N=r-_.scrollY*g,W=Math.sin(c),G=Math.cos(c),U=G*u,V=-W*u,H=W*l,j=G*l,q=z,K=N,J=D[0],Z=D[1],Q=D[2],$=D[3],tt=U*J+V*Q,et=U*Z+V*$,it=H*J+j*Q,nt=H*Z+j*$,st=q*J+K*Q+D[4],rt=q*Z+K*$+D[5],ot=I*tt+B*it+st,at=I*et+B*nt+rt,ht=I*tt+X*it+st,ut=I*et+X*nt+rt,lt=Y*tt+X*it+st,ct=Y*et+X*nt+rt,dt=Y*tt+B*it+st,ft=Y*et+B*nt+rt,pt=m/i+M,gt=x/n+E,vt=(m+w)/i+M,yt=(x+b)/n+E;k.setTexture2D(e,0),L=this.vertexCount*this.vertexComponentCount,R&&(ot=(ot*O|0)/O,at=(at*O|0)/O,ht=(ht*O|0)/O,ut=(ut*O|0)/O,lt=(lt*O|0)/O,ct=(ct*O|0)/O,dt=(dt*O|0)/O,ft=(ft*O|0)/O),P[L+0]=ot,P[L+1]=at,P[L+2]=pt,P[L+3]=gt,F[L+4]=T,P[L+5]=ht,P[L+6]=ut,P[L+7]=pt,P[L+8]=yt,F[L+9]=A,P[L+10]=lt,P[L+11]=ct,P[L+12]=vt,P[L+13]=yt,F[L+14]=S,P[L+15]=ot,P[L+16]=at,P[L+17]=pt,P[L+18]=gt,F[L+19]=T,P[L+20]=lt,P[L+21]=ct,P[L+22]=vt,P[L+23]=yt,F[L+24]=S,P[L+25]=dt,P[L+26]=ft,P[L+27]=vt,P[L+28]=gt,F[L+29]=C,this.vertexCount+=6},batchGraphics:function(t,e){}});t.exports=u},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),u=i(8),l=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=0;l0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(126),a=i(244),h=i(523),u=i(524),l=i(525),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=i(0),s=i(127),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(84),s=i(4),r=i(528),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(){return!1},playAudioSprite:function(){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(86),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(){return!1},updateMarker:function(){return!1},removeMarker:function(){return null},play:function(){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(85),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){s.prototype.destroy.call(this),this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.context.suspend(),this.context=null}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(86),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var A=y+g-s,S=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,l=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,w=0,b=1,T=0,A=0,S=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(l-h,c-u),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,A=(65280&x)>>>8,S=255&x,v.strokeStyle="rgba("+T+","+A+","+S+","+y+")",v.lineWidth=b,C+=3;break;case n.FILL_STYLE:w=g[C+1],m=g[C+2],T=(16711680&w)>>>16,A=(65280&w)>>>8,S=255&w,v.fillStyle="rgba("+T+","+A+","+S+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+E)}}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(38),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(291),r=i(235),o=i(38),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(653),Ellipse:i(268),Intersects:i(294),Line:i(673),Point:i(691),Polygon:i(705),Rectangle:i(306),Triangle:i(734)}},function(t,e,i){t.exports={CircleToCircle:i(663),CircleToRectangle:i(664),GetRectangleIntersection:i(665),LineToCircle:i(296),LineToLine:i(89),LineToRectangle:i(666),PointToLine:i(297),PointToLineSegment:i(667),RectangleToRectangle:i(295),RectangleToTriangle:i(668),RectangleToValues:i(669),TriangleToCircle:i(670),TriangleToLine:i(671),TriangleToTriangle:i(672)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=r*r+o*o,l=r,c=o;if(u>0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(301),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(42),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(143),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),d=u+l+c;e||(e=d/i);for(var f=0;fu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(147);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(316),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return console.info("Skipping loading audio '"+e+"' since sounds are disabled."),null;var l=u.findAudioURL(r,i);return l?!a.webAudio||o&&o.disableWebAudio?new h(e,l,t.path,n,r.sound.locked):new u(e,l,t.path,s,r.sound.context):(console.warn("No supported url provided for audio '"+e+"'!"),null)},o.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(322);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(326),s=i(91),r=i(0),o=i(58),a=i(328),h=i(329),u=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=u},function(t,e,i){var n=i(0),s=i(327),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(825),Angular:i(826),Bounce:i(827),Debug:i(828),Drag:i(829),Enable:i(830),Friction:i(831),Gravity:i(832),Immovable:i(833),Mass:i(834),Size:i(835),Velocity:i(836)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(l.x,l.y,u.right,u.y)-l.radius):l.y>u.bottom&&(l.xu.right&&(a=h(l.x,l.y,u.right,u.bottom)-l.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,f=t.mass,p=e.velocity.x,g=e.velocity.y,v=e.mass,y=c*Math.cos(o)+d*Math.sin(o),m=c*Math.sin(o)-d*Math.cos(o),x=p*Math.cos(o)+g*Math.sin(o),w=p*Math.sin(o)-g*Math.cos(o),b=((f-v)*y+2*v*x)/(f+v),T=(2*f*y+(v-f)*x)/(f+v);return t.immovable||(t.velocity.x=(b*Math.cos(o)-m*Math.sin(o))*t.bounce.x,t.velocity.y=(m*Math.cos(o)+b*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(T*Math.cos(o)-w*Math.sin(o))*e.bounce.x,e.velocity.y=(w*Math.cos(o)+T*Math.sin(o))*e.bounce.y,p=e.velocity.x,g=e.velocity.y),Math.abs(o)0&&!t.immovable&&p>c?t.velocity.x*=-1:p<0&&!e.immovable&&c0&&!t.immovable&&g>d?t.velocity.y*=-1:g<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&p0&&!e.immovable&&c>p?e.velocity.x*=-1:d<0&&!t.immovable&&g0&&!e.immovable&&c>g&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){if(0!==e.length){var o=t.body,h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,u+=f}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p,v=e.getTilesWithinWorldXY(a,h,u,l);if(0===v.length)return!1;for(var y={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;this.position.x=t-i.displayOriginX+i.scaleX*this.offset.x,this.position.y=e-i.displayOriginY+i.scaleY*this.offset.y,this.prev.x=this.position.x,this.prev.y=this.position.y,this.rotation=this.gameObject.angle,this.preRotation=this.rotation,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.gameObject.body=null,this.gameObject=null},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,u,l,d,f,p,g,v,y,m;for(u=l=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(8),a=i(33),h=i(6),u=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new h,this.position=new h(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.width,this.height=e.height,this.sourceWidth=e.width,this.sourceHeight=e.height,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(e.width/2),this.halfHeight=Math.abs(e.height/2),this.center=new h(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new h,this.allowGravity=!1,this.gravity=new h,this.bounce=new h,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.moves=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._bounds=new o},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.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.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),this.position.x=t-i.displayOriginX+i.scaleX*this.offset.x,this.position.y=e-i.displayOriginY+i.scaleY*this.offset.y,this.rotation=this.gameObject.angle,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.gameObject.body=null,this.gameObject=null},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t,this.world.staticTree.remove(this),this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t,this.world.staticTree.remove(this),this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},,,,function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u-1}return!1}},function(t,e,i){var n=i(45),s=i(74),r=i(149);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(152),r=i(345),o=i(346),a=i(351);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,u,l);break;case n.CSV:c=r(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(152);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),u=i(899),l=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=u(c),l(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(35),r=i(353),o=i(23),a=i(19),h=i(75),u=i(323),l=i(354),c=i(45),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[u])return this.tilesets[u].setTileSize(i,n),this.tilesets[u].setSpacing(s,r),this.tilesets[u].setImage(h),this.tilesets[u];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var l=new f(t,o,i,n,s,r);return l.setImage(h),this.tilesets.push(l),l},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new l(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,u){if(void 0===a&&(a=e.tileWidth),void 0===u&&(u=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var l,d=new h({name:t,tileWidth:a,tileHeight:u,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(156),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),u=i(155),l=i(157),c=i(158);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),A=[],S=u("value",f),C=c(p[0],"value",S.getEnd,S.getStart,m,g,v,T,x,w,b,!1,!1);C.start=d,C.current=d,C.to=f,A.push(C);var M=new l(t,A,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],L=l.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},,function(t,e,i){i(365),i(366),i(367),i(368),i(369),i(370),i(371),i(372),i(373)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(182),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(159),r=i(160),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(197),CameraManager:i(442)}},function(t,e,i){var n=i(197),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new l(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;r=s(u,h,t+1/3),o=s(u,h,t),a=s(u,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,s,u),g:n(e,r,u),b:n(i,o,u)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(46),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(124),o=i(38),a=i(504),h=i(505),u=i(508),l=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null};for(var n=0;n<=16;n++)this.blendModes.push({func:[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],equation:WebGLRenderingContext.FUNC_ADD});this.blendModes[1].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.DST_ALPHA],this.blendModes[2].func=[WebGLRenderingContext.DST_COLOR,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_COLOR],this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this},deleteFramebuffer:function(t){return this},deleteProgram:function(t){return this},deleteBuffer:function(t){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){this.gl;var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;uthis.vertexCapacity&&this.flush();var w=this.renderer.config.resolution,b=this.vertexViewF32,T=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,S=r+a,C=o+h,M=m[0],E=m[1],_=m[2],L=m[3],P=d*M+f*_,F=d*E+f*L,k=p*M+g*_,R=p*E+g*L,O=v*M+y*_+m[4],D=v*E+y*L+m[5],I=r*P+o*k+O,B=r*F+o*R+D,Y=r*P+C*k+O,X=r*F+C*R+D,z=S*P+C*k+O,N=S*F+C*R+D,W=S*P+o*k+O,G=S*F+o*R+D,U=u.getTintAppendFloatAlphaAndSwap(l,c);x&&(I=(I*w|0)/w,B=(B*w|0)/w,Y=(Y*w|0)/w,X=(X*w|0)/w,z=(z*w|0)/w,N=(N*w|0)/w,W=(W*w|0)/w,G=(G*w|0)/w),b[A+0]=I,b[A+1]=B,T[A+2]=U,b[A+3]=Y,b[A+4]=X,T[A+5]=U,b[A+6]=z,b[A+7]=N,T[A+8]=U,b[A+9]=I,b[A+10]=B,T[A+11]=U,b[A+12]=z,b[A+13]=N,T[A+14]=U,b[A+15]=W,b[A+16]=G,T[A+17]=U,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.renderer.config.resolution,A=this.vertexViewF32,S=this.vertexViewU32,C=this.vertexCount*this.vertexComponentCount,M=w[0],E=w[1],_=w[2],L=w[3],P=p*M+g*_,F=p*E+g*L,k=v*M+y*_,R=v*E+y*L,O=m*M+x*_+w[4],D=m*E+x*L+w[5],I=r*P+o*k+O,B=r*F+o*R+D,Y=a*P+h*k+O,X=a*F+h*R+D,z=l*P+c*k+O,N=l*F+c*R+D,W=u.getTintAppendFloatAlphaAndSwap(d,f);b&&(I=(I*T|0)/T,B=(B*T|0)/T,Y=(Y*T|0)/T,X=(X*T|0)/T,z=(z*T|0)/T,N=(N*T|0)/T),A[C+0]=I,A[C+1]=B,S[C+2]=W,A[C+3]=Y,A[C+4]=X,S[C+5]=W,A[C+6]=z,A[C+7]=N,S[C+8]=W,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,y,m,x,w,b){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=u,T[2].y=l,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,v,y,m,x,!1,w,b)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v,y){this.renderer.setPipeline(this);for(var m,x,w,b,T,A,S,C,M,E,_,L,P,F,k,R,O,D=this.renderer.config.resolution,I=o.length,B=this.polygonCache,Y=this.vertexViewF32,X=this.vertexViewU32,z=0,N=v[0],W=v[1],G=v[2],U=v[3],V=l*N+c*G,H=l*W+c*U,j=d*N+f*G,q=d*W+f*U,K=p*N+g*G+v[4],J=p*W+g*U+v[5],Z=u.getTintAppendFloatAlphaAndSwap(a,h),Q=0;Qthis.vertexCapacity&&this.flush(),z=this.vertexCount*this.vertexComponentCount,L=(A=B[w+0])*V+(S=B[w+1])*j+K,P=A*H+S*q+J,F=(C=B[b+0])*V+(M=B[b+1])*j+K,k=C*H+M*q+J,R=(E=B[T+0])*V+(_=B[T+1])*j+K,O=E*H+_*q+J,y&&(L=(L*D|0)/D,P=(P*D|0)/D,F=(F*D|0)/D,k=(k*D|0)/D,R=(R*D|0)/D,O=(O*D|0)/D),Y[z+0]=L,Y[z+1]=P,X[z+2]=Z,Y[z+3]=F,Y[z+4]=k,X[z+5]=Z,Y[z+6]=R,Y[z+7]=O,X[z+8]=Z,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m){var x,w;this.renderer.setPipeline(this);for(var b,T,A,S,C=r.length,M=this.polygonCache,E=this.vertexViewF32,_=this.vertexViewU32,L=u.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),b=M[F-1]||M[k-1],T=M[F],E[(A=this.vertexCount*this.vertexComponentCount)+0]=b[6],E[A+1]=b[7],_[A+2]=L(b[8],h),E[A+3]=b[0],E[A+4]=b[1],_[A+5]=L(b[2],h),E[A+6]=T[9],E[A+7]=T[10],_[A+8]=L(T[11],h),E[A+9]=b[0],E[A+10]=b[1],_[A+11]=L(b[2],h),E[A+12]=b[6],E[A+13]=b[7],_[A+14]=L(b[8],h),E[A+15]=T[3],E[A+16]=T[4],_[A+17]=L(T[5],h),this.vertexCount+=6;M.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var A=this.renderer.config.resolution,S=b[0],C=b[1],M=b[2],E=b[3],_=g*S+v*M,L=g*C+v*E,P=y*S+m*M,F=y*C+m*E,k=x*S+w*M+b[4],R=x*C+w*E+b[5],O=this.vertexViewF32,D=this.vertexViewU32,I=a-r,B=h-o,Y=Math.sqrt(I*I+B*B),X=l*(h-o)/Y,z=l*(r-a)/Y,N=c*(h-o)/Y,W=c*(r-a)/Y,G=a-N,U=h-W,V=r-X,H=o-z,j=a+N,q=h+W,K=r+X,J=o+z,Z=G*_+U*P+k,Q=G*L+U*F+R,$=V*_+H*P+k,tt=V*L+H*F+R,et=j*_+q*P+k,it=j*L+q*F+R,nt=K*_+J*P+k,st=K*L+J*F+R,rt=u.getTintAppendFloatAlphaAndSwap,ot=rt(d,p),at=rt(f,p),ht=this.vertexCount*this.vertexComponentCount;return T&&(Z=(Z*A|0)/A,Q=(Q*A|0)/A,$=($*A|0)/A,tt=(tt*A|0)/A,et=(et*A|0)/A,it=(it*A|0)/A,nt=(nt*A|0)/A,st=(st*A|0)/A),O[ht+0]=Z,O[ht+1]=Q,D[ht+2]=at,O[ht+3]=$,O[ht+4]=tt,D[ht+5]=ot,O[ht+6]=et,O[ht+7]=it,D[ht+8]=at,O[ht+9]=$,O[ht+10]=tt,D[ht+11]=ot,O[ht+12]=nt,O[ht+13]=st,D[ht+14]=ot,O[ht+15]=et,O[ht+16]=it,D[ht+17]=at,this.vertexCount+=6,[Z,Q,f,$,tt,d,et,it,f,nt,st,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i=e.scrollX*t.scrollFactorX,n=e.scrollY*t.scrollFactorY,r=t.x-i,o=t.y-n,a=t.scaleX,h=t.scaleY,u=-t.rotation,l=t.commandBuffer,y=1,m=1,x=0,w=0,b=1,T=e.matrix.matrix,A=null,S=0,C=0,M=0,E=0,_=0,L=0,P=0,F=0,k=0,R=null,O=Math.sin,D=Math.cos,I=O(u),B=D(u),Y=B*a,X=-I*a,z=I*h,N=B*h,W=r,G=o,U=T[0],V=T[1],H=T[2],j=T[3],q=Y*U+X*H,K=Y*V+X*j,J=z*U+N*H,Z=z*V+N*j,Q=W*U+G*H+T[4],$=W*V+G*j+T[5],tt=e.roundPixels;v.length=0;for(var et=0,it=l.length;et0){var nt=A.points[0],st=A.points[A.points.length-1];A.points.push(nt),A=new d(st.x,st.y,st.width,st.rgb,st.alpha),v.push(A)}break;case s.FILL_PATH:for(var rt=0,ot=v.length;rt=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(126),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+y,h-m,u-x),(v+=h+p)+h>r&&(v=f,y+=u+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+l)/(s+l)),m=Math.floor((v-u+l)/(r+l)),x=y*m,w=e.x,b=s-w,T=s-(g-f-w),A=e.y,S=r-A,C=r-(v-p-A);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=u,E=u,_=0,L=e.sourceIndex,P=0;P0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(264),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(541),Components:i(12),BitmapText:i(130),Blitter:i(131),DynamicBitmapText:i(132),Graphics:i(133),Group:i(69),Image:i(70),Particles:i(136),PathFollower:i(288),Sprite3D:i(81),Sprite:i(37),Text:i(138),TileSprite:i(139),Zone:i(77),Factories:{Blitter:i(620),DynamicBitmapText:i(621),Graphics:i(622),Group:i(623),Image:i(624),Particles:i(625),PathFollower:i(626),Sprite3D:i(627),Sprite:i(628),StaticBitmapText:i(629),Text:i(630),TileSprite:i(631),Zone:i(632)},Creators:{Blitter:i(633),DynamicBitmapText:i(634),Graphics:i(635),Group:i(636),Image:i(637),Particles:i(638),Sprite3D:i(639),Sprite:i(640),StaticBitmapText:i(641),Text:i(642),TileSprite:i(643),Zone:i(644)}};n.Mesh=i(88),n.Quad=i(140),n.Factories.Mesh=i(648),n.Factories.Quad=i(649),n.Creators.Mesh=i(650),n.Creators.Quad=i(651),n.Light=i(291),i(292),i(652),t.exports=n},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(t,e){var i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){var s,r;for(s=0;s-1&&this._list.splice(o,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(545),s=i(546),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,l=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,A=null,S=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-u+e.frame.y),C.rotate(e.rotation),C.scale(e.scaleX,e.scaleY);for(var P=0;P0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode),t.currentAlpha;for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,u=0;u0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,u=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,w=0,b=0,T=0,A=0,S=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,L=a.cutY,P=0,F=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var k=0;k0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(134);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(564),s=i(272),s=i(272),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(567),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e,i){var n=this.x-t.x,s=this.y-t.y,r=n*n+s*s;if(0!==r){var o=Math.sqrt(r);r0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(0),s=(i(42),new n({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}}));t.exports=s},function(t,e,i){var n=i(0),s=i(274),r=i(71),o=i(1),a=i(42),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i,n){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},function(t,e,i){var n=i(275),s=i(276),r=i(277),o=i(278),a=i(279),h=i(280),u=i(281),l=i(282),c=i(283),d=i(284),f=i(285),p=i(286);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(43),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(609),s=i(610),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,w=y.canvasData,b=-m,T=-x;l.globalAlpha=v,l.save(),l.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),l.rotate(g.rotation),l.scale(g.scaleX,g.scaleY),l.drawImage(y.source.image,w.sx,w.sy,w.sWidth,w.sHeight,b,T,w.dWidth,w.dHeight),l.restore()}}l.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;e.resolution,t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(616),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,u,l=i.getImageData(0,0,s,o).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(131);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(133);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(136);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(288);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(130);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(138);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(139);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(133);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(136);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(290),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(290),r=i(14),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(130),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(138);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(646),s=i(647),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(t,e,i,n){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,key,h))})},function(t,e,i){var n=i(140);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(292),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(654),n.Circumference=i(180),n.CircumferencePoint=i(104),n.Clone=i(655),n.Contains=i(32),n.ContainsPoint=i(656),n.ContainsRect=i(657),n.CopyFrom=i(658),n.Equals=i(659),n.GetBounds=i(660),n.GetPoint=i(178),n.GetPoints=i(179),n.Offset=i(661),n.OffsetPoint=i(662),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(295);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(297);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(141),o=i(298);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(300);n.Angle=i(54),n.BresenhamPoints=i(188),n.CenterOn=i(674),n.Clone=i(675),n.CopyFrom=i(676),n.Equals=i(677),n.GetMidPoint=i(678),n.GetNormal=i(679),n.GetPoint=i(301),n.GetPoints=i(108),n.Height=i(680),n.Length=i(65),n.NormalAngle=i(302),n.NormalX=i(681),n.NormalY=i(682),n.Offset=i(683),n.PerpSlope=i(684),n.Random=i(110),n.ReflectAngle=i(685),n.Rotate=i(686),n.RotateAroundPoint=i(687),n.RotateAroundXY=i(142),n.SetToAngle=i(688),n.Slope=i(689),n.Width=i(690),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(300);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(302);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(142);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(142);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(692),n.Clone=i(693),n.CopyFrom=i(694),n.Equals=i(695),n.Floor=i(696),n.GetCentroid=i(697),n.GetMagnitude=i(303),n.GetMagnitudeSq=i(304),n.GetRectangleFromPoints=i(698),n.Interpolate=i(699),n.Invert=i(700),n.Negative=i(701),n.Project=i(702),n.ProjectUnit=i(703),n.SetMagnitude=i(704),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(307);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var u=[];for(i=0;i1&&(this.sortGameObjects(u),this.topOnly&&u.splice(1)),this._drag[t.id]=u,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var l=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),l[0]?(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&l[0]&&(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(126),KeyCombo:i(244),JustDown:i(757),JustUp:i(758),DownDuration:i(759),UpDuration:i(760)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(782),Distance:i(790),Easing:i(793),Fuzzy:i(794),Interpolation:i(800),Pow2:i(803),Snap:i(805),Average:i(809),Bernstein:i(321),Between:i(226),CatmullRom:i(121),CeilTo:i(810),Clamp:i(60),DegToRad:i(35),Difference:i(811),Factorial:i(322),FloatBetween:i(274),FloorTo:i(812),FromPercent:i(64),GetSpeed:i(813),IsEven:i(814),IsEvenStrict:i(815),Linear:i(225),MaxAdd:i(816),MinSub:i(817),Percent:i(818),RadToDeg:i(216),RandomXY:i(819),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(323),RotateAround:i(182),RotateAroundDistance:i(112),RoundAwayFromZero:i(324),RoundTo:i(820),SinCosTableGenerator:i(821),SmootherStep:i(189),SmoothStep:i(190),TransformXY:i(248),Within:i(822),Wrap:i(42),Vector2:i(6),Vector3:i(51),Vector4:i(118),Matrix3:i(208),Matrix4:i(117),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(783),BetweenY:i(784),BetweenPoints:i(785),BetweenPointsY:i(786),Reverse:i(787),RotateTo:i(788),ShortestBetween:i(789),Normalize:i(320),Wrap:i(159),WrapDegrees:i(160)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(320);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(806),Floor:i(807),To:i(808)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=u(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(l(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return this.body.enable=!0,t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(839),s=i(841),r=i(336);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(842);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){var n=i(846);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},,,,,,,,,,function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(127)}},function(t,e,i){var n=i(0),s=i(84),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this._queue=[]},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(86),BaseSoundManager:i(85),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(129),Map:i(113),ProcessQueue:i(333),RTree:i(334),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(128),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(892),Formats:i(19),ImageCollection:i(348),ParseToTilemap:i(153),Tile:i(45),Tilemap:i(352),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(350),DynamicTilemapLayer:i(353),StaticTilemapLayer:i(354)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,u){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var l=n(t,e,i,r,null,u),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(44),s=i(34),r=i(151);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(o,1),r.destroy()}for(s=0;s=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(107),o=i(182),a=i(108),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s={},r=new n({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,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={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){for(var e=0,i=0;ithis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return this.getLeft(t)+this.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],u=s[4],l=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+y)*w,this.y=(e*o+i*l+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,v=(d*c-l*f)*g,y=(u*f-l*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(112),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.values.forEach(function(t){e.add(t)}),this.entries.forEach(function(t){e.add(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.add(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.add(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(106),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(122),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(492))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),u=i(38),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(38),o=i(6),a=i(120),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(t,e){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=(this.vertexBuffer,this.vertexData,this.topology),n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);for(var n in i.spritemap=this.game.cache.json.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration,config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0):(console.error("addMarker - Marker has to have a valid name!"),!1):(console.error("addMarker - Marker object has to be provided!"),!1)},updateMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1):(console.error("updateMarker - Marker has to have a valid name!"),!1):(console.error("updateMarker - Marker object has to be provided!"),!1)},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):(console.error("removeMarker - Marker with name '"+e.name+"' does not exist for sound '"+this.key+"'!"),null)},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(645),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(38),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},,,,,function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(35),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(98),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(341),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(342),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(340),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(99),TileToWorldXY:i(889),TileToWorldY:i(100),WeightedRandomize:i(890),WorldToTileX:i(40),WorldToTileXY:i(891),WorldToTileY:i(41)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||b-y||S>-m||A-y||T>-m||b-y||S>-m||A-v&&S*n+C*r+h>-y&&(S+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],u=n[4],l=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*l-a*u)*c,y=(r*u-s*l)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,b=this.scrollX,T=this.scrollY,A=t+(b*m-T*x)*w,S=e+(b*x+T*m)*w;return i.x=A*d+S*p+v,i.y=A*f+S*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;el&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom)}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=u},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(119),r=i(204),o=i(205),a=i(206),h=i(61),u=i(81),l=i(6),c=i(51),d=i(120),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(84),r=i(525),o=i(526),a=i(231),h=i(252),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(542),h=i(543),u=i(544),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(547),s=i(550),r=i(0),o=i(12),a=i(130),h=i(2),u=i(87),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=l},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(551),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(115),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),u=i(4),l=i(16),c=i(563),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(110),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(568),a=i(87),h=i(569),u=i(608),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;su){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var y=l[c].length?c:c+1,m=l.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h]+" ")}r0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(u[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(u[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&l(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(617),u=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,u){var l=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=l,this.setTexture(h,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT,gl.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(0),s=i(89),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=l*l+c*c,g=l*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,w=t.y1,b=0;b=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration)r=1,o=s.duration;else if(n>s.delay&&n<=s.t1)r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r;else if(n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)}s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-180,180)}},,,function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(373),Call:i(374),GetFirst:i(375),GridAlign:i(376),IncAlpha:i(393),IncX:i(394),IncXY:i(395),IncY:i(396),PlaceOnCircle:i(397),PlaceOnEllipse:i(398),PlaceOnLine:i(399),PlaceOnRectangle:i(400),PlaceOnTriangle:i(401),PlayAnimation:i(402),RandomCircle:i(403),RandomEllipse:i(404),RandomLine:i(405),RandomRectangle:i(406),RandomTriangle:i(407),Rotate:i(408),RotateAround:i(409),RotateAroundDistance:i(410),ScaleX:i(411),ScaleXY:i(412),ScaleY:i(413),SetAlpha:i(414),SetBlendMode:i(415),SetDepth:i(416),SetHitArea:i(417),SetOrigin:i(418),SetRotation:i(419),SetScale:i(420),SetScaleX:i(421),SetScaleY:i(422),SetTint:i(423),SetVisible:i(424),SetX:i(425),SetXY:i(426),SetY:i(427),ShiftPosition:i(428),Shuffle:i(429),SmootherStep:i(430),SmoothStep:i(431),Spread:i(432),ToggleVisible:i(433)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(47),r=i(25),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(47),r=i(50);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(48),s=i(49);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(50),s=i(26),r=i(49),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(50),s=i(28),r=i(49),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(47),s=i(30),r=i(48),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(105),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(105),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=u),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=u[0],u[0].prevFrame=o;var v=1/(u.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(114),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(114),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(37);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(37);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(119),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*u,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*u,e[5]=g*s+v*a+y*l,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*u,e[8]=m*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=u+v,y[6]=l-g,y[1]=u-v,y[4]=1-(h+f),y[7]=d+p,y[2]=l+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,A=s*l-o*h,S=r*l-o*u,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,L=d*m-p*v,P=f*m-p*y,k=x*P-w*L+b*_+T*E-A*M+S*C;return k?(k=1/k,i[0]=(h*P-u*L+l*_)*k,i[1]=(u*E-a*P-l*M)*k,i[2]=(a*L-h*E+l*C)*k,i[3]=(r*L-s*P-o*_)*k,i[4]=(n*P-r*E+o*M)*k,i[5]=(s*E-n*L-o*C)*k,i[6]=(v*S-y*A+m*T)*k,i[7]=(y*b-g*S-m*w)*k,i[8]=(g*A-v*b+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(482)(t))},function(t,e,i){var n=i(117);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u={r:i=Math.floor(i*=255),g:i,b:i,color:0},l=s%6;return 0===l?(u.g=h,u.b=o):1===l?(u.r=a,u.b=o):2===l?(u.r=o,u.b=h):3===l?(u.r=o,u.g=a):4===l?(u.r=h,u.g=o):5===l&&(u.g=o,u.b=a),u.color=n(u.r,u.g,u.b),u}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(A(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),A(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&y(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(y(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!m(s,r)&&x(s,n,n.next,r)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),A(n),A(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&v(h,u)){var l=b(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,n,s,a),void o(l,e,i,n,s,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=l&&s!==n.x&&g(ri.x)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&w(t,e)&&w(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(m(t,e)&&m(i,n)||m(t,n)&&m(i,e))||y(t,e,i)>0!=y(t,e,n)>0&&y(i,n,t)>0!=y(i,n,e)>0}function w(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function T(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),u=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(510),r=i(236),o=(i(34),i(83),new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;for(var n=this.renderer,s=this.program,r=t.lights.cull(e),o=Math.min(r.length,10),a=e.matrix,h={x:0,y:0},u=n.height,l=0;l<10;++l)n.setFloat1(s,"uLights["+l+"].radius",0);if(o<=0)return this;n.setFloat4(s,"uCamera",e.x,e.y,e.rotation,e.zoom),n.setFloat3(s,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b);for(l=0;l0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.renderer,i=this.vertexCount,n=(this.vertexBuffer,this.vertexData,this.topology),s=this.vertexSize,r=this.batches,o=0,a=null;if(0===r.length||0===i)return this.flushLocked=!1,this;t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));for(var h=0;h0){for(var u=0;u0){for(u=0;u0&&(e.setTexture2D(a.texture,0),t.drawArrays(n,a.first,o)),this.vertexCount=0,r.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t,e){if(t.vertexCount>0){var i=this.vertexBuffer,n=this.gl,s=this.renderer,r=t.tileset.image.get();s.currentPipeline&&s.currentPipeline.vertexCount>0&&s.flush(),this.vertexBuffer=t.vertexBuffer,s.setTexture2D(r.source.glTexture,0),s.setPipeline(this),n.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=i}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=(a.getTintAppendFloatAlpha,this.vertexViewF32),r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,u=o.config.resolution,l=this.maxQuads,c=e.scrollX,d=e.scrollY,f=e.matrix.matrix,p=f[0],g=f[1],v=f[2],y=f[3],m=f[4],x=f[5],w=Math.sin,b=Math.cos,T=this.vertexComponentCount,A=this.vertexCapacity,S=t.defaultFrame.source.glTexture;this.setTexture2D(S,0);for(var C=0;C=A&&(this.flush(),this.setTexture2D(S,0));for(var R=0;R=A&&(this.flush(),this.setTexture2D(S,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=this.renderer,o=e.roundPixels,h=r.config.resolution,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),b=0,T=t.x-m,A=t.y-x,S=0;S=this.vertexCapacity&&this.flush()}b+=C,l-=C,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,u=o.config.resolution,l=e.matrix.matrix,c=t.frame,d=c.texture.source[c.sourceIndex].glTexture,f=!!d.isRenderTexture,p=t.flipX,g=t.flipY^f,v=c.uvs,y=c.width*(p?-1:1),m=c.height*(g?-1:1),x=-t.displayOriginX+c.x+c.width*(p?1:0),w=-t.displayOriginY+c.y+c.height*(g?1:0),b=x+y,T=w+m,A=t.x-e.scrollX*t.scrollFactorX,S=t.y-e.scrollY*t.scrollFactorY,C=t.scaleX,M=t.scaleY,E=-t.rotation,_=t._alphaTL,L=t._alphaTR,P=t._alphaBL,k=t._alphaBR,F=t._tintTL,R=t._tintTR,O=t._tintBL,D=t._tintBR,I=Math.sin(E),B=Math.cos(E),Y=B*C,X=-I*C,z=I*M,N=B*M,W=A,G=S,U=l[0],V=l[1],j=l[2],H=l[3],q=Y*U+X*j,K=Y*V+X*H,J=z*U+N*j,Z=z*V+N*H,Q=W*U+G*j+l[4],$=W*V+G*H+l[5],tt=x*q+w*J+Q,et=x*K+w*Z+$,it=x*q+T*J+Q,nt=x*K+T*Z+$,st=b*q+T*J+Q,rt=b*K+T*Z+$,ot=b*q+w*J+Q,at=b*K+w*Z+$,ht=n(F,_),ut=n(R,L),lt=n(O,P),ct=n(D,k);this.setTexture2D(d,0),h&&(tt=(tt*u|0)/u,et=(et*u|0)/u,it=(it*u|0)/u,nt=(nt*u|0)/u,st=(st*u|0)/u,rt=(rt*u|0)/u,ot=(ot*u|0)/u,at=(at*u|0)/u),s[(i=this.vertexCount*this.vertexComponentCount)+0]=tt,s[i+1]=et,s[i+2]=v.x0,s[i+3]=v.y0,r[i+4]=ht,s[i+5]=it,s[i+6]=nt,s[i+7]=v.x1,s[i+8]=v.y1,r[i+9]=ut,s[i+10]=st,s[i+11]=rt,s[i+12]=v.x2,s[i+13]=v.y2,r[i+14]=lt,s[i+15]=tt,s[i+16]=et,s[i+17]=v.x0,s[i+18]=v.y0,r[i+19]=ht,s[i+20]=st,s[i+21]=rt,s[i+22]=v.x2,s[i+23]=v.y2,r[i+24]=lt,s[i+25]=ot,s[i+26]=at,s[i+27]=v.x3,s[i+28]=v.y3,r[i+29]=ct,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,u=t.alphas,l=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=e.roundPixels,p=d.config.resolution,g=e.matrix.matrix,v=(g[0],g[1],g[2],g[3],g[4],g[5],t.frame),y=t.texture.source[v.sourceIndex].glTexture,m=t.x-e.scrollX*t.scrollFactorX,x=t.y-e.scrollY*t.scrollFactorY,w=t.scaleX,b=t.scaleY,T=-t.rotation,A=Math.sin(T),S=Math.cos(T),C=S*w,M=-A*w,E=A*b,_=S*b,L=m,P=x,k=g[0],F=g[1],R=g[2],O=g[3],D=C*k+M*R,I=C*F+M*O,B=E*k+_*R,Y=E*F+_*O,X=L*k+P*R+g[4],z=L*F+P*O+g[5],N=0;this.setTexture2D(y,0),N=this.vertexCount*this.vertexComponentCount;for(var W=0,G=0;Wthis.vertexCapacity&&this.flush();var i=t.text,n=i.length,s=a.getTintAppendFloatAlpha,r=this.vertexViewF32,o=this.vertexViewU32,h=this.renderer,u=e.roundPixels,l=h.config.resolution,c=e.matrix.matrix,d=e.width+50,f=e.height+50,p=t.frame,g=t.texture.source[p.sourceIndex],v=e.scrollX*t.scrollFactorX,y=e.scrollY*t.scrollFactorY,m=t.fontData,x=m.lineHeight,w=t.fontSize/m.size,b=m.chars,T=t.alpha,A=s(t._tintTL,T),S=s(t._tintTR,T),C=s(t._tintBL,T),M=s(t._tintBR,T),E=t.x,_=t.y,L=p.cutX,P=p.cutY,k=g.width,F=g.height,R=g.glTexture,O=0,D=0,I=0,B=0,Y=null,X=0,z=0,N=0,W=0,G=0,U=0,V=0,j=0,H=0,q=0,K=0,J=0,Z=null,Q=0,$=E-v+p.x,tt=_-y+p.y,et=-t.rotation,it=t.scaleX,nt=t.scaleY,st=Math.sin(et),rt=Math.cos(et),ot=rt*it,at=-st*it,ht=st*nt,ut=rt*nt,lt=$,ct=tt,dt=c[0],ft=c[1],pt=c[2],gt=c[3],vt=ot*dt+at*pt,yt=ot*ft+at*gt,mt=ht*dt+ut*pt,xt=ht*ft+ut*gt,wt=lt*dt+ct*pt+c[4],bt=lt*ft+ct*gt+c[5],Tt=0;this.setTexture2D(R,0);for(var At=0;Atd||ty0<-50||ty0>f)&&(tx1<-50||tx1>d||ty1<-50||ty1>f)&&(tx2<-50||tx2>d||ty2<-50||ty2>f)&&(tx3<-50||tx3>d||ty3<-50||ty3>f)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Tt=this.vertexCount*this.vertexComponentCount,u&&(tx0=(tx0*l|0)/l,ty0=(ty0*l|0)/l,tx1=(tx1*l|0)/l,ty1=(ty1*l|0)/l,tx2=(tx2*l|0)/l,ty2=(ty2*l|0)/l,tx3=(tx3*l|0)/l,ty3=(ty3*l|0)/l),r[Tt+0]=tx0,r[Tt+1]=ty0,r[Tt+2]=H,r[Tt+3]=K,o[Tt+4]=A,r[Tt+5]=tx1,r[Tt+6]=ty1,r[Tt+7]=H,r[Tt+8]=J,o[Tt+9]=S,r[Tt+10]=tx2,r[Tt+11]=ty2,r[Tt+12]=q,r[Tt+13]=J,o[Tt+14]=C,r[Tt+15]=tx0,r[Tt+16]=ty0,r[Tt+17]=H,r[Tt+18]=K,o[Tt+19]=A,r[Tt+20]=tx2,r[Tt+21]=ty2,r[Tt+22]=q,r[Tt+23]=J,o[Tt+24]=C,r[Tt+25]=tx3,r[Tt+26]=ty3,r[Tt+27]=q,r[Tt+28]=K,o[Tt+29]=M,this.vertexCount+=6))}}else O=0,I=0,D+=x,Z=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,u=t.displayCallback,l=t.text,c=l.length,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=this.renderer,v=e.roundPixels,y=g.config.resolution,m=e.matrix.matrix,x=t.frame,w=t.texture.source[x.sourceIndex],b=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,A=t.scrollX,S=t.scrollY,C=t.fontData,M=C.lineHeight,E=t.fontSize/C.size,_=C.chars,L=t.alpha,P=d(t._tintTL,L),k=d(t._tintTR,L),F=d(t._tintBL,L),R=d(t._tintBR,L),O=t.x,D=t.y,I=x.cutX,B=x.cutY,Y=w.width,X=w.height,z=w.glTexture,N=0,W=0,G=0,U=0,V=null,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=null,rt=0,ot=O+x.x,at=D+x.y,ht=-t.rotation,ut=t.scaleX,lt=t.scaleY,ct=Math.sin(ht),dt=Math.cos(ht),ft=dt*ut,pt=-ct*ut,gt=ct*lt,vt=dt*lt,yt=ot,mt=at,xt=m[0],wt=m[1],bt=m[2],Tt=m[3],At=ft*xt+pt*bt,St=ft*wt+pt*Tt,Ct=gt*xt+vt*bt,Mt=gt*wt+vt*Tt,Et=yt*xt+mt*bt+m[4],_t=yt*wt+mt*Tt+m[5],Lt=t.cropWidth>0||t.cropHeight>0,Pt=0;this.setTexture2D(z,0),Lt&&g.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var kt=0;ktthis.vertexCapacity&&this.flush(),Pt=this.vertexCount*this.vertexComponentCount,v&&(tx0=(tx0*y|0)/y,ty0=(ty0*y|0)/y,tx1=(tx1*y|0)/y,ty1=(ty1*y|0)/y,tx2=(tx2*y|0)/y,ty2=(ty2*y|0)/y,tx3=(tx3*y|0)/y,ty3=(ty3*y|0)/y),f[Pt+0]=tx0,f[Pt+1]=ty0,f[Pt+2]=tt,f[Pt+3]=it,p[Pt+4]=P,f[Pt+5]=tx1,f[Pt+6]=ty1,f[Pt+7]=tt,f[Pt+8]=nt,p[Pt+9]=k,f[Pt+10]=tx2,f[Pt+11]=ty2,f[Pt+12]=et,f[Pt+13]=nt,p[Pt+14]=F,f[Pt+15]=tx0,f[Pt+16]=ty0,f[Pt+17]=tt,f[Pt+18]=it,p[Pt+19]=P,f[Pt+20]=tx2,f[Pt+21]=ty2,f[Pt+22]=et,f[Pt+23]=nt,p[Pt+24]=F,f[Pt+25]=tx3,f[Pt+26]=ty3,f[Pt+27]=et,f[Pt+28]=it,p[Pt+29]=R,this.vertexCount+=6}}}else N=0,G=0,W+=M,st=null;Lt&&g.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,u=t.alpha,l=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),f^=e.isRenderTexture?1:0,c=-c;a.getTintAppendFloatAlpha;var L,P=this.vertexViewF32,k=this.vertexViewU32,F=this.renderer,R=_.roundPixels,O=F.config.resolution,D=_.matrix.matrix,I=o*(d?1:0)-v,B=h*(f?1:0)-y,Y=I+o*(d?-1:1),X=B+h*(f?-1:1),z=s-_.scrollX*p,N=r-_.scrollY*g,W=Math.sin(c),G=Math.cos(c),U=G*u,V=-W*u,j=W*l,H=G*l,q=z,K=N,J=D[0],Z=D[1],Q=D[2],$=D[3],tt=U*J+V*Q,et=U*Z+V*$,it=j*J+H*Q,nt=j*Z+H*$,st=q*J+K*Q+D[4],rt=q*Z+K*$+D[5],ot=I*tt+B*it+st,at=I*et+B*nt+rt,ht=I*tt+X*it+st,ut=I*et+X*nt+rt,lt=Y*tt+X*it+st,ct=Y*et+X*nt+rt,dt=Y*tt+B*it+st,ft=Y*et+B*nt+rt,pt=m/i+M,gt=x/n+E,vt=(m+w)/i+M,yt=(x+b)/n+E;this.setTexture2D(e,0),R&&(ot=(ot*O|0)/O,at=(at*O|0)/O,ht=(ht*O|0)/O,ut=(ut*O|0)/O,lt=(lt*O|0)/O,ct=(ct*O|0)/O,dt=(dt*O|0)/O,ft=(ft*O|0)/O),P[(L=this.vertexCount*this.vertexComponentCount)+0]=ot,P[L+1]=at,P[L+2]=pt,P[L+3]=gt,k[L+4]=T,P[L+5]=ht,P[L+6]=ut,P[L+7]=pt,P[L+8]=yt,k[L+9]=A,P[L+10]=lt,P[L+11]=ct,P[L+12]=vt,P[L+13]=yt,k[L+14]=S,P[L+15]=ot,P[L+16]=at,P[L+17]=pt,P[L+18]=gt,k[L+19]=T,P[L+20]=lt,P[L+21]=ct,P[L+22]=vt,P[L+23]=yt,k[L+24]=S,P[L+25]=dt,P[L+26]=ft,P[L+27]=vt,P[L+28]=gt,k[L+29]=C,this.vertexCount+=6},batchGraphics:function(t,e){}});t.exports=u},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),u=i(8),l=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=0;l0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(522),u=i(523),l=i(524),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(84),s=i(4),r=i(527),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(){return!1},playAudioSprite:function(){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(86),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(){return!1},updateMarker:function(){return!1},removeMarker:function(){return null},play:function(){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(85),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){s.prototype.destroy.call(this),this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.context.suspend(),this.context=null}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(86),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var A=y+g-s,S=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,l=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,w=0,b=1,T=0,A=0,S=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(l-h,c-u),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,A=(65280&x)>>>8,S=255&x,v.strokeStyle="rgba("+T+","+A+","+S+","+y+")",v.lineWidth=b,C+=3;break;case n.FILL_STYLE:w=g[C+1],m=g[C+2],T=(16711680&w)>>>16,A=(65280&w)>>>8,S=255&w,v.fillStyle="rgba("+T+","+A+","+S+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+E)}}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(34),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(653),Ellipse:i(267),Intersects:i(293),Line:i(673),Point:i(691),Polygon:i(705),Rectangle:i(305),Triangle:i(734)}},function(t,e,i){t.exports={CircleToCircle:i(663),CircleToRectangle:i(664),GetRectangleIntersection:i(665),LineToCircle:i(295),LineToLine:i(90),LineToRectangle:i(666),PointToLine:i(296),PointToLineSegment:i(667),RectangleToRectangle:i(294),RectangleToTriangle:i(668),RectangleToValues:i(669),TriangleToCircle:i(670),TriangleToLine:i(671),TriangleToTriangle:i(672)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=r*r+o*o,l=r,c=o;if(u>0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(109),o=i(111),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(42),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),d=u+l+c;e||(e=d/i);for(var f=0;fu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return console.info("Skipping loading audio '"+e+"' since sounds are disabled."),null;var l=u.findAudioURL(r,i);return l?!a.webAudio||o&&o.disableWebAudio?new h(e,l,t.path,n,r.sound.locked):new u(e,l,t.path,s,r.sound.context):(console.warn("No supported url provided for audio '"+e+"'!"),null)},o.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(92),r=i(0),o=i(58),a=i(327),h=i(328),u=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=u},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(825),Angular:i(826),Bounce:i(827),Debug:i(828),Drag:i(829),Enable:i(830),Friction:i(831),Gravity:i(832),Immovable:i(833),Mass:i(834),Size:i(835),Velocity:i(836)}},function(t,e,i){var n=i(92),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(l.x,l.y,u.right,u.y)-l.radius):l.y>u.bottom&&(l.xu.right&&(a=h(l.x,l.y,u.right,u.bottom)-l.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,f=t.mass,p=e.velocity.x,g=e.velocity.y,v=e.mass,y=c*Math.cos(o)+d*Math.sin(o),m=c*Math.sin(o)-d*Math.cos(o),x=p*Math.cos(o)+g*Math.sin(o),w=p*Math.sin(o)-g*Math.cos(o),b=((f-v)*y+2*v*x)/(f+v),T=(2*f*y+(v-f)*x)/(f+v);return t.immovable||(t.velocity.x=(b*Math.cos(o)-m*Math.sin(o))*t.bounce.x,t.velocity.y=(m*Math.cos(o)+b*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(T*Math.cos(o)-w*Math.sin(o))*e.bounce.x,e.velocity.y=(w*Math.cos(o)+T*Math.sin(o))*e.bounce.y,p=e.velocity.x,g=e.velocity.y),Math.abs(o)0&&!t.immovable&&p>c?t.velocity.x*=-1:p<0&&!e.immovable&&c0&&!t.immovable&&g>d?t.velocity.y*=-1:g<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&p0&&!e.immovable&&c>p?e.velocity.x*=-1:d<0&&!t.immovable&&g0&&!e.immovable&&c>g&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,u+=f}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p,v=e.getTilesWithinWorldXY(a,h,u,l);if(0===v.length)return!1;for(var y={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,u,l,d,f,p,g,v,y,m;for(u=l=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=(i(8),i(33)),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u-1}return!1}},function(t,e,i){var n=i(45),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(344),o=i(345),a=i(350);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,u,l);break;case n.CSV:c=r(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),u=i(899),l=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=u(c),l(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(36),r=i(352),o=i(23),a=i(19),h=i(75),u=i(322),l=i(353),c=i(45),d=i(97),f=i(101),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[u])return this.tilesets[u].setTileSize(i,n),this.tilesets[u].setSpacing(s,r),this.tilesets[u].setImage(h),this.tilesets[u];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var l=new f(t,o,i,n,s,r);return l.setImage(h),this.tilesets.push(l),l},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new l(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,u){if(void 0===a&&(a=e.tileWidth),void 0===u&&(u=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var l,d=new h({name:t,tileWidth:a,tileHeight:u,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(102),h=i(4),u=i(156),l=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),A=[],S=u("value",f),C=c(p[0],"value",S.getEnd,S.getStart,m,g,v,T,x,w,b,!1,!1);C.start=d,C.current=d,C.to=f,A.push(C);var M=new l(t,A,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],L=l.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},,function(t,e,i){i(364),i(365),i(366),i(367),i(368),i(369),i(370),i(371),i(372)},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=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(115),CameraManager:i(441)}},function(t,e,i){var n=i(115),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new l(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(37),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;r=s(u,h,t+1/3),o=s(u,h,t),a=s(u,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,s,u),g:n(e,r,u),b:n(i,o,u)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(37);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){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(46),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(126),o=i(34),a=i(503),h=i(504),u=i(507),l=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null};for(var n=0;n<=16;n++)this.blendModes.push({func:[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],equation:WebGLRenderingContext.FUNC_ADD});this.blendModes[1].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.DST_ALPHA],this.blendModes[2].func=[WebGLRenderingContext.DST_COLOR,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_COLOR],this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=null==u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null==o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this},deleteFramebuffer:function(t){return this},deleteProgram:function(t){return this},deleteBuffer:function(t){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){this.gl;var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;uthis.vertexCapacity&&this.flush();var w=this.renderer.config.resolution,b=this.vertexViewF32,T=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,S=r+a,C=o+h,M=m[0],E=m[1],_=m[2],L=m[3],P=d*M+f*_,k=d*E+f*L,F=p*M+g*_,R=p*E+g*L,O=v*M+y*_+m[4],D=v*E+y*L+m[5],I=r*P+o*F+O,B=r*k+o*R+D,Y=r*P+C*F+O,X=r*k+C*R+D,z=S*P+C*F+O,N=S*k+C*R+D,W=S*P+o*F+O,G=S*k+o*R+D,U=u.getTintAppendFloatAlphaAndSwap(l,c);x&&(I=(I*w|0)/w,B=(B*w|0)/w,Y=(Y*w|0)/w,X=(X*w|0)/w,z=(z*w|0)/w,N=(N*w|0)/w,W=(W*w|0)/w,G=(G*w|0)/w),b[A+0]=I,b[A+1]=B,T[A+2]=U,b[A+3]=Y,b[A+4]=X,T[A+5]=U,b[A+6]=z,b[A+7]=N,T[A+8]=U,b[A+9]=I,b[A+10]=B,T[A+11]=U,b[A+12]=z,b[A+13]=N,T[A+14]=U,b[A+15]=W,b[A+16]=G,T[A+17]=U,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.renderer.config.resolution,A=this.vertexViewF32,S=this.vertexViewU32,C=this.vertexCount*this.vertexComponentCount,M=w[0],E=w[1],_=w[2],L=w[3],P=p*M+g*_,k=p*E+g*L,F=v*M+y*_,R=v*E+y*L,O=m*M+x*_+w[4],D=m*E+x*L+w[5],I=r*P+o*F+O,B=r*k+o*R+D,Y=a*P+h*F+O,X=a*k+h*R+D,z=l*P+c*F+O,N=l*k+c*R+D,W=u.getTintAppendFloatAlphaAndSwap(d,f);b&&(I=(I*T|0)/T,B=(B*T|0)/T,Y=(Y*T|0)/T,X=(X*T|0)/T,z=(z*T|0)/T,N=(N*T|0)/T),A[C+0]=I,A[C+1]=B,S[C+2]=W,A[C+3]=Y,A[C+4]=X,S[C+5]=W,A[C+6]=z,A[C+7]=N,S[C+8]=W,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,y,m,x,w,b){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=u,T[2].y=l,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,v,y,m,x,!1,w,b)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v,y){this.renderer.setPipeline(this);for(var m,x,w,b,T,A,S,C,M,E,_,L,P,k,F,R,O,D=this.renderer.config.resolution,I=o.length,B=this.polygonCache,Y=this.vertexViewF32,X=this.vertexViewU32,z=0,N=v[0],W=v[1],G=v[2],U=v[3],V=l*N+c*G,j=l*W+c*U,H=d*N+f*G,q=d*W+f*U,K=p*N+g*G+v[4],J=p*W+g*U+v[5],Z=u.getTintAppendFloatAlphaAndSwap(a,h),Q=0;Qthis.vertexCapacity&&this.flush(),z=this.vertexCount*this.vertexComponentCount,L=(A=B[w+0])*V+(S=B[w+1])*H+K,P=A*j+S*q+J,k=(C=B[b+0])*V+(M=B[b+1])*H+K,F=C*j+M*q+J,R=(E=B[T+0])*V+(_=B[T+1])*H+K,O=E*j+_*q+J,y&&(L=(L*D|0)/D,P=(P*D|0)/D,k=(k*D|0)/D,F=(F*D|0)/D,R=(R*D|0)/D,O=(O*D|0)/D),Y[z+0]=L,Y[z+1]=P,X[z+2]=Z,Y[z+3]=k,Y[z+4]=F,X[z+5]=Z,Y[z+6]=R,Y[z+7]=O,X[z+8]=Z,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m){var x,w;this.renderer.setPipeline(this);for(var b,T,A,S,C=r.length,M=this.polygonCache,E=this.vertexViewF32,_=this.vertexViewU32,L=u.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),b=M[k-1]||M[F-1],T=M[k],E[(A=this.vertexCount*this.vertexComponentCount)+0]=b[6],E[A+1]=b[7],_[A+2]=L(b[8],h),E[A+3]=b[0],E[A+4]=b[1],_[A+5]=L(b[2],h),E[A+6]=T[9],E[A+7]=T[10],_[A+8]=L(T[11],h),E[A+9]=b[0],E[A+10]=b[1],_[A+11]=L(b[2],h),E[A+12]=b[6],E[A+13]=b[7],_[A+14]=L(b[8],h),E[A+15]=T[3],E[A+16]=T[4],_[A+17]=L(T[5],h),this.vertexCount+=6;M.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var A=this.renderer.config.resolution,S=b[0],C=b[1],M=b[2],E=b[3],_=g*S+v*M,L=g*C+v*E,P=y*S+m*M,k=y*C+m*E,F=x*S+w*M+b[4],R=x*C+w*E+b[5],O=this.vertexViewF32,D=this.vertexViewU32,I=a-r,B=h-o,Y=Math.sqrt(I*I+B*B),X=l*(h-o)/Y,z=l*(r-a)/Y,N=c*(h-o)/Y,W=c*(r-a)/Y,G=a-N,U=h-W,V=r-X,j=o-z,H=a+N,q=h+W,K=r+X,J=o+z,Z=G*_+U*P+F,Q=G*L+U*k+R,$=V*_+j*P+F,tt=V*L+j*k+R,et=H*_+q*P+F,it=H*L+q*k+R,nt=K*_+J*P+F,st=K*L+J*k+R,rt=u.getTintAppendFloatAlphaAndSwap,ot=rt(d,p),at=rt(f,p),ht=this.vertexCount*this.vertexComponentCount;return T&&(Z=(Z*A|0)/A,Q=(Q*A|0)/A,$=($*A|0)/A,tt=(tt*A|0)/A,et=(et*A|0)/A,it=(it*A|0)/A,nt=(nt*A|0)/A,st=(st*A|0)/A),O[ht+0]=Z,O[ht+1]=Q,D[ht+2]=at,O[ht+3]=$,O[ht+4]=tt,D[ht+5]=ot,O[ht+6]=et,O[ht+7]=it,D[ht+8]=at,O[ht+9]=$,O[ht+10]=tt,D[ht+11]=ot,O[ht+12]=nt,O[ht+13]=st,D[ht+14]=ot,O[ht+15]=et,O[ht+16]=it,D[ht+17]=at,this.vertexCount+=6,[Z,Q,f,$,tt,d,et,it,f,nt,st,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i=e.scrollX*t.scrollFactorX,n=e.scrollY*t.scrollFactorY,r=t.x-i,o=t.y-n,a=t.scaleX,h=t.scaleY,u=-t.rotation,l=t.commandBuffer,y=1,m=1,x=0,w=0,b=1,T=e.matrix.matrix,A=null,S=0,C=0,M=0,E=0,_=0,L=0,P=0,k=0,F=0,R=null,O=Math.sin,D=Math.cos,I=O(u),B=D(u),Y=B*a,X=-I*a,z=I*h,N=B*h,W=r,G=o,U=T[0],V=T[1],j=T[2],H=T[3],q=Y*U+X*j,K=Y*V+X*H,J=z*U+N*j,Z=z*V+N*H,Q=W*U+G*j+T[4],$=W*V+G*H+T[5],tt=e.roundPixels;v.length=0;for(var et=0,it=l.length;et0){var nt=A.points[0],st=A.points[A.points.length-1];A.points.push(nt),A=new d(st.x,st.y,st.width,st.rgb,st.alpha),v.push(A)}break;case s.FILL_PATH:for(var rt=0,ot=v.length;rt=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+y,h-m,u-x),(v+=h+p)+h>r&&(v=f,y+=u+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+l)/(s+l)),m=Math.floor((v-u+l)/(r+l)),x=y*m,w=e.x,b=s-w,T=s-(g-f-w),A=e.y,S=r-A,C=r-(v-p-A);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=u,E=u,_=0,L=e.sourceIndex,P=0;P0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(540),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(541),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(38),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(620),DynamicBitmapText:i(621),Graphics:i(622),Group:i(623),Image:i(624),Particles:i(625),PathFollower:i(626),Sprite3D:i(627),Sprite:i(628),StaticBitmapText:i(629),Text:i(630),TileSprite:i(631),Zone:i(632)},Creators:{Blitter:i(633),DynamicBitmapText:i(634),Graphics:i(635),Group:i(636),Image:i(637),Particles:i(638),Sprite3D:i(639),Sprite:i(640),StaticBitmapText:i(641),Text:i(642),TileSprite:i(643),Zone:i(644)}};n.Mesh=i(89),n.Quad=i(141),n.Factories.Mesh=i(648),n.Factories.Quad=i(649),n.Creators.Mesh=i(650),n.Creators.Quad=i(651),n.Light=i(290),i(291),i(652),t.exports=n},function(t,e,i){var n=i(0),s=i(87),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(t,e){var i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){var s,r;for(s=0;s-1&&this._list.splice(o,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(545),s=i(546),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,l=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,A=null,S=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-u+e.frame.y),C.rotate(e.rotation),C.scale(e.scaleX,e.scaleY);for(var P=0;P0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode),t.currentAlpha;for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,u=0;u0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,u=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,w=0,b=0,T=0,A=0,S=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,L=a.cutY,P=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(564),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(567),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e,i){var n=this.x-t.x,s=this.y-t.y,r=n*n+s*s;if(0!==r){var o=Math.sqrt(r);r0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(0),s=(i(42),new n({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}}));t.exports=s},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(42),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i,n){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),u=i(280),l=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(36),r=i(43),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(609),s=i(610),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,w=y.canvasData,b=-m,T=-x;l.globalAlpha=v,l.save(),l.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),l.rotate(g.rotation),l.scale(g.scaleX,g.scaleY),l.drawImage(y.source.image,w.sx,w.sy,w.sWidth,w.sHeight,b,T,w.dWidth,w.dHeight),l.restore()}}l.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;e.resolution,t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(616),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){for(var i in void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,u,l=i.getImageData(0,0,s,o).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(38);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(38);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(646),s=i(647),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(t,e,i,n){}},function(t,e,i){var n=i(89);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,key,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(89);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(654),n.Circumference=i(181),n.CircumferencePoint=i(105),n.Clone=i(655),n.Contains=i(32),n.ContainsPoint=i(656),n.ContainsRect=i(657),n.CopyFrom=i(658),n.Equals=i(659),n.GetBounds=i(660),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(661),n.OffsetPoint=i(662),n.Random=i(106),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(90),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(674),n.Clone=i(675),n.CopyFrom=i(676),n.Equals=i(677),n.GetMidPoint=i(678),n.GetNormal=i(679),n.GetPoint=i(300),n.GetPoints=i(109),n.Height=i(680),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(681),n.NormalY=i(682),n.Offset=i(683),n.PerpSlope=i(684),n.Random=i(111),n.ReflectAngle=i(685),n.Rotate=i(686),n.RotateAroundPoint=i(687),n.RotateAroundXY=i(143),n.SetToAngle=i(688),n.Slope=i(689),n.Width=i(690),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(692),n.Clone=i(693),n.CopyFrom=i(694),n.Equals=i(695),n.Floor=i(696),n.GetCentroid=i(697),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(698),n.Interpolate=i(699),n.Invert=i(700),n.Negative=i(701),n.Project=i(702),n.ProjectUnit=i(703),n.SetMagnitude=i(704),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(36);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var u=[];for(i=0;i1&&(this.sortGameObjects(u),this.topOnly&&u.splice(1)),this._drag[t.id]=u,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var l=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),l[0]?(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&l[0]&&(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(757),JustUp:i(758),DownDuration:i(759),UpDuration:i(760)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(782),Distance:i(790),Easing:i(793),Fuzzy:i(794),Interpolation:i(800),Pow2:i(803),Snap:i(805),Average:i(809),Bernstein:i(320),Between:i(226),CatmullRom:i(123),CeilTo:i(810),Clamp:i(60),DegToRad:i(36),Difference:i(811),Factorial:i(321),FloatBetween:i(273),FloorTo:i(812),FromPercent:i(64),GetSpeed:i(813),IsEven:i(814),IsEvenStrict:i(815),Linear:i(225),MaxAdd:i(816),MinSub:i(817),Percent:i(818),RadToDeg:i(216),RandomXY:i(819),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(113),RoundAwayFromZero:i(323),RoundTo:i(820),SinCosTableGenerator:i(821),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(822),Wrap:i(42),Vector2:i(6),Vector3:i(51),Vector4:i(120),Matrix3:i(208),Matrix4:i(119),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(783),BetweenY:i(784),BetweenPoints:i(785),BetweenPointsY:i(786),Reverse:i(787),RotateTo:i(788),ShortestBetween:i(789),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(806),Floor:i(807),To:i(808)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=u(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(l(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(839),s=i(841),r=i(335);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(842);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){var n=i(846);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},,,,,,,,,,function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(84),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this._queue=[]},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(86),BaseSoundManager:i(85),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(87),Map:i(114),ProcessQueue:i(332),RTree:i(333),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(97),Parsers:i(892),Formats:i(19),ImageCollection:i(347),ParseToTilemap:i(154),Tile:i(45),Tilemap:i(351),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(101),LayerData:i(75),MapData:i(76),ObjectLayer:i(349),DynamicTilemapLayer:i(352),StaticTilemapLayer:i(353)}},function(t,e,i){var n=i(15),s=i(35);t.exports=function(t,e,i,r,o,a,h,u){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var l=n(t,e,i,r,null,u),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(44),s=i(35),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(101);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(o,1),r.destroy()}for(s=0;s=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Renderer.WebGL.Utils + * @since 3.0.0 + */ +module.exports = { + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats + * @since 3.0.0 + * + * @param {number} r - [description] + * @param {number} g - [description] + * @param {number} b - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintFromFloats: function (r, g, b, a) + { + var ur = ((r * 255.0)|0) & 0xFF; + var ug = ((g * 255.0)|0) & 0xFF; + var ub = ((b * 255.0)|0) & 0xFF; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlpha: function (rgb, a) + { + var ua = ((a * 255.0)|0) & 0xFF; + return ((ua << 24) | rgb) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlphaAndSwap: function (rgb, a) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB + * @since 3.0.0 + * + * @param {number} rgb - [description] + * + * @return {number} [description] + */ + getFloatsFromUintRGB: function (rgb) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getComponentCount + * @since 3.0.0 + * + * @param {number} attributes - [description] + * + * @return {number} [description] + */ + getComponentCount: function (attributes) + { + var count = 0; + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + + if (element.type === WebGLRenderingContext.FLOAT) + { + count += element.size; + } + else + { + count += 1; // We'll force any other type to be 32 bit. for now + } + } + + return count; + } + +}; + + +/***/ }), +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4670,7 +4806,7 @@ module.exports = Contains; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(97); +var GetTileAt = __webpack_require__(98); var GetTilesWithin = __webpack_require__(15); /** @@ -4726,7 +4862,7 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4756,7 +4892,7 @@ module.exports = DegToRad; /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4766,7 +4902,7 @@ module.exports = DegToRad; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(115); +var GetColor = __webpack_require__(117); var GetColor32 = __webpack_require__(199); /** @@ -5270,7 +5406,7 @@ module.exports = Color; /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5282,7 +5418,7 @@ module.exports = Color; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var SpriteRender = __webpack_require__(444); +var SpriteRender = __webpack_require__(443); /** * @classdesc @@ -5423,136 +5559,6 @@ var Sprite = new Class({ module.exports = Sprite; -/***/ }), -/* 38 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Renderer.WebGL.Utils - * @since 3.0.0 - */ -module.exports = { - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats - * @since 3.0.0 - * - * @param {number} r - [description] - * @param {number} g - [description] - * @param {number} b - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintFromFloats: function (r, g, b, a) - { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlpha: function (rgb, a) - { - var ua = ((a * 255.0)|0) & 0xFF; - return ((ua << 24) | rgb) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlphaAndSwap: function (rgb, a) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB - * @since 3.0.0 - * - * @param {number} rgb - [description] - * - * @return {number} [description] - */ - getFloatsFromUintRGB: function (rgb) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getComponentCount - * @since 3.0.0 - * - * @param {number} attributes - [description] - * - * @return {number} [description] - */ - getComponentCount: function (attributes) - { - var count = 0; - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - - if (element.type === WebGLRenderingContext.FLOAT) - { - count += element.size; - } - else - { - count += 1; // We'll force any other type to be 32 bit. for now - } - } - - return count; - } - -}; - - /***/ }), /* 39 */ /***/ (function(module, exports) { @@ -6309,7 +6315,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(306); +var Rectangle = __webpack_require__(305); /** * @classdesc @@ -8341,9 +8347,9 @@ module.exports = Angle; var Class = __webpack_require__(0); var Contains = __webpack_require__(53); -var GetPoint = __webpack_require__(308); -var GetPoints = __webpack_require__(309); -var Random = __webpack_require__(111); +var GetPoint = __webpack_require__(307); +var GetPoints = __webpack_require__(308); +var Random = __webpack_require__(112); /** * @classdesc @@ -9135,11 +9141,11 @@ var Body = {}; module.exports = Body; -var Vertices = __webpack_require__(93); -var Vector = __webpack_require__(94); -var Sleeping = __webpack_require__(340); +var Vertices = __webpack_require__(94); +var Vector = __webpack_require__(95); +var Sleeping = __webpack_require__(339); var Common = __webpack_require__(39); -var Bounds = __webpack_require__(95); +var Bounds = __webpack_require__(96); var Axes = __webpack_require__(848); (function() { @@ -10806,9 +10812,9 @@ module.exports = { var Class = __webpack_require__(0); var Contains = __webpack_require__(32); -var GetPoint = __webpack_require__(178); -var GetPoints = __webpack_require__(179); -var Random = __webpack_require__(105); +var GetPoint = __webpack_require__(179); +var GetPoints = __webpack_require__(180); +var Random = __webpack_require__(106); /** * @classdesc @@ -11224,7 +11230,7 @@ module.exports = Length; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(120); +var FromPoints = __webpack_require__(122); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -11963,7 +11969,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(493))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(492))) /***/ }), /* 68 */ @@ -12017,13 +12023,13 @@ module.exports = Contains; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Actions = __webpack_require__(165); +var Actions = __webpack_require__(166); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(4); -var Range = __webpack_require__(273); +var Range = __webpack_require__(272); var Set = __webpack_require__(61); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * @classdesc @@ -13558,6 +13564,7 @@ var RectangleContains = __webpack_require__(33); * @constructor * @since 3.0.0 * + * @extends Phaser.GameObjects.Components.Depth * @extends Phaser.GameObjects.Components.GetBounds * @extends Phaser.GameObjects.Components.Origin * @extends Phaser.GameObjects.Components.ScaleMode @@ -13576,6 +13583,7 @@ var Zone = new Class({ Extends: GameObject, Mixins: [ + Components.Depth, Components.GetBounds, Components.Origin, Components.ScaleMode, @@ -14315,9 +14323,9 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GameObject = __webpack_require__(2); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); var Vector2 = __webpack_require__(6); -var Vector4 = __webpack_require__(118); +var Vector4 = __webpack_require__(120); /** * @classdesc @@ -14691,7 +14699,7 @@ module.exports = init(); */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); /** * @classdesc @@ -14872,6 +14880,16 @@ var WebGLPipeline = new Class({ * @since 3.0.0 */ this.vertexComponentCount = Utils.getComponentCount(config.attributes); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; }, /** @@ -15014,6 +15032,9 @@ var WebGLPipeline = new Class({ */ flush: function () { + if (this.flushLocked) return this; + this.flushLocked = true; + var gl = this.gl; var vertexCount = this.vertexCount; var vertexBuffer = this.vertexBuffer; @@ -15021,12 +15042,16 @@ var WebGLPipeline = new Class({ var topology = this.topology; var vertexSize = this.vertexSize; - if (vertexCount === 0) return; - + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); gl.drawArrays(topology, 0, vertexCount); this.vertexCount = 0; + this.flushLocked = false; return this; }, @@ -16386,6 +16411,921 @@ module.exports = BaseSound; /***/ }), /* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * [description] + * + * @class List + * @memberOf Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @param {any} parent - [description] + */ +var List = new Class({ + + initialize: + + function List (parent) + { + /** + * The parent of this list. + * + * @name Phaser.Structs.List#parent + * @type {any} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * The objects that belong to this collection. + * + * @name Phaser.Structs.List#list + * @type {array} + * @default [] + * @since 3.0.0 + */ + this.list = []; + + /** + * [description] + * + * @name Phaser.Structs.List#position + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.position = 0; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#add + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + add: function (child) + { + // Is child already in this display list? + + if (this.getIndex(child) === -1) + { + this.list.push(child); + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#addAt + * @since 3.0.0 + * + * @param {object} child - [description] + * @param {integer} index - [description] + * + * @return {object} [description] + */ + addAt: function (child, index) + { + if (index === undefined) { index = 0; } + + if (this.list.length === 0) + { + return this.add(child); + } + + if (index >= 0 && index <= this.list.length) + { + if (this.getIndex(child) === -1) + { + this.list.splice(index, 0, child); + } + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#addMultiple + * @since 3.0.0 + * + * @param {array} children - [description] + * + * @return {array} [description] + */ + addMultiple: function (children) + { + if (Array.isArray(children)) + { + for (var i = 0; i < children.length; i++) + { + this.add(children[i]); + } + } + + return children; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#getAt + * @since 3.0.0 + * + * @param {integer} index - [description] + * + * @return {object} [description] + */ + getAt: function (index) + { + return this.list[index]; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#getIndex + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {integer} [description] + */ + getIndex: function (child) + { + // Return -1 if given child isn't a child of this display list + return this.list.indexOf(child); + }, + + /** + * Given an array of objects, sort the array and return it, + * so that the objects are in index order with the lowest at the bottom. + * + * @method Phaser.Structs.List#sort + * @since 3.0.0 + * + * @param {array} children - [description] + * + * @return {array} [description] + */ + sort: function (children) + { + if (children === undefined) { children = this.list; } + + return children.sort(this.sortIndexHandler.bind(this)); + }, + + /** + * [description] + * + * @method Phaser.Structs.List#sortIndexHandler + * @since 3.0.0 + * + * @param {object} childA - [description] + * @param {object} childB - [description] + * + * @return {integer} [description] + */ + sortIndexHandler: function (childA, childB) + { + // The lower the index, the lower down the display list they are + var indexA = this.getIndex(childA); + var indexB = this.getIndex(childB); + + if (indexA < indexB) + { + return -1; + } + else if (indexA > indexB) + { + return 1; + } + + // Technically this shouldn't happen, but if the GO wasn't part of this display list then it'll + // have an index of -1, so in some cases it can + return 0; + }, + + /** + * Gets the first item from the set based on the property strictly equaling the value given. + * Returns null if not found. + * + * @method Phaser.Structs.List#getByKey + * @since 3.0.0 + * + * @param {string} property - The property to check against the value. + * @param {any} value - The value to check if the property strictly equals. + * + * @return {any} The item that was found, or null if nothing matched. + */ + getByKey: function (property, value) + { + for (var i = 0; i < this.list.length; i++) + { + if (this.list[i][property] === value) + { + return this.list[i]; + } + } + + return null; + }, + + /** + * Searches the Group for the first instance of a child with the `name` + * property matching the given argument. Should more than one child have + * the same name only the first instance is returned. + * + * @method Phaser.Structs.List#getByName + * @since 3.0.0 + * + * @param {string} name - The name to search for. + * + * @return {any} The first child with a matching name, or null if none were found. + */ + getByName: function (name) + { + return this.getByKey('name', name); + }, + + /** + * Returns a random child from the group. + * + * @method Phaser.Structs.List#getRandom + * @since 3.0.0 + * + * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child). + * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from. + * + * @return {any} A random child of this Group. + */ + getRandom: function (startIndex, length) + { + if (startIndex === undefined) { startIndex = 0; } + if (length === undefined) { length = this.list.length; } + + if (length === 0 || length > this.list.length) + { + return null; + } + + var randomIndex = startIndex + Math.floor(Math.random() * length); + + return this.list[randomIndex]; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#getFirst + * @since 3.0.0 + * + * @param {[type]} property - [description] + * @param {[type]} value - [description] + * @param {[type]} startIndex - [description] + * @param {[type]} endIndex - [description] + * + * @return {[type]} [description] + */ + getFirst: function (property, value, startIndex, endIndex) + { + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = this.list.length; } + + for (var i = startIndex; i < endIndex; i++) + { + var child = this.list[i]; + + if (child[property] === value) + { + return child; + } + } + + return null; + }, + + /** + * Returns all children in this List. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only children that have their visible property set. + * + * Optionally you can specify a start and end index. For example if this List had 100 children, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 children in the List. + * + * @method Phaser.Structs.List#getAll + * @since 3.0.0 + * + * @param {string} [property] - An optional property to test against the value argument. + * @param {any} [value] - If property is set then Child.property must strictly equal this value to be included in the results. + * @param {integer} [startIndex=0] - The first child index to start the search from. + * @param {integer} [endIndex] - The last child index to search up until. + * + * @return {array} [description] + */ + getAll: function (property, value, startIndex, endIndex) + { + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = this.list.length; } + + var output = []; + + for (var i = startIndex; i < endIndex; i++) + { + var child = this.list[i]; + + if (property) + { + if (child[property] === value) + { + output.push(child); + } + } + else + { + output.push(child); + } + } + + return output; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#count + * @since 3.0.0 + * + * @param {string} property - [description] + * @param {any} value - [description] + * + * @return {integer} [description] + */ + count: function (property, value) + { + var total = 0; + + for (var i = 0; i < this.list.length; i++) + { + var child = this.list[i]; + + if (child[property] === value) + { + total++; + } + } + + return total; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#swap + * @since 3.0.0 + * + * @param {object} child1 - [description] + * @param {object} child2 - [description] + */ + swap: function (child1, child2) + { + if (child1 === child2) + { + return; + } + + var index1 = this.getIndex(child1); + var index2 = this.getIndex(child2); + + if (index1 < 0 || index2 < 0) + { + throw new Error('List.swap: Supplied objects must be children of the same list'); + } + + this.list[index1] = child2; + this.list[index2] = child1; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#moveTo + * @since 3.0.0 + * + * @param {object} child - [description] + * @param {integer} index - [description] + * + * @return {object} [description] + */ + moveTo: function (child, index) + { + var currentIndex = this.getIndex(child); + + if (currentIndex === -1 || index < 0 || index >= this.list.length) + { + throw new Error('List.moveTo: The supplied index is out of bounds'); + } + + // Remove + this.list.splice(currentIndex, 1); + + // Add in new location + this.list.splice(index, 0, child); + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#remove + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + remove: function (child) + { + var index = this.list.indexOf(child); + + if (index !== -1) + { + this.list.splice(index, 1); + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#removeAt + * @since 3.0.0 + * + * @param {integer} index - [description] + * + * @return {object} [description] + */ + removeAt: function (index) + { + var child = this.list[index]; + + if (child) + { + this.children.splice(index, 1); + } + + return child; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#removeBetween + * @since 3.0.0 + * + * @param {integer} beginIndex - [description] + * @param {integer} endIndex - [description] + * + * @return {array} [description] + */ + removeBetween: function (beginIndex, endIndex) + { + if (beginIndex === undefined) { beginIndex = 0; } + if (endIndex === undefined) { endIndex = this.list.length; } + + var range = endIndex - beginIndex; + + if (range > 0 && range <= endIndex) + { + var removed = this.list.splice(beginIndex, range); + + return removed; + } + else if (range === 0 && this.list.length === 0) + { + return []; + } + else + { + throw new Error('List.removeBetween: Range Error, numeric values are outside the acceptable range'); + } + }, + + /** + * Removes all the items. + * + * @method Phaser.Structs.List#removeAll + * @since 3.0.0 + * + * @return {Phaser.Structs.List} This List object. + */ + removeAll: function () + { + var i = this.list.length; + + while (i--) + { + this.remove(this.list[i]); + } + + return this; + }, + + /** + * Brings the given child to the top of this List. + * + * @method Phaser.Structs.List#bringToTop + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + bringToTop: function (child) + { + if (this.getIndex(child) < this.list.length) + { + this.remove(child); + this.add(child); + } + + return child; + }, + + /** + * Sends the given child to the bottom of this List. + * + * @method Phaser.Structs.List#sendToBack + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + sendToBack: function (child) + { + if (this.getIndex(child) > 0) + { + this.remove(child); + this.addAt(child, 0); + } + + return child; + }, + + /** + * Moves the given child up one place in this group unless it's already at the top. + * + * @method Phaser.Structs.List#moveUp + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + moveUp: function (child) + { + var a = this.getIndex(child); + + if (a !== -1 && a < this.list.length - 1) + { + var b = this.getAt(a + 1); + + if (b) + { + this.swap(child, b); + } + } + + return child; + }, + + /** + * Moves the given child down one place in this group unless it's already at the bottom. + * + * @method Phaser.Structs.List#moveDown + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {object} [description] + */ + moveDown: function (child) + { + var a = this.getIndex(child); + + if (a > 0) + { + var b = this.getAt(a - 1); + + if (b) + { + this.swap(child, b); + } + } + + return child; + }, + + /** + * Reverses the order of all children in this List. + * + * @method Phaser.Structs.List#reverse + * @since 3.0.0 + * + * @return {Phaser.Structs.List} This List object. + */ + reverse: function () + { + this.list.reverse(); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Structs.List#shuffle + * @since 3.0.0 + * + * @return {Phaser.Structs.List} This List object. + */ + shuffle: function () + { + for (var i = this.list.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = this.list[i]; + this.list[i] = this.list[j]; + this.list[j] = temp; + } + + return this; + }, + + /** + * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List. + * + * @method Phaser.Structs.List#replace + * @since 3.0.0 + * + * @param {object} oldChild - The child in this List that will be replaced. + * @param {object} newChild - The child to be inserted into this List. + * + * @return {object} Returns the oldChild that was replaced within this group. + */ + replace: function (oldChild, newChild) + { + var index = this.getIndex(oldChild); + + if (index !== -1) + { + this.remove(oldChild); + + this.addAt(newChild, index); + + return oldChild; + } + }, + + /** + * [description] + * + * @method Phaser.Structs.List#exists + * @since 3.0.0 + * + * @param {object} child - [description] + * + * @return {boolean} True if the item is found in the list, otherwise false. + */ + exists: function (child) + { + return (this.list.indexOf(child) > -1); + }, + + /** + * Sets the property `key` to the given value on all members of this List. + * + * @method Phaser.Structs.List#setAll + * @since 3.0.0 + * + * @param {string} key - [description] + * @param {any} value - [description] + */ + setAll: function (key, value) + { + for (var i = 0; i < this.list.length; i++) + { + if (this.list[i]) + { + this.list[i][key] = value; + } + } + }, + + /** + * Passes all children to the given callback. + * + * @method Phaser.Structs.List#each + * @since 3.0.0 + * + * @param {function} callback - The function to call. + * @param {object} [thisArg] - Value to use as `this` when executing callback. + * @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the child. + */ + each: function (callback, thisArg) + { + var args = [ null ]; + + for (var i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < this.list.length; i++) + { + args[0] = this.list[i]; + callback.apply(thisArg, args); + } + }, + + /** + * [description] + * + * @method Phaser.Structs.List#shutdown + * @since 3.0.0 + */ + shutdown: function () + { + this.removeAll(); + }, + + /** + * [description] + * + * @method Phaser.Structs.List#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAll(); + + this.list = []; + + this.parent = null; + }, + + /** + * [description] + * + * @name Phaser.Structs.List#length + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + length: { + + get: function () + { + return this.list.length; + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#first + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + first: { + + get: function () + { + this.position = 0; + + if (this.list.length > 0) + { + return this.list[0]; + } + else + { + return null; + } + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#last + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + last: { + + get: function () + { + if (this.list.length > 0) + { + this.position = this.list.length - 1; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#next + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + next: { + + get: function () + { + if (this.position < this.list.length) + { + this.position++; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * [description] + * + * @name Phaser.Structs.List#previous + * @type {integer} + * @readOnly + * @since 3.0.0 + */ + previous: { + + get: function () + { + if (this.position > 0) + { + this.position--; + + return this.list[this.position]; + } + else + { + return null; + } + } + + } + +}); + +module.exports = List; + + +/***/ }), +/* 88 */ /***/ (function(module, exports) { /** @@ -16557,7 +17497,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16717,7 +17657,7 @@ module.exports = Mesh; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16793,7 +17733,7 @@ module.exports = LineToLine; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -16856,7 +17796,7 @@ module.exports = XHRSettings; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16866,8 +17806,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(327); -var Sprite = __webpack_require__(37); +var Components = __webpack_require__(326); +var Sprite = __webpack_require__(38); /** * @classdesc @@ -16953,7 +17893,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16971,11 +17911,11 @@ var Bodies = {}; module.exports = Bodies; -var Vertices = __webpack_require__(93); +var Vertices = __webpack_require__(94); var Common = __webpack_require__(39); var Body = __webpack_require__(59); -var Bounds = __webpack_require__(95); -var Vector = __webpack_require__(94); +var Bounds = __webpack_require__(96); +var Vector = __webpack_require__(95); var decomp = __webpack_require__(937); (function() { @@ -17290,7 +18230,7 @@ var decomp = __webpack_require__(937); /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17307,7 +18247,7 @@ var Vertices = {}; module.exports = Vertices; -var Vector = __webpack_require__(94); +var Vector = __webpack_require__(95); var Common = __webpack_require__(39); (function() { @@ -17754,7 +18694,7 @@ var Common = __webpack_require__(39); /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -17998,7 +18938,7 @@ module.exports = Vector; })(); /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports) { /** @@ -18124,7 +19064,7 @@ module.exports = Bounds; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18139,8 +19079,8 @@ module.exports = Bounds; module.exports = { - CalculateFacesAt: __webpack_require__(149), - CalculateFacesWithin: __webpack_require__(34), + CalculateFacesAt: __webpack_require__(150), + CalculateFacesWithin: __webpack_require__(35), Copy: __webpack_require__(863), CreateFromTiles: __webpack_require__(864), CullTiles: __webpack_require__(865), @@ -18149,22 +19089,22 @@ module.exports = { FindByIndex: __webpack_require__(868), FindTile: __webpack_require__(869), ForEachTile: __webpack_require__(870), - GetTileAt: __webpack_require__(97), + GetTileAt: __webpack_require__(98), GetTileAtWorldXY: __webpack_require__(871), GetTilesWithin: __webpack_require__(15), GetTilesWithinShape: __webpack_require__(872), GetTilesWithinWorldXY: __webpack_require__(873), - HasTileAt: __webpack_require__(342), + HasTileAt: __webpack_require__(341), HasTileAtWorldXY: __webpack_require__(874), IsInLayerBounds: __webpack_require__(74), - PutTileAt: __webpack_require__(150), + PutTileAt: __webpack_require__(151), PutTileAtWorldXY: __webpack_require__(875), PutTilesAt: __webpack_require__(876), Randomize: __webpack_require__(877), - RemoveTileAt: __webpack_require__(343), + RemoveTileAt: __webpack_require__(342), RemoveTileAtWorldXY: __webpack_require__(878), RenderDebug: __webpack_require__(879), - ReplaceByIndex: __webpack_require__(341), + ReplaceByIndex: __webpack_require__(340), SetCollision: __webpack_require__(880), SetCollisionBetween: __webpack_require__(881), SetCollisionByExclusion: __webpack_require__(882), @@ -18174,9 +19114,9 @@ module.exports = { SetTileLocationCallback: __webpack_require__(886), Shuffle: __webpack_require__(887), SwapByIndex: __webpack_require__(888), - TileToWorldX: __webpack_require__(98), + TileToWorldX: __webpack_require__(99), TileToWorldXY: __webpack_require__(889), - TileToWorldY: __webpack_require__(99), + TileToWorldY: __webpack_require__(100), WeightedRandomize: __webpack_require__(890), WorldToTileX: __webpack_require__(40), WorldToTileXY: __webpack_require__(891), @@ -18186,7 +19126,7 @@ module.exports = { /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18242,7 +19182,7 @@ module.exports = GetTileAt; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -18286,7 +19226,7 @@ module.exports = TileToWorldX; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports) { /** @@ -18330,7 +19270,7 @@ module.exports = TileToWorldY; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18722,7 +19662,7 @@ module.exports = Tileset; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -18785,7 +19725,7 @@ module.exports = GetNewValue; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18794,17 +19734,17 @@ module.exports = GetNewValue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(156); +var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(101); -var GetProps = __webpack_require__(356); -var GetTargets = __webpack_require__(154); +var GetNewValue = __webpack_require__(102); +var GetProps = __webpack_require__(355); +var GetTargets = __webpack_require__(155); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(155); -var Tween = __webpack_require__(157); -var TweenData = __webpack_require__(158); +var GetValueOp = __webpack_require__(156); +var Tween = __webpack_require__(158); +var TweenData = __webpack_require__(159); /** * [description] @@ -18916,7 +19856,7 @@ module.exports = TweenBuilder; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18958,7 +19898,7 @@ module.exports = Merge; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18995,7 +19935,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19037,7 +19977,7 @@ module.exports = Random; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19112,7 +20052,7 @@ module.exports = GetPoint; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19148,7 +20088,7 @@ module.exports = Random; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19206,7 +20146,7 @@ module.exports = GetPoints; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19245,7 +20185,7 @@ module.exports = Random; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19283,7 +20223,7 @@ module.exports = Random; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19337,7 +20277,7 @@ module.exports = Random; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -19374,7 +20314,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19699,7 +20639,1359 @@ module.exports = Map; /***/ }), -/* 114 */ +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var DegToRad = __webpack_require__(36); +var Rectangle = __webpack_require__(8); +var TransformMatrix = __webpack_require__(185); +var ValueToColor = __webpack_require__(116); +var Vector2 = __webpack_require__(6); + +/** + * @classdesc + * [description] + * + * @class Camera + * @memberOf Phaser.Cameras.Scene2D + * @constructor + * @since 3.0.0 + * + * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. + * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. + * @param {number} width - The width of the Camera, in pixels. + * @param {number} height - The height of the Camera, in pixels. + */ +var Camera = new Class({ + + initialize: + + function Camera (x, y, width, height) + { + /** + * A reference to the Scene this camera belongs to. + * + * @name Phaser.Cameras.Scene2D.Camera#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene; + + /** + * The name of the Camera. This is left empty for your own use. + * + * @name Phaser.Cameras.Scene2D.Camera#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The x position of the Camera, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.Camera#x + * @type {number} + * @since 3.0.0 + */ + this.x = x; + + /** + * The y position of the Camera, relative to the top-left of the game canvas. + * + * @name Phaser.Cameras.Scene2D.Camera#y + * @type {number} + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Camera, in pixels. + * + * @name Phaser.Cameras.Scene2D.Camera#width + * @type {number} + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Camera, in pixels. + * + * @name Phaser.Cameras.Scene2D.Camera#height + * @type {number} + * @since 3.0.0 + */ + this.height = height; + + /** + * Should this camera round its pixel values to integers? + * + * @name Phaser.Cameras.Scene2D.Camera#roundPixels + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.roundPixels = false; + + /** + * Is this Camera using a bounds to restrict scrolling movement? + * Set this property along with the bounds via `Camera.setBounds`. + * + * @name Phaser.Cameras.Scene2D.Camera#useBounds + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.useBounds = false; + + /** + * The bounds the camera is restrained to during scrolling. + * + * @name Phaser.Cameras.Scene2D.Camera#_bounds + * @type {Phaser.Geom.Rectangle} + * @private + * @since 3.0.0 + */ + this._bounds = new Rectangle(); + + /** + * Does this Camera allow the Game Objects it renders to receive input events? + * + * @name Phaser.Cameras.Scene2D.Camera#inputEnabled + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.inputEnabled = true; + + /** + * The horizontal scroll position of this camera. + * Optionally restricted via the Camera bounds. + * + * @name Phaser.Cameras.Scene2D.Camera#scrollX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.scrollX = 0; + + /** + * The vertical scroll position of this camera. + * Optionally restricted via the Camera bounds. + * + * @name Phaser.Cameras.Scene2D.Camera#scrollY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.scrollY = 0; + + /** + * The Camera zoom value. Change this value to zoom in, or out of, a Scene. + * Set to 1 to return to the default zoom level. + * + * @name Phaser.Cameras.Scene2D.Camera#zoom + * @type {float} + * @default 1 + * @since 3.0.0 + */ + this.zoom = 1; + + /** + * The rotation of the Camera. This influences the rendering of all Game Objects visible by this camera. + * + * @name Phaser.Cameras.Scene2D.Camera#rotation + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.rotation = 0; + + /** + * A local transform matrix used for internal calculations. + * + * @name Phaser.Cameras.Scene2D.Camera#matrix + * @type {TransformMatrix} + * @since 3.0.0 + */ + this.matrix = new TransformMatrix(1, 0, 0, 1, 0, 0); + + /** + * Does this Camera have a transparent background? + * + * @name Phaser.Cameras.Scene2D.Camera#transparent + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.transparent = true; + + /** + * TODO + * + * @name Phaser.Cameras.Scene2D.Camera#clearBeforeRender + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.clearBeforeRender = true; + + /** + * The background color of this Camera. Only used if `transparent` is `false`. + * + * @name Phaser.Cameras.Scene2D.Camera#backgroundColor + * @type {Phaser.Display.Color} + * @since 3.0.0 + */ + this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); + + /** + * Should the camera cull Game Objects before rendering? + * In some special cases it may be beneficial to disable this. + * + * @name Phaser.Cameras.Scene2D.Camera#disableCull + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.disableCull = false; + + /** + * A temporary array of culled objects. + * + * @name Phaser.Cameras.Scene2D.Camera#culledObjects + * @type {array} + * @default [] + * @since 3.0.0 + */ + this.culledObjects = []; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeDuration + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeDuration = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeIntensity + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeIntensity = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetX + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeOffsetX = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetY + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._shakeOffsetY = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeDuration + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeDuration = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeRed + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeRed = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeGreen + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeGreen = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeBlue + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeBlue = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_fadeAlpha + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._fadeAlpha = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashDuration + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._flashDuration = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashRed + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._flashRed = 1; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashGreen + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._flashGreen = 1; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashBlue + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._flashBlue = 1; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_flashAlpha + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._flashAlpha = 0; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_follow + * @type {?any} + * @private + * @default null + * @since 3.0.0 + */ + this._follow = null; + + /** + * [description] + * + * @name Phaser.Cameras.Scene2D.Camera#_id + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + this._id = 0; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#centerToBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + centerToBounds: function () + { + this.scrollX = (this._bounds.width * 0.5) - (this.width * 0.5); + this.scrollY = (this._bounds.height * 0.5) - (this.height * 0.5); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#centerToSize + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + centerToSize: function () + { + this.scrollX = this.width * 0.5; + this.scrollY = this.height * 0.5; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#cull + * @since 3.0.0 + * + * @param {array} renderableObjects - [description] + * + * @return {array} [description] + */ + cull: function (renderableObjects) + { + if (this.disableCull) + { + return renderableObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return renderableObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = renderableObjects.length; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var object = renderableObjects[index]; + + if (!object.hasOwnProperty('width')) + { + culledObjects.push(object); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || + tw > -objectW || th > -objectH || tw < cullW || th < cullH) + { + culledObjects.push(object); + } + } + + return culledObjects; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#cullHitTest + * @since 3.0.0 + * + * @param {array} interactiveObjects - [description] + * + * @return {array} [description] + */ + cullHitTest: function (interactiveObjects) + { + if (this.disableCull) + { + return interactiveObjects; + } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return interactiveObjects; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var length = interactiveObjects.length; + + determinant = 1 / determinant; + + var culledObjects = []; + + for (var index = 0; index < length; ++index) + { + var object = interactiveObjects[index].gameObject; + + if (!object.hasOwnProperty('width')) + { + culledObjects.push(interactiveObjects[index]); + continue; + } + + var objectW = object.width; + var objectH = object.height; + var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); + var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); + var tx = (objectX * mva + objectY * mvc + mve); + var ty = (objectX * mvb + objectY * mvd + mvf); + var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); + var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); + var cullW = cameraW + objectW; + var cullH = cameraH + objectH; + + if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || + tw > -objectW || th > -objectH || tw < cullW || th < cullH) + { + culledObjects.push(interactiveObjects[index]); + } + } + + return culledObjects; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#cullTilemap + * @since 3.0.0 + * + * @param {array} tilemap - [description] + * + * @return {array} [description] + */ + cullTilemap: function (tilemap) + { + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + return tiles; + } + + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + var tiles = tilemap.tiles; + var scrollX = this.scrollX; + var scrollY = this.scrollY; + var cameraW = this.width; + var cameraH = this.height; + var culledObjects = this.culledObjects; + var length = tiles.length; + var tileW = tilemap.tileWidth; + var tileH = tilemap.tileHeight; + var cullW = cameraW + tileW; + var cullH = cameraH + tileH; + var scrollFactorX = tilemap.scrollFactorX; + var scrollFactorY = tilemap.scrollFactorY; + + determinant = 1 / determinant; + + culledObjects.length = 0; + + for (var index = 0; index < length; ++index) + { + var tile = tiles[index]; + var tileX = (tile.x - (scrollX * scrollFactorX)); + var tileY = (tile.y - (scrollY * scrollFactorY)); + var tx = (tileX * mva + tileY * mvc + mve); + var ty = (tileX * mvb + tileY * mvd + mvf); + var tw = ((tileX + tileW) * mva + (tileY + tileH) * mvc + mve); + var th = ((tileX + tileW) * mvb + (tileY + tileH) * mvd + mvf); + + if (tx > -tileW && ty > -tileH && tw < cullW && th < cullH) + { + culledObjects.push(tile); + } + } + + return culledObjects; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#fade + * @since 3.0.0 + * + * @param {number} duration - [description] + * @param {number} red - [description] + * @param {number} green - [description] + * @param {number} blue - [description] + * @param {number} force - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + fade: function (duration, red, green, blue, force) + { + if (red === undefined) { red = 0; } + if (green === undefined) { green = 0; } + if (blue === undefined) { blue = 0; } + + if (!force && this._fadeAlpha > 0) + { + return this; + } + + this._fadeRed = red; + this._fadeGreen = green; + this._fadeBlue = blue; + + if (duration <= 0) + { + duration = Number.MIN_VALUE; + } + + this._fadeDuration = duration; + this._fadeAlpha = Number.MIN_VALUE; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#flash + * @since 3.0.0 + * + * @param {number} duration - [description] + * @param {number} red - [description] + * @param {number} green - [description] + * @param {number} blue - [description] + * @param {number} force - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + flash: function (duration, red, green, blue, force) + { + if (!force && this._flashAlpha > 0.0) + { + return this; + } + + if (red === undefined) { red = 1.0; } + if (green === undefined) { green = 1.0; } + if (blue === undefined) { blue = 1.0; } + + this._flashRed = red; + this._flashGreen = green; + this._flashBlue = blue; + + if (duration <= 0) + { + duration = Number.MIN_VALUE; + } + + this._flashDuration = duration; + this._flashAlpha = 1.0; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#getWorldPoint + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * @param {object|Phaser.Math.Vector2} output - [description] + * + * @return {Phaser.Math.Vector2} [description] + */ + getWorldPoint: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var cameraMatrix = this.matrix.matrix; + + var mva = cameraMatrix[0]; + var mvb = cameraMatrix[1]; + var mvc = cameraMatrix[2]; + var mvd = cameraMatrix[3]; + var mve = cameraMatrix[4]; + var mvf = cameraMatrix[5]; + + /* First Invert Matrix */ + var determinant = (mva * mvd) - (mvb * mvc); + + if (!determinant) + { + output.x = x; + output.y = y; + + return output; + } + + determinant = 1 / determinant; + + var ima = mvd * determinant; + var imb = -mvb * determinant; + var imc = -mvc * determinant; + var imd = mva * determinant; + var ime = (mvc * mvf - mvd * mve) * determinant; + var imf = (mvb * mve - mva * mvf) * determinant; + + var c = Math.cos(this.rotation); + var s = Math.sin(this.rotation); + + var zoom = this.zoom; + + var scrollX = this.scrollX; + var scrollY = this.scrollY; + + var 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 + ime); + output.y = (sx * imb + sy * imd + imf); + + return output; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#ignore + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} gameObjectOrArray - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + ignore: function (gameObjectOrArray) + { + if (gameObjectOrArray instanceof Array) + { + for (var index = 0; index < gameObjectOrArray.length; ++index) + { + gameObjectOrArray[index].cameraFilter |= this._id; + } + } + else + { + gameObjectOrArray.cameraFilter |= this._id; + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#preRender + * @since 3.0.0 + * + * @param {number} baseScale - [description] + * @param {number} resolution - [description] + * + */ + preRender: function (baseScale, resolution) + { + var width = this.width; + var height = this.height; + var zoom = this.zoom * baseScale; + var matrix = this.matrix; + var originX = width / 2; + var originY = height / 2; + var follow = this._follow; + + if (follow !== null) + { + originX = follow.x; + originY = follow.y; + + this.scrollX = originX - width * 0.5; + this.scrollY = originY - height * 0.5; + } + + if (this.useBounds) + { + var bounds = this._bounds; + + var bw = Math.max(0, bounds.right - width); + var bh = Math.max(0, bounds.bottom - height); + + if (this.scrollX < bounds.x) + { + this.scrollX = bounds.x; + } + else if (this.scrollX > bw) + { + this.scrollX = bw; + } + + if (this.scrollY < bounds.y) + { + this.scrollY = bounds.y; + } + else if (this.scrollY > bh) + { + this.scrollY = bh; + } + } + + if (this.roundPixels) + { + this.scrollX = Math.round(this.scrollX); + this.scrollY = Math.round(this.scrollY); + } + + matrix.loadIdentity(); + matrix.scale(resolution, resolution); + matrix.translate(this.x + originX, this.y + originY); + matrix.rotate(this.rotation); + matrix.scale(zoom, zoom); + matrix.translate(-originX, -originY); + matrix.translate(this._shakeOffsetX, this._shakeOffsetY); + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#removeBounds + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + removeBounds: function () + { + this.useBounds = false; + + this._bounds.setEmpty(); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setAngle + * @since 3.0.0 + * + * @param {number} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setAngle: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = DegToRad(value); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setBackgroundColor + * @since 3.0.0 + * + * @param {integer} color - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setBackgroundColor: function (color) + { + if (color === undefined) { color = 'rgba(0,0,0,0)'; } + + this.backgroundColor = ValueToColor(color); + + this.transparent = (this.backgroundColor.alpha === 0); + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setBounds + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} width - [description] + * @param {number} height - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setBounds: function (x, y, width, height) + { + this._bounds.setTo(x, y, width, height); + + this.useBounds = true; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setName + * @since 3.0.0 + * + * @param {string} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setName: function (value) + { + if (value === undefined) { value = ''; } + + this.name = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setPosition + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setRotation + * @since 3.0.0 + * + * @param {number} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setRotation: function (value) + { + if (value === undefined) { value = 0; } + + this.rotation = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setRoundPixels + * @since 3.0.0 + * + * @param {boolean} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setRoundPixels: function (value) + { + this.roundPixels = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setScene + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setScene: function (scene) + { + this.scene = scene; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setScroll + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setScroll: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollX = x; + this.scrollY = y; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setSize + * @since 3.0.0 + * + * @param {number} width - [description] + * @param {number} height - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setViewport + * @since 3.0.0 + * + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} width - [description] + * @param {number} height - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setViewport: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#setZoom + * @since 3.0.0 + * + * @param {float} value - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + setZoom: function (value) + { + if (value === undefined) { value = 1; } + + this.zoom = value; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#shake + * @since 3.0.0 + * + * @param {number} duration - [description] + * @param {number} intensity - [description] + * @param {number} force - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + shake: function (duration, intensity, force) + { + if (intensity === undefined) { intensity = 0.05; } + + if (!force && (this._shakeOffsetX !== 0 || this._shakeOffsetY !== 0)) + { + return this; + } + + this._shakeDuration = duration; + this._shakeIntensity = intensity; + this._shakeOffsetX = 0; + this._shakeOffsetY = 0; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#startFollow + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject|object} gameObjectOrPoint - [description] + * @param {boolean} roundPx - [description] + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + startFollow: function (gameObjectOrPoint, roundPx) + { + this._follow = gameObjectOrPoint; + + if (roundPx !== undefined) + { + this.roundPixels = roundPx; + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#stopFollow + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + stopFollow: function () + { + this._follow = null; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#toJSON + * @since 3.0.0 + * + * @return {object} [description] + */ + toJSON: function () + { + var output = { + name: this.name, + x: this.x, + y: this.y, + width: this.width, + height: this.height, + zoom: this.zoom, + rotation: this.rotation, + roundPixels: this.roundPixels, + scrollX: this.scrollX, + scrollY: this.scrollY, + backgroundColor: this.backgroundColor.rgba + }; + + if (this.useBounds) + { + output['bounds'] = { + x: this._bounds.x, + y: this._bounds.y, + width: this._bounds.width, + height: this._bounds.height + }; + } + + return output; + }, + + /** + * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to + * remove the fade. + * + * @method Phaser.Cameras.Scene2D.Camera#resetFX + * @since 3.0.0 + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + resetFX: function () + { + this._flashAlpha = 0; + this._fadeAlpha = 0; + this._shakeOffsetX = 0.0; + this._shakeOffsetY = 0.0; + this._shakeDuration = 0; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#update + * @since 3.0.0 + * + * @param {[type]} timestep - [description] + * @param {[type]} delta - [description] + */ + update: function (timestep, delta) + { + if (this._flashAlpha > 0.0) + { + this._flashAlpha -= delta / this._flashDuration; + + if (this._flashAlpha < 0.0) + { + this._flashAlpha = 0.0; + } + } + + if (this._fadeAlpha > 0.0 && this._fadeAlpha < 1.0) + { + this._fadeAlpha += delta / this._fadeDuration; + + if (this._fadeAlpha >= 1.0) + { + this._fadeAlpha = 1.0; + } + } + + if (this._shakeDuration > 0.0) + { + var intensity = this._shakeIntensity; + + this._shakeDuration -= delta; + + if (this._shakeDuration <= 0.0) + { + this._shakeOffsetX = 0.0; + this._shakeOffsetY = 0.0; + } + else + { + this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; + this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; + } + } + }, + + /** + * [description] + * + * @method Phaser.Cameras.Scene2D.Camera#destroy + * @since 3.0.0 + */ + destroy: function () + { + this._bounds = undefined; + this.matrix = undefined; + this.culledObjects = []; + this.scene = undefined; + } + +}); + +module.exports = Camera; + + +/***/ }), +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19755,7 +22047,7 @@ module.exports = ValueToColor; /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -19785,7 +22077,7 @@ module.exports = GetColor; /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19795,7 +22087,7 @@ module.exports = GetColor; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(117); +var Matrix4 = __webpack_require__(119); var RandomXYZ = __webpack_require__(204); var RandomXYZW = __webpack_require__(205); var RotateVec3 = __webpack_require__(206); @@ -19803,7 +22095,7 @@ var Set = __webpack_require__(61); var Sprite3D = __webpack_require__(81); var Vector2 = __webpack_require__(6); var Vector3 = __webpack_require__(51); -var Vector4 = __webpack_require__(118); +var Vector4 = __webpack_require__(120); // Local cache vars var tmpVec3 = new Vector3(); @@ -20853,7 +23145,7 @@ module.exports = Camera; /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22294,7 +24586,7 @@ module.exports = Matrix4; /***/ }), -/* 118 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22822,7 +25114,7 @@ module.exports = Vector4; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -22954,7 +25246,7 @@ module.exports = Smoothing(); /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23037,7 +25329,7 @@ module.exports = FromPoints; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -23074,7 +25366,7 @@ module.exports = CatmullRom; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -23136,7 +25428,7 @@ module.exports = AddToDOM; /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23337,7 +25629,7 @@ module.exports = init(); /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports) { /** @@ -23367,7 +25659,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 125 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -23406,7 +25698,7 @@ module.exports = { /***/ }), -/* 126 */ +/* 128 */ /***/ (function(module, exports) { /** @@ -23981,7 +26273,7 @@ module.exports = { /***/ }), -/* 127 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23992,8 +26284,8 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(84); -var GetPhysicsPlugins = __webpack_require__(526); -var GetScenePlugins = __webpack_require__(527); +var GetPhysicsPlugins = __webpack_require__(525); +var GetScenePlugins = __webpack_require__(526); var Plugins = __webpack_require__(231); var Settings = __webpack_require__(252); @@ -24533,7 +26825,7 @@ module.exports = Systems; /***/ }), -/* 128 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25118,922 +27410,7 @@ module.exports = Frame; /***/ }), -/* 129 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * [description] - * - * @class List - * @memberOf Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @param {any} parent - [description] - */ -var List = new Class({ - - initialize: - - function List (parent) - { - /** - * The parent of this list. - * - * @name Phaser.Structs.List#parent - * @type {any} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * The objects that belong to this collection. - * - * @name Phaser.Structs.List#list - * @type {array} - * @default [] - * @since 3.0.0 - */ - this.list = []; - - /** - * [description] - * - * @name Phaser.Structs.List#position - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.position = 0; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#add - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - add: function (child) - { - // Is child already in this display list? - - if (this.getIndex(child) === -1) - { - this.list.push(child); - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#addAt - * @since 3.0.0 - * - * @param {object} child - [description] - * @param {integer} index - [description] - * - * @return {object} [description] - */ - addAt: function (child, index) - { - if (index === undefined) { index = 0; } - - if (this.list.length === 0) - { - return this.add(child); - } - - if (index >= 0 && index <= this.list.length) - { - if (this.getIndex(child) === -1) - { - this.list.splice(index, 0, child); - } - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#addMultiple - * @since 3.0.0 - * - * @param {array} children - [description] - * - * @return {array} [description] - */ - addMultiple: function (children) - { - if (Array.isArray(children)) - { - for (var i = 0; i < children.length; i++) - { - this.add(children[i]); - } - } - - return children; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#getAt - * @since 3.0.0 - * - * @param {integer} index - [description] - * - * @return {object} [description] - */ - getAt: function (index) - { - return this.list[index]; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#getIndex - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {integer} [description] - */ - getIndex: function (child) - { - // Return -1 if given child isn't a child of this display list - return this.list.indexOf(child); - }, - - /** - * Given an array of objects, sort the array and return it, - * so that the objects are in index order with the lowest at the bottom. - * - * @method Phaser.Structs.List#sort - * @since 3.0.0 - * - * @param {array} children - [description] - * - * @return {array} [description] - */ - sort: function (children) - { - if (children === undefined) { children = this.list; } - - return children.sort(this.sortIndexHandler.bind(this)); - }, - - /** - * [description] - * - * @method Phaser.Structs.List#sortIndexHandler - * @since 3.0.0 - * - * @param {object} childA - [description] - * @param {object} childB - [description] - * - * @return {integer} [description] - */ - sortIndexHandler: function (childA, childB) - { - // The lower the index, the lower down the display list they are - var indexA = this.getIndex(childA); - var indexB = this.getIndex(childB); - - if (indexA < indexB) - { - return -1; - } - else if (indexA > indexB) - { - return 1; - } - - // Technically this shouldn't happen, but if the GO wasn't part of this display list then it'll - // have an index of -1, so in some cases it can - return 0; - }, - - /** - * Gets the first item from the set based on the property strictly equaling the value given. - * Returns null if not found. - * - * @method Phaser.Structs.List#getByKey - * @since 3.0.0 - * - * @param {string} property - The property to check against the value. - * @param {any} value - The value to check if the property strictly equals. - * - * @return {any} The item that was found, or null if nothing matched. - */ - getByKey: function (property, value) - { - for (var i = 0; i < this.list.length; i++) - { - if (this.list[i][property] === value) - { - return this.list[i]; - } - } - - return null; - }, - - /** - * Searches the Group for the first instance of a child with the `name` - * property matching the given argument. Should more than one child have - * the same name only the first instance is returned. - * - * @method Phaser.Structs.List#getByName - * @since 3.0.0 - * - * @param {string} name - The name to search for. - * - * @return {any} The first child with a matching name, or null if none were found. - */ - getByName: function (name) - { - return this.getByKey('name', name); - }, - - /** - * Returns a random child from the group. - * - * @method Phaser.Structs.List#getRandom - * @since 3.0.0 - * - * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child). - * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from. - * - * @return {any} A random child of this Group. - */ - getRandom: function (startIndex, length) - { - if (startIndex === undefined) { startIndex = 0; } - if (length === undefined) { length = this.list.length; } - - if (length === 0 || length > this.list.length) - { - return null; - } - - var randomIndex = startIndex + Math.floor(Math.random() * length); - - return this.list[randomIndex]; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#getFirst - * @since 3.0.0 - * - * @param {[type]} property - [description] - * @param {[type]} value - [description] - * @param {[type]} startIndex - [description] - * @param {[type]} endIndex - [description] - * - * @return {[type]} [description] - */ - getFirst: function (property, value, startIndex, endIndex) - { - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = this.list.length; } - - for (var i = startIndex; i < endIndex; i++) - { - var child = this.list[i]; - - if (child[property] === value) - { - return child; - } - } - - return null; - }, - - /** - * Returns all children in this List. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only children that have their visible property set. - * - * Optionally you can specify a start and end index. For example if this List had 100 children, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 children in the List. - * - * @method Phaser.Structs.List#getAll - * @since 3.0.0 - * - * @param {string} [property] - An optional property to test against the value argument. - * @param {any} [value] - If property is set then Child.property must strictly equal this value to be included in the results. - * @param {integer} [startIndex=0] - The first child index to start the search from. - * @param {integer} [endIndex] - The last child index to search up until. - * - * @return {array} [description] - */ - getAll: function (property, value, startIndex, endIndex) - { - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = this.list.length; } - - var output = []; - - for (var i = startIndex; i < endIndex; i++) - { - var child = this.list[i]; - - if (property) - { - if (child[property] === value) - { - output.push(child); - } - } - else - { - output.push(child); - } - } - - return output; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#count - * @since 3.0.0 - * - * @param {string} property - [description] - * @param {any} value - [description] - * - * @return {integer} [description] - */ - count: function (property, value) - { - var total = 0; - - for (var i = 0; i < this.list.length; i++) - { - var child = this.list[i]; - - if (child[property] === value) - { - total++; - } - } - - return total; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#swap - * @since 3.0.0 - * - * @param {object} child1 - [description] - * @param {object} child2 - [description] - */ - swap: function (child1, child2) - { - if (child1 === child2) - { - return; - } - - var index1 = this.getIndex(child1); - var index2 = this.getIndex(child2); - - if (index1 < 0 || index2 < 0) - { - throw new Error('List.swap: Supplied objects must be children of the same list'); - } - - this.list[index1] = child2; - this.list[index2] = child1; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#moveTo - * @since 3.0.0 - * - * @param {object} child - [description] - * @param {integer} index - [description] - * - * @return {object} [description] - */ - moveTo: function (child, index) - { - var currentIndex = this.getIndex(child); - - if (currentIndex === -1 || index < 0 || index >= this.list.length) - { - throw new Error('List.moveTo: The supplied index is out of bounds'); - } - - // Remove - this.list.splice(currentIndex, 1); - - // Add in new location - this.list.splice(index, 0, child); - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#remove - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - remove: function (child) - { - var index = this.list.indexOf(child); - - if (index !== -1) - { - this.list.splice(index, 1); - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#removeAt - * @since 3.0.0 - * - * @param {integer} index - [description] - * - * @return {object} [description] - */ - removeAt: function (index) - { - var child = this.list[index]; - - if (child) - { - this.children.splice(index, 1); - } - - return child; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#removeBetween - * @since 3.0.0 - * - * @param {integer} beginIndex - [description] - * @param {integer} endIndex - [description] - * - * @return {array} [description] - */ - removeBetween: function (beginIndex, endIndex) - { - if (beginIndex === undefined) { beginIndex = 0; } - if (endIndex === undefined) { endIndex = this.list.length; } - - var range = endIndex - beginIndex; - - if (range > 0 && range <= endIndex) - { - var removed = this.list.splice(beginIndex, range); - - return removed; - } - else if (range === 0 && this.list.length === 0) - { - return []; - } - else - { - throw new Error('List.removeBetween: Range Error, numeric values are outside the acceptable range'); - } - }, - - /** - * Removes all the items. - * - * @method Phaser.Structs.List#removeAll - * @since 3.0.0 - * - * @return {Phaser.Structs.List} This List object. - */ - removeAll: function () - { - var i = this.list.length; - - while (i--) - { - this.remove(this.list[i]); - } - - return this; - }, - - /** - * Brings the given child to the top of this List. - * - * @method Phaser.Structs.List#bringToTop - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - bringToTop: function (child) - { - if (this.getIndex(child) < this.list.length) - { - this.remove(child); - this.add(child); - } - - return child; - }, - - /** - * Sends the given child to the bottom of this List. - * - * @method Phaser.Structs.List#sendToBack - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - sendToBack: function (child) - { - if (this.getIndex(child) > 0) - { - this.remove(child); - this.addAt(child, 0); - } - - return child; - }, - - /** - * Moves the given child up one place in this group unless it's already at the top. - * - * @method Phaser.Structs.List#moveUp - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - moveUp: function (child) - { - var a = this.getIndex(child); - - if (a !== -1 && a < this.list.length - 1) - { - var b = this.getAt(a + 1); - - if (b) - { - this.swap(child, b); - } - } - - return child; - }, - - /** - * Moves the given child down one place in this group unless it's already at the bottom. - * - * @method Phaser.Structs.List#moveDown - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {object} [description] - */ - moveDown: function (child) - { - var a = this.getIndex(child); - - if (a > 0) - { - var b = this.getAt(a - 1); - - if (b) - { - this.swap(child, b); - } - } - - return child; - }, - - /** - * Reverses the order of all children in this List. - * - * @method Phaser.Structs.List#reverse - * @since 3.0.0 - * - * @return {Phaser.Structs.List} This List object. - */ - reverse: function () - { - this.list.reverse(); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.List#shuffle - * @since 3.0.0 - * - * @return {Phaser.Structs.List} This List object. - */ - shuffle: function () - { - for (var i = this.list.length - 1; i > 0; i--) - { - var j = Math.floor(Math.random() * (i + 1)); - var temp = this.list[i]; - this.list[i] = this.list[j]; - this.list[j] = temp; - } - - return this; - }, - - /** - * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List. - * - * @method Phaser.Structs.List#replace - * @since 3.0.0 - * - * @param {object} oldChild - The child in this List that will be replaced. - * @param {object} newChild - The child to be inserted into this List. - * - * @return {object} Returns the oldChild that was replaced within this group. - */ - replace: function (oldChild, newChild) - { - var index = this.getIndex(oldChild); - - if (index !== -1) - { - this.remove(oldChild); - - this.addAt(newChild, index); - - return oldChild; - } - }, - - /** - * [description] - * - * @method Phaser.Structs.List#exists - * @since 3.0.0 - * - * @param {object} child - [description] - * - * @return {boolean} True if the item is found in the list, otherwise false. - */ - exists: function (child) - { - return (this.list.indexOf(child) > -1); - }, - - /** - * Sets the property `key` to the given value on all members of this List. - * - * @method Phaser.Structs.List#setAll - * @since 3.0.0 - * - * @param {string} key - [description] - * @param {any} value - [description] - */ - setAll: function (key, value) - { - for (var i = 0; i < this.list.length; i++) - { - if (this.list[i]) - { - this.list[i][key] = value; - } - } - }, - - /** - * Passes all children to the given callback. - * - * @method Phaser.Structs.List#each - * @since 3.0.0 - * - * @param {function} callback - The function to call. - * @param {object} [thisArg] - Value to use as `this` when executing callback. - * @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the child. - */ - each: function (callback, thisArg) - { - var args = [ null ]; - - for (var i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - for (i = 0; i < this.list.length; i++) - { - args[0] = this.list[i]; - callback.apply(thisArg, args); - } - }, - - /** - * [description] - * - * @method Phaser.Structs.List#shutdown - * @since 3.0.0 - */ - shutdown: function () - { - this.removeAll(); - }, - - /** - * [description] - * - * @method Phaser.Structs.List#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.removeAll(); - - this.list = []; - - this.parent = null; - }, - - /** - * [description] - * - * @name Phaser.Structs.List#length - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - length: { - - get: function () - { - return this.list.length; - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#first - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - first: { - - get: function () - { - this.position = 0; - - if (this.list.length > 0) - { - return this.list[0]; - } - else - { - return null; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#last - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - last: { - - get: function () - { - if (this.list.length > 0) - { - this.position = this.list.length - 1; - - return this.list[this.position]; - } - else - { - return null; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#next - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - next: { - - get: function () - { - if (this.position < this.list.length) - { - this.position++; - - return this.list[this.position]; - } - else - { - return null; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Structs.List#previous - * @type {integer} - * @readOnly - * @since 3.0.0 - */ - previous: { - - get: function () - { - if (this.position > 0) - { - this.position--; - - return this.list[this.position]; - } - else - { - return null; - } - } - - } - -}); - -module.exports = List; - - -/***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26045,7 +27422,7 @@ module.exports = List; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(266); +var GetBitmapTextSize = __webpack_require__(265); var ParseFromAtlas = __webpack_require__(542); var ParseRetroFont = __webpack_require__(543); var Render = __webpack_require__(544); @@ -26302,7 +27679,7 @@ module.exports = BitmapText; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26315,9 +27692,9 @@ var BlitterRender = __webpack_require__(547); var Bob = __webpack_require__(550); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DisplayList = __webpack_require__(264); -var Frame = __webpack_require__(128); +var Frame = __webpack_require__(130); var GameObject = __webpack_require__(2); +var List = __webpack_require__(87); /** * @classdesc @@ -26390,10 +27767,10 @@ var Blitter = new Class({ * [description] * * @name Phaser.GameObjects.Blitter#children - * @type {Phaser.GameObjects.DisplayList} + * @type {Phaser.Structs.List} * @since 3.0.0 */ - this.children = new DisplayList(); + this.children = new List(); /** * [description] @@ -26529,7 +27906,7 @@ var Blitter = new Class({ * @method Phaser.GameObjects.Blitter#getRenderList * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.Blitter.Bob[]} An array of Bob objects that will be rendered this frame. */ getRenderList: function () { @@ -26560,7 +27937,7 @@ module.exports = Blitter; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26572,7 +27949,7 @@ module.exports = Blitter; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(266); +var GetBitmapTextSize = __webpack_require__(265); var Render = __webpack_require__(551); /** @@ -26941,7 +28318,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26950,10 +28327,11 @@ module.exports = DynamicBitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var Camera = __webpack_require__(115); var Class = __webpack_require__(0); -var Commands = __webpack_require__(125); +var Commands = __webpack_require__(127); var Components = __webpack_require__(12); -var Ellipse = __webpack_require__(268); +var Ellipse = __webpack_require__(267); var GameObject = __webpack_require__(2); var GetValue = __webpack_require__(4); var MATH_CONST = __webpack_require__(16); @@ -28060,11 +29438,20 @@ var Graphics = new Class({ }); +/** + * A Camera used specifically by the Graphics system for rendering to textures. + * + * @name Phaser.GameObjects.Graphics.TargetCamera + * @type {Phaser.Cameras.Scene2D.Camera} + * @since 3.1.0 + */ +Graphics.TargetCamera = new Camera(0, 0, 0, 0); + module.exports = Graphics; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28075,9 +29462,9 @@ module.exports = Graphics; var Class = __webpack_require__(0); var Contains = __webpack_require__(68); -var GetPoint = __webpack_require__(269); -var GetPoints = __webpack_require__(270); -var Random = __webpack_require__(109); +var GetPoint = __webpack_require__(268); +var GetPoints = __webpack_require__(269); +var Random = __webpack_require__(110); /** * @classdesc @@ -28428,7 +29815,7 @@ module.exports = Ellipse; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28468,7 +29855,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28481,7 +29868,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GravityWell = __webpack_require__(568); -var List = __webpack_require__(129); +var List = __webpack_require__(87); var ParticleEmitter = __webpack_require__(569); var Render = __webpack_require__(608); @@ -28891,7 +30278,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -28926,7 +30313,7 @@ module.exports = GetRandomElement; /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28935,7 +30322,7 @@ module.exports = GetRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(122); +var AddToDOM = __webpack_require__(124); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); @@ -30027,7 +31414,7 @@ module.exports = Text; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30040,7 +31427,7 @@ var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetPowerOfTwo = __webpack_require__(289); +var GetPowerOfTwo = __webpack_require__(288); var TileSpriteRender = __webpack_require__(617); /** @@ -30278,7 +31665,7 @@ module.exports = TileSprite; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30288,7 +31675,7 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(88); +var Mesh = __webpack_require__(89); /** * @classdesc @@ -30877,7 +32264,7 @@ module.exports = Quad; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -30963,7 +32350,7 @@ module.exports = ContainsArray; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -31009,7 +32396,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -31058,7 +32445,7 @@ module.exports = Contains; /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -31086,7 +32473,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -31138,7 +32525,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -31179,7 +32566,7 @@ module.exports = GetURL; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31189,7 +32576,7 @@ module.exports = GetURL; */ var Extend = __webpack_require__(23); -var XHRSettings = __webpack_require__(90); +var XHRSettings = __webpack_require__(91); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -31207,7 +32594,7 @@ var XHRSettings = __webpack_require__(90); */ var MergeXHRSettings = function (global, local) { - var output = (global === undefined) ? XHRSettings() : Extend(global); + var output = (global === undefined) ? XHRSettings() : Extend({}, global); if (local) { @@ -31227,7 +32614,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31245,7 +32632,7 @@ var Composite = {}; module.exports = Composite; -var Events = __webpack_require__(161); +var Events = __webpack_require__(162); var Common = __webpack_require__(39); var Body = __webpack_require__(59); @@ -31917,7 +33304,7 @@ var Body = __webpack_require__(59); /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31926,7 +33313,7 @@ var Body = __webpack_require__(59); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(97); +var GetTileAt = __webpack_require__(98); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -31992,7 +33379,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32003,7 +33390,7 @@ module.exports = CalculateFacesAt; var Tile = __webpack_require__(45); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(149); +var CalculateFacesAt = __webpack_require__(150); var SetTileCollision = __webpack_require__(44); /** @@ -32071,7 +33458,7 @@ module.exports = PutTileAt; /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -32109,7 +33496,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32201,7 +33588,7 @@ module.exports = Parse2DArray; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32212,8 +33599,8 @@ module.exports = Parse2DArray; var Formats = __webpack_require__(19); var MapData = __webpack_require__(76); -var Parse = __webpack_require__(344); -var Tilemap = __webpack_require__(352); +var Parse = __webpack_require__(343); +var Tilemap = __webpack_require__(351); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -32287,7 +33674,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32334,7 +33721,7 @@ module.exports = GetTargets; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -32507,7 +33894,7 @@ module.exports = GetValueOp; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports) { /** @@ -32549,7 +33936,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32561,7 +33948,7 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); -var TWEEN_CONST = __webpack_require__(87); +var TWEEN_CONST = __webpack_require__(88); /** * @classdesc @@ -33150,8 +34537,6 @@ var Tween = new Class({ this.state = TWEEN_CONST.PAUSED; - this.emit('pause', this); - return this; }, @@ -33172,7 +34557,7 @@ var Tween = new Class({ else if (this.state === TWEEN_CONST.PENDING_REMOVE || this.state === TWEEN_CONST.REMOVED) { this.init(); - this.parent.manager.makeActive(this); + this.parent.makeActive(this); resetFromTimeline = true; } @@ -33281,8 +34666,6 @@ var Tween = new Class({ this.state = this._pausedState; } - this.emit('resume', this); - return this; }, @@ -33869,7 +35252,7 @@ module.exports = Tween; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -33983,7 +35366,7 @@ module.exports = TweenData; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34013,7 +35396,7 @@ module.exports = Wrap; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34043,7 +35426,7 @@ module.exports = WrapDegrees; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34159,7 +35542,7 @@ var Common = __webpack_require__(39); /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34176,10 +35559,10 @@ var Constraint = {}; module.exports = Constraint; -var Vertices = __webpack_require__(93); -var Vector = __webpack_require__(94); -var Sleeping = __webpack_require__(340); -var Bounds = __webpack_require__(95); +var Vertices = __webpack_require__(94); +var Vector = __webpack_require__(95); +var Sleeping = __webpack_require__(339); +var Bounds = __webpack_require__(96); var Axes = __webpack_require__(848); var Common = __webpack_require__(39); @@ -34617,7 +36000,7 @@ var Common = __webpack_require__(39); /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports) { var g; @@ -34644,7 +36027,7 @@ module.exports = g; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -34700,7 +36083,7 @@ module.exports = IsPlainObject; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34715,57 +36098,57 @@ module.exports = IsPlainObject; module.exports = { - Angle: __webpack_require__(374), - Call: __webpack_require__(375), - GetFirst: __webpack_require__(376), - GridAlign: __webpack_require__(377), - IncAlpha: __webpack_require__(394), - IncX: __webpack_require__(395), - IncXY: __webpack_require__(396), - IncY: __webpack_require__(397), - PlaceOnCircle: __webpack_require__(398), - PlaceOnEllipse: __webpack_require__(399), - PlaceOnLine: __webpack_require__(400), - PlaceOnRectangle: __webpack_require__(401), - PlaceOnTriangle: __webpack_require__(402), - PlayAnimation: __webpack_require__(403), - RandomCircle: __webpack_require__(404), - RandomEllipse: __webpack_require__(405), - RandomLine: __webpack_require__(406), - RandomRectangle: __webpack_require__(407), - RandomTriangle: __webpack_require__(408), - Rotate: __webpack_require__(409), - RotateAround: __webpack_require__(410), - RotateAroundDistance: __webpack_require__(411), - ScaleX: __webpack_require__(412), - ScaleXY: __webpack_require__(413), - ScaleY: __webpack_require__(414), - SetAlpha: __webpack_require__(415), - SetBlendMode: __webpack_require__(416), - SetDepth: __webpack_require__(417), - SetHitArea: __webpack_require__(418), - SetOrigin: __webpack_require__(419), - SetRotation: __webpack_require__(420), - SetScale: __webpack_require__(421), - SetScaleX: __webpack_require__(422), - SetScaleY: __webpack_require__(423), - SetTint: __webpack_require__(424), - SetVisible: __webpack_require__(425), - SetX: __webpack_require__(426), - SetXY: __webpack_require__(427), - SetY: __webpack_require__(428), - ShiftPosition: __webpack_require__(429), - Shuffle: __webpack_require__(430), - SmootherStep: __webpack_require__(431), - SmoothStep: __webpack_require__(432), - Spread: __webpack_require__(433), - ToggleVisible: __webpack_require__(434) + Angle: __webpack_require__(373), + Call: __webpack_require__(374), + GetFirst: __webpack_require__(375), + GridAlign: __webpack_require__(376), + IncAlpha: __webpack_require__(393), + IncX: __webpack_require__(394), + IncXY: __webpack_require__(395), + IncY: __webpack_require__(396), + PlaceOnCircle: __webpack_require__(397), + PlaceOnEllipse: __webpack_require__(398), + PlaceOnLine: __webpack_require__(399), + PlaceOnRectangle: __webpack_require__(400), + PlaceOnTriangle: __webpack_require__(401), + PlayAnimation: __webpack_require__(402), + RandomCircle: __webpack_require__(403), + RandomEllipse: __webpack_require__(404), + RandomLine: __webpack_require__(405), + RandomRectangle: __webpack_require__(406), + RandomTriangle: __webpack_require__(407), + Rotate: __webpack_require__(408), + RotateAround: __webpack_require__(409), + RotateAroundDistance: __webpack_require__(410), + ScaleX: __webpack_require__(411), + ScaleXY: __webpack_require__(412), + ScaleY: __webpack_require__(413), + SetAlpha: __webpack_require__(414), + SetBlendMode: __webpack_require__(415), + SetDepth: __webpack_require__(416), + SetHitArea: __webpack_require__(417), + SetOrigin: __webpack_require__(418), + SetRotation: __webpack_require__(419), + SetScale: __webpack_require__(420), + SetScaleX: __webpack_require__(421), + SetScaleY: __webpack_require__(422), + SetTint: __webpack_require__(423), + SetVisible: __webpack_require__(424), + SetX: __webpack_require__(425), + SetXY: __webpack_require__(426), + SetY: __webpack_require__(427), + ShiftPosition: __webpack_require__(428), + Shuffle: __webpack_require__(429), + SmootherStep: __webpack_require__(430), + SmoothStep: __webpack_require__(431), + Spread: __webpack_require__(432), + ToggleVisible: __webpack_require__(433) }; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34774,19 +36157,19 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ALIGN_CONST = __webpack_require__(167); +var ALIGN_CONST = __webpack_require__(168); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(168); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(169); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(170); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(171); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(173); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(174); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(175); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(176); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(177); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(169); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(170); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(171); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(172); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(174); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(175); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(176); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(177); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(178); /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -34812,7 +36195,7 @@ module.exports = QuickSet; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -34946,7 +36329,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34988,7 +36371,7 @@ module.exports = BottomCenter; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35030,7 +36413,7 @@ module.exports = BottomLeft; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35072,7 +36455,7 @@ module.exports = BottomRight; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35081,7 +36464,7 @@ module.exports = BottomRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(172); +var CenterOn = __webpack_require__(173); var GetCenterX = __webpack_require__(47); var GetCenterY = __webpack_require__(50); @@ -35112,7 +36495,7 @@ module.exports = Center; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35147,7 +36530,7 @@ module.exports = CenterOn; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35189,7 +36572,7 @@ module.exports = LeftCenter; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35231,7 +36614,7 @@ module.exports = RightCenter; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35273,7 +36656,7 @@ module.exports = TopCenter; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35315,7 +36698,7 @@ module.exports = TopLeft; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35357,7 +36740,7 @@ module.exports = TopRight; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35366,7 +36749,7 @@ module.exports = TopRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(104); +var CircumferencePoint = __webpack_require__(105); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -35398,7 +36781,7 @@ module.exports = GetPoint; /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35407,8 +36790,8 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(180); -var CircumferencePoint = __webpack_require__(104); +var Circumference = __webpack_require__(181); +var CircumferencePoint = __webpack_require__(105); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -35450,7 +36833,7 @@ module.exports = GetPoints; /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -35478,7 +36861,7 @@ module.exports = Circumference; /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35487,7 +36870,7 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoint = __webpack_require__(106); +var GetPoint = __webpack_require__(107); var Perimeter = __webpack_require__(78); // Return an array of points from the perimeter of the rectangle @@ -35530,7 +36913,7 @@ module.exports = GetPoints; /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -35570,7 +36953,7 @@ module.exports = RotateAround; /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -35696,7 +37079,7 @@ module.exports = Pipeline; /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36089,7 +37472,7 @@ module.exports = TransformMatrix; /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36206,7 +37589,7 @@ module.exports = MarchingAnts; /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -36246,7 +37629,7 @@ module.exports = RotateLeft; /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -36286,7 +37669,7 @@ module.exports = RotateRight; /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -36359,7 +37742,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -36391,7 +37774,7 @@ module.exports = SmootherStep; /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -36423,7 +37806,7 @@ module.exports = SmoothStep; /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36433,7 +37816,7 @@ module.exports = SmoothStep; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(192); +var Frame = __webpack_require__(193); var GetValue = __webpack_require__(4); /** @@ -37325,7 +38708,7 @@ module.exports = Animation; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37511,7 +38894,7 @@ module.exports = AnimationFrame; /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37520,12 +38903,12 @@ module.exports = AnimationFrame; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(191); +var Animation = __webpack_require__(192); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(113); +var CustomMap = __webpack_require__(114); var EventEmitter = __webpack_require__(13); var GetValue = __webpack_require__(4); -var Pad = __webpack_require__(194); +var Pad = __webpack_require__(195); /** * @classdesc @@ -38108,7 +39491,7 @@ module.exports = AnimationManager; /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -38184,7 +39567,7 @@ module.exports = Pad; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38194,7 +39577,7 @@ module.exports = Pad; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(113); +var CustomMap = __webpack_require__(114); var EventEmitter = __webpack_require__(13); /** @@ -38361,7 +39744,7 @@ module.exports = BaseCache; /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38370,7 +39753,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(195); +var BaseCache = __webpack_require__(196); var Class = __webpack_require__(0); /** @@ -38584,1358 +39967,6 @@ var CacheManager = new Class({ module.exports = CacheManager; -/***/ }), -/* 197 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); -var Rectangle = __webpack_require__(8); -var TransformMatrix = __webpack_require__(184); -var ValueToColor = __webpack_require__(114); -var Vector2 = __webpack_require__(6); - -/** - * @classdesc - * [description] - * - * @class Camera - * @memberOf Phaser.Cameras.Scene2D - * @constructor - * @since 3.0.0 - * - * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas. - * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas. - * @param {number} width - The width of the Camera, in pixels. - * @param {number} height - The height of the Camera, in pixels. - */ -var Camera = new Class({ - - initialize: - - function Camera (x, y, width, height) - { - /** - * A reference to the Scene this camera belongs to. - * - * @name Phaser.Cameras.Scene2D.Camera#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene; - - /** - * The name of the Camera. This is left empty for your own use. - * - * @name Phaser.Cameras.Scene2D.Camera#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The x position of the Camera, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.Camera#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y position of the Camera, relative to the top-left of the game canvas. - * - * @name Phaser.Cameras.Scene2D.Camera#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The width of the Camera, in pixels. - * - * @name Phaser.Cameras.Scene2D.Camera#width - * @type {number} - * @since 3.0.0 - */ - this.width = width; - - /** - * The height of the Camera, in pixels. - * - * @name Phaser.Cameras.Scene2D.Camera#height - * @type {number} - * @since 3.0.0 - */ - this.height = height; - - /** - * Should this camera round its pixel values to integers? - * - * @name Phaser.Cameras.Scene2D.Camera#roundPixels - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.roundPixels = false; - - /** - * Is this Camera using a bounds to restrict scrolling movement? - * Set this property along with the bounds via `Camera.setBounds`. - * - * @name Phaser.Cameras.Scene2D.Camera#useBounds - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.useBounds = false; - - /** - * The bounds the camera is restrained to during scrolling. - * - * @name Phaser.Cameras.Scene2D.Camera#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); - - /** - * Does this Camera allow the Game Objects it renders to receive input events? - * - * @name Phaser.Cameras.Scene2D.Camera#inputEnabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.inputEnabled = true; - - /** - * The horizontal scroll position of this camera. - * Optionally restricted via the Camera bounds. - * - * @name Phaser.Cameras.Scene2D.Camera#scrollX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.scrollX = 0; - - /** - * The vertical scroll position of this camera. - * Optionally restricted via the Camera bounds. - * - * @name Phaser.Cameras.Scene2D.Camera#scrollY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.scrollY = 0; - - /** - * The Camera zoom value. Change this value to zoom in, or out of, a Scene. - * Set to 1 to return to the default zoom level. - * - * @name Phaser.Cameras.Scene2D.Camera#zoom - * @type {float} - * @default 1 - * @since 3.0.0 - */ - this.zoom = 1; - - /** - * The rotation of the Camera. This influences the rendering of all Game Objects visible by this camera. - * - * @name Phaser.Cameras.Scene2D.Camera#rotation - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.rotation = 0; - - /** - * A local transform matrix used for internal calculations. - * - * @name Phaser.Cameras.Scene2D.Camera#matrix - * @type {TransformMatrix} - * @since 3.0.0 - */ - this.matrix = new TransformMatrix(1, 0, 0, 1, 0, 0); - - /** - * Does this Camera have a transparent background? - * - * @name Phaser.Cameras.Scene2D.Camera#transparent - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.transparent = true; - - /** - * TODO - * - * @name Phaser.Cameras.Scene2D.Camera#clearBeforeRender - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.clearBeforeRender = true; - - /** - * The background color of this Camera. Only used if `transparent` is `false`. - * - * @name Phaser.Cameras.Scene2D.Camera#backgroundColor - * @type {Phaser.Display.Color} - * @since 3.0.0 - */ - this.backgroundColor = ValueToColor('rgba(0,0,0,0)'); - - /** - * Should the camera cull Game Objects before rendering? - * In some special cases it may be beneficial to disable this. - * - * @name Phaser.Cameras.Scene2D.Camera#disableCull - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.disableCull = false; - - /** - * A temporary array of culled objects. - * - * @name Phaser.Cameras.Scene2D.Camera#culledObjects - * @type {array} - * @default [] - * @since 3.0.0 - */ - this.culledObjects = []; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeDuration - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeDuration = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeIntensity - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeIntensity = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetX - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeOffsetX = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_shakeOffsetY - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._shakeOffsetY = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeDuration - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeDuration = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeRed - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeRed = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeGreen - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeGreen = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeBlue - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeBlue = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_fadeAlpha - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._fadeAlpha = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashDuration - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._flashDuration = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashRed - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._flashRed = 1; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashGreen - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._flashGreen = 1; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashBlue - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._flashBlue = 1; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_flashAlpha - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._flashAlpha = 0; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_follow - * @type {?any} - * @private - * @default null - * @since 3.0.0 - */ - this._follow = null; - - /** - * [description] - * - * @name Phaser.Cameras.Scene2D.Camera#_id - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - this._id = 0; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#centerToBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - centerToBounds: function () - { - this.scrollX = (this._bounds.width * 0.5) - (this.width * 0.5); - this.scrollY = (this._bounds.height * 0.5) - (this.height * 0.5); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#centerToSize - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - centerToSize: function () - { - this.scrollX = this.width * 0.5; - this.scrollY = this.height * 0.5; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#cull - * @since 3.0.0 - * - * @param {array} renderableObjects - [description] - * - * @return {array} [description] - */ - cull: function (renderableObjects) - { - if (this.disableCull) - { - return renderableObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return renderableObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = renderableObjects.length; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var object = renderableObjects[index]; - - if (!object.hasOwnProperty('width')) - { - culledObjects.push(object); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || - tw > -objectW || th > -objectH || tw < cullW || th < cullH) - { - culledObjects.push(object); - } - } - - return culledObjects; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#cullHitTest - * @since 3.0.0 - * - * @param {array} interactiveObjects - [description] - * - * @return {array} [description] - */ - cullHitTest: function (interactiveObjects) - { - if (this.disableCull) - { - return interactiveObjects; - } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return interactiveObjects; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var length = interactiveObjects.length; - - determinant = 1 / determinant; - - var culledObjects = []; - - for (var index = 0; index < length; ++index) - { - var object = interactiveObjects[index].gameObject; - - if (!object.hasOwnProperty('width')) - { - culledObjects.push(interactiveObjects[index]); - continue; - } - - var objectW = object.width; - var objectH = object.height; - var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX); - var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY); - var tx = (objectX * mva + objectY * mvc + mve); - var ty = (objectX * mvb + objectY * mvd + mvf); - var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve); - var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf); - var cullW = cameraW + objectW; - var cullH = cameraH + objectH; - - if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || - tw > -objectW || th > -objectH || tw < cullW || th < cullH) - { - culledObjects.push(interactiveObjects[index]); - } - } - - return culledObjects; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#cullTilemap - * @since 3.0.0 - * - * @param {array} tilemap - [description] - * - * @return {array} [description] - */ - cullTilemap: function (tilemap) - { - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - return tiles; - } - - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - var tiles = tilemap.tiles; - var scrollX = this.scrollX; - var scrollY = this.scrollY; - var cameraW = this.width; - var cameraH = this.height; - var culledObjects = this.culledObjects; - var length = tiles.length; - var tileW = tilemap.tileWidth; - var tileH = tilemap.tileHeight; - var cullW = cameraW + tileW; - var cullH = cameraH + tileH; - var scrollFactorX = tilemap.scrollFactorX; - var scrollFactorY = tilemap.scrollFactorY; - - determinant = 1 / determinant; - - culledObjects.length = 0; - - for (var index = 0; index < length; ++index) - { - var tile = tiles[index]; - var tileX = (tile.x - (scrollX * scrollFactorX)); - var tileY = (tile.y - (scrollY * scrollFactorY)); - var tx = (tileX * mva + tileY * mvc + mve); - var ty = (tileX * mvb + tileY * mvd + mvf); - var tw = ((tileX + tileW) * mva + (tileY + tileH) * mvc + mve); - var th = ((tileX + tileW) * mvb + (tileY + tileH) * mvd + mvf); - - if (tx > -tileW && ty > -tileH && tw < cullW && th < cullH) - { - culledObjects.push(tile); - } - } - - return culledObjects; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#fade - * @since 3.0.0 - * - * @param {number} duration - [description] - * @param {number} red - [description] - * @param {number} green - [description] - * @param {number} blue - [description] - * @param {number} force - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - fade: function (duration, red, green, blue, force) - { - if (red === undefined) { red = 0; } - if (green === undefined) { green = 0; } - if (blue === undefined) { blue = 0; } - - if (!force && this._fadeAlpha > 0) - { - return this; - } - - this._fadeRed = red; - this._fadeGreen = green; - this._fadeBlue = blue; - - if (duration <= 0) - { - duration = Number.MIN_VALUE; - } - - this._fadeDuration = duration; - this._fadeAlpha = Number.MIN_VALUE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#flash - * @since 3.0.0 - * - * @param {number} duration - [description] - * @param {number} red - [description] - * @param {number} green - [description] - * @param {number} blue - [description] - * @param {number} force - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - flash: function (duration, red, green, blue, force) - { - if (!force && this._flashAlpha > 0.0) - { - return this; - } - - if (red === undefined) { red = 1.0; } - if (green === undefined) { green = 1.0; } - if (blue === undefined) { blue = 1.0; } - - this._flashRed = red; - this._flashGreen = green; - this._flashBlue = blue; - - if (duration <= 0) - { - duration = Number.MIN_VALUE; - } - - this._flashDuration = duration; - this._flashAlpha = 1.0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#getWorldPoint - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {object|Phaser.Math.Vector2} output - [description] - * - * @return {Phaser.Math.Vector2} [description] - */ - getWorldPoint: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var cameraMatrix = this.matrix.matrix; - - var mva = cameraMatrix[0]; - var mvb = cameraMatrix[1]; - var mvc = cameraMatrix[2]; - var mvd = cameraMatrix[3]; - var mve = cameraMatrix[4]; - var mvf = cameraMatrix[5]; - - /* First Invert Matrix */ - var determinant = (mva * mvd) - (mvb * mvc); - - if (!determinant) - { - output.x = x; - output.y = y; - - return output; - } - - determinant = 1 / determinant; - - var ima = mvd * determinant; - var imb = -mvb * determinant; - var imc = -mvc * determinant; - var imd = mva * determinant; - var ime = (mvc * mvf - mvd * mve) * determinant; - var imf = (mvb * mve - mva * mvf) * determinant; - - var c = Math.cos(this.rotation); - var s = Math.sin(this.rotation); - - var zoom = this.zoom; - - var scrollX = this.scrollX; - var scrollY = this.scrollY; - - var 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 + ime); - output.y = (sx * imb + sy * imd + imf); - - return output; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#ignore - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} gameObjectOrArray - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - ignore: function (gameObjectOrArray) - { - if (gameObjectOrArray instanceof Array) - { - for (var index = 0; index < gameObjectOrArray.length; ++index) - { - gameObjectOrArray[index].cameraFilter |= this._id; - } - } - else - { - gameObjectOrArray.cameraFilter |= this._id; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#preRender - * @since 3.0.0 - * - * @param {number} baseScale - [description] - * @param {number} resolution - [description] - * - */ - preRender: function (baseScale, resolution) - { - var width = this.width; - var height = this.height; - var zoom = this.zoom * baseScale; - var matrix = this.matrix; - var originX = width / 2; - var originY = height / 2; - var follow = this._follow; - - if (follow !== null) - { - originX = follow.x; - originY = follow.y; - - this.scrollX = originX - width * 0.5; - this.scrollY = originY - height * 0.5; - } - - if (this.useBounds) - { - var bounds = this._bounds; - - var bw = Math.max(0, bounds.right - width); - var bh = Math.max(0, bounds.bottom - height); - - if (this.scrollX < bounds.x) - { - this.scrollX = bounds.x; - } - else if (this.scrollX > bw) - { - this.scrollX = bw; - } - - if (this.scrollY < bounds.y) - { - this.scrollY = bounds.y; - } - else if (this.scrollY > bh) - { - this.scrollY = bh; - } - } - - if (this.roundPixels) - { - this.scrollX = Math.round(this.scrollX); - this.scrollY = Math.round(this.scrollY); - } - - matrix.loadIdentity(); - matrix.scale(resolution, resolution); - matrix.translate(this.x + originX, this.y + originY); - matrix.rotate(this.rotation); - matrix.scale(zoom, zoom); - matrix.translate(-originX, -originY); - matrix.translate(this._shakeOffsetX, this._shakeOffsetY); - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#removeBounds - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - removeBounds: function () - { - this.useBounds = false; - - this._bounds.setEmpty(); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setAngle - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setAngle: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = DegToRad(value); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setBackgroundColor - * @since 3.0.0 - * - * @param {integer} color - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setBackgroundColor: function (color) - { - if (color === undefined) { color = 'rgba(0,0,0,0)'; } - - this.backgroundColor = ValueToColor(color); - - this.transparent = (this.backgroundColor.alpha === 0); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setBounds - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setBounds: function (x, y, width, height) - { - this._bounds.setTo(x, y, width, height); - - this.useBounds = true; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setName - * @since 3.0.0 - * - * @param {string} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setName: function (value) - { - if (value === undefined) { value = ''; } - - this.name = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setPosition - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setRotation - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setRotation: function (value) - { - if (value === undefined) { value = 0; } - - this.rotation = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setRoundPixels - * @since 3.0.0 - * - * @param {boolean} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setRoundPixels: function (value) - { - this.roundPixels = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setScene - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setScene: function (scene) - { - this.scene = scene; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setScroll - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setScroll: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollX = x; - this.scrollY = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setSize - * @since 3.0.0 - * - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setSize: function (width, height) - { - if (height === undefined) { height = width; } - - this.width = width; - this.height = height; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setViewport - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setViewport: function (x, y, width, height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#setZoom - * @since 3.0.0 - * - * @param {float} value - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - setZoom: function (value) - { - if (value === undefined) { value = 1; } - - this.zoom = value; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#shake - * @since 3.0.0 - * - * @param {number} duration - [description] - * @param {number} intensity - [description] - * @param {number} force - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - shake: function (duration, intensity, force) - { - if (intensity === undefined) { intensity = 0.05; } - - if (!force && (this._shakeOffsetX !== 0 || this._shakeOffsetY !== 0)) - { - return this; - } - - this._shakeDuration = duration; - this._shakeIntensity = intensity; - this._shakeOffsetX = 0; - this._shakeOffsetY = 0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#startFollow - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject|object} gameObjectOrPoint - [description] - * @param {boolean} roundPx - [description] - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - startFollow: function (gameObjectOrPoint, roundPx) - { - this._follow = gameObjectOrPoint; - - if (roundPx !== undefined) - { - this.roundPixels = roundPx; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#stopFollow - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - stopFollow: function () - { - this._follow = null; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#toJSON - * @since 3.0.0 - * - * @return {object} [description] - */ - toJSON: function () - { - var output = { - name: this.name, - x: this.x, - y: this.y, - width: this.width, - height: this.height, - zoom: this.zoom, - rotation: this.rotation, - roundPixels: this.roundPixels, - scrollX: this.scrollX, - scrollY: this.scrollY, - backgroundColor: this.backgroundColor.rgba - }; - - if (this.useBounds) - { - output['bounds'] = { - x: this._bounds.x, - y: this._bounds.y, - width: this._bounds.width, - height: this._bounds.height - }; - } - - return output; - }, - - /** - * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to - * remove the fade. - * - * @method Phaser.Cameras.Scene2D.Camera#resetFX - * @since 3.0.0 - * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. - */ - resetFX: function () - { - this._flashAlpha = 0; - this._fadeAlpha = 0; - this._shakeOffsetX = 0.0; - this._shakeOffsetY = 0.0; - this._shakeDuration = 0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#update - * @since 3.0.0 - * - * @param {[type]} timestep - [description] - * @param {[type]} delta - [description] - */ - update: function (timestep, delta) - { - if (this._flashAlpha > 0.0) - { - this._flashAlpha -= delta / this._flashDuration; - - if (this._flashAlpha < 0.0) - { - this._flashAlpha = 0.0; - } - } - - if (this._fadeAlpha > 0.0 && this._fadeAlpha < 1.0) - { - this._fadeAlpha += delta / this._fadeDuration; - - if (this._fadeAlpha >= 1.0) - { - this._fadeAlpha = 1.0; - } - } - - if (this._shakeDuration > 0.0) - { - var intensity = this._shakeIntensity; - - this._shakeDuration -= delta; - - if (this._shakeDuration <= 0.0) - { - this._shakeOffsetX = 0.0; - this._shakeOffsetY = 0.0; - } - else - { - this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; - this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; - } - } - }, - - /** - * [description] - * - * @method Phaser.Cameras.Scene2D.Camera#destroy - * @since 3.0.0 - */ - destroy: function () - { - this._bounds = undefined; - this.matrix = undefined; - this.culledObjects = []; - this.scene = undefined; - } - -}); - -module.exports = Camera; - - /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { @@ -39946,7 +39977,7 @@ module.exports = Camera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Converts a hex string into a Phaser Color object. @@ -40030,7 +40061,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); var IntegerToRGB = __webpack_require__(201); /** @@ -40111,7 +40142,7 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -40141,7 +40172,7 @@ module.exports = ObjectToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -40265,7 +40296,7 @@ module.exports = RandomXYZW; */ var Vector3 = __webpack_require__(51); -var Matrix4 = __webpack_require__(117); +var Matrix4 = __webpack_require__(119); var Quaternion = __webpack_require__(207); var tmpMat4 = new Matrix4(); @@ -41670,7 +41701,7 @@ module.exports = Matrix3; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(116); +var Camera = __webpack_require__(118); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -41857,7 +41888,7 @@ module.exports = OrthographicCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(116); +var Camera = __webpack_require__(118); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -42423,7 +42454,7 @@ module.exports = CubicBezierInterpolation; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); var GetValue = __webpack_require__(4); var RadToDeg = __webpack_require__(216); var Vector2 = __webpack_require__(6); @@ -43040,7 +43071,7 @@ module.exports = RadToDeg; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var FromPoints = __webpack_require__(120); +var FromPoints = __webpack_require__(122); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -43264,7 +43295,7 @@ module.exports = LineCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(121); +var CatmullRom = __webpack_require__(123); var Class = __webpack_require__(0); var Curve = __webpack_require__(66); var Vector2 = __webpack_require__(6); @@ -43540,26 +43571,26 @@ module.exports = CanvasInterpolation; * @namespace Phaser.Display.Color */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); -Color.ColorToRGBA = __webpack_require__(481); +Color.ColorToRGBA = __webpack_require__(480); Color.ComponentToHex = __webpack_require__(221); -Color.GetColor = __webpack_require__(115); +Color.GetColor = __webpack_require__(117); Color.GetColor32 = __webpack_require__(199); Color.HexStringToColor = __webpack_require__(198); -Color.HSLToColor = __webpack_require__(482); -Color.HSVColorWheel = __webpack_require__(484); +Color.HSLToColor = __webpack_require__(481); +Color.HSVColorWheel = __webpack_require__(483); Color.HSVToRGB = __webpack_require__(223); Color.HueToComponent = __webpack_require__(222); Color.IntegerToColor = __webpack_require__(200); Color.IntegerToRGB = __webpack_require__(201); -Color.Interpolate = __webpack_require__(485); +Color.Interpolate = __webpack_require__(484); Color.ObjectToColor = __webpack_require__(202); -Color.RandomRGB = __webpack_require__(486); +Color.RandomRGB = __webpack_require__(485); Color.RGBStringToColor = __webpack_require__(203); -Color.RGBToHSV = __webpack_require__(487); -Color.RGBToString = __webpack_require__(488); -Color.ValueToColor = __webpack_require__(114); +Color.RGBToHSV = __webpack_require__(486); +Color.RGBToString = __webpack_require__(487); +Color.ValueToColor = __webpack_require__(116); module.exports = Color; @@ -43649,7 +43680,7 @@ var HueToComponent = function (p, q, t) module.export = HueToComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(483)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(482)(module))) /***/ }), /* 223 */ @@ -43661,7 +43692,7 @@ module.export = HueToComponent; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetColor = __webpack_require__(115); +var GetColor = __webpack_require__(117); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -45540,8 +45571,8 @@ var ModelViewProjection = { projPersp: function (fovy, aspectRatio, near, far) { var projectionMatrix = this.projectionMatrix; - let fov = 1.0 / Math.tan(fovy / 2.0); - let nearFar = 1.0 / (near - far); + var fov = 1.0 / Math.tan(fovy / 2.0); + var nearFar = 1.0 / (near - far); projectionMatrix[0] = fov / aspectRatio; projectionMatrix[1] = 0.0; @@ -45579,9 +45610,9 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(511); +var ShaderSourceFS = __webpack_require__(510); var TextureTintPipeline = __webpack_require__(236); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); var LIGHT_COUNT = 10; @@ -45704,6 +45735,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawStaticTilemapLayer.call(this, tilemap, camera); } else @@ -45729,6 +45762,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawEmitterManager.call(this, emitterManager, camera); } else @@ -45754,6 +45789,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.drawBlitter.call(this, blitter, camera); } else @@ -45779,7 +45816,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { - this.renderer.setTexture2D(normalTexture.glTexture, 1); + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera); } else @@ -45805,7 +45843,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { - this.renderer.setTexture2D(normalTexture.glTexture, 1); + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchMesh.call(this, mesh, camera); } else @@ -45832,6 +45871,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchBitmapText.call(this, bitmapText, camera); } else @@ -45857,6 +45898,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchDynamicBitmapText.call(this, bitmapText, camera); } else @@ -45882,6 +45925,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchText.call(this, text, camera); } else @@ -45907,6 +45952,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchDynamicTilemapLayer.call(this, tilemapLayer, camera); } else @@ -45932,6 +45979,8 @@ var ForwardDiffuseLightPipeline = new Class({ if (normalTexture) { + this.renderer.setPipeline(this); + this.setTexture2D(normalTexture.glTexture, 1); TextureTintPipeline.prototype.batchTileSprite.call(this, tileSprite, camera); } else @@ -45960,9 +46009,9 @@ module.exports = ForwardDiffuseLightPipeline; var Class = __webpack_require__(0); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(512); -var ShaderSourceVS = __webpack_require__(513); -var Utils = __webpack_require__(38); +var ShaderSourceFS = __webpack_require__(511); +var ShaderSourceVS = __webpack_require__(512); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); /** @@ -46059,9 +46108,171 @@ var TextureTintPipeline = new Class({ */ this.maxQuads = 2000; + /** + * [description] + * + * @name Phaser.Renderer.WebGL.TextureTintPipeline#batches + * @type {array} + * @since 3.1.0 + */ + this.batches = []; + this.mvpInit(); }, + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#setTexture2D + * @since 3.1.0 + * + * @param {WebGLTexture} texture - [description] + * @param {int} textureUnit - [description] + * + * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] + */ + setTexture2D: function (texture, unit) + { + if (!texture) return this; + + var batches = this.batches; + + if (batches.length === 0) + { + this.pushBatch(); + } + + var batch = batches[batches.length - 1]; + + if (unit > 0) + { + if (batch.textures[unit - 1] && + batch.textures[unit - 1] !== texture) + { + this.pushBatch(); + } + + batches[batches.length - 1].textures[unit - 1] = texture; + } + else + { + if (batch.texture !== null && + batch.texture !== texture) + { + this.pushBatch(); + } + + batches[batches.length - 1].texture = texture; + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#pushBatch + * @since 3.1.0 + */ + pushBatch: function () + { + var batch = { + first: this.vertexCount, + texture: null, + textures: [] + }; + + this.batches.push(batch); + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.TextureTintPipeline#flush + * @since 3.1.0 + */ + flush: function () + { + if (this.flushLocked) return this; + this.flushLocked = true; + + var gl = this.gl; + var renderer = this.renderer; + var vertexCount = this.vertexCount; + var vertexBuffer = this.vertexBuffer; + var vertexData = this.vertexData; + var topology = this.topology; + var vertexSize = this.vertexSize; + var batches = this.batches; + var batchCount = batches.length; + var batchVertexCount = 0; + var batch = null; + var nextBatch = null; + + if (batchCount === 0 || vertexCount === 0) + { + this.flushLocked = false; + return this; + } + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + + for (var index = 0; index < batches.length - 1; ++index) + { + batch = batches[index]; + batchNext = batches[index + 1]; + + if (batch.textures.length > 0) + { + for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + var nTexture = batch.textures[textureIndex]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex); + } + } + gl.activeTexture(gl.TEXTURE0); + } + + batchVertexCount = batchNext.first - batch.first; + + if (batch.texture === null || batchVertexCount <= 0) continue; + + renderer.setTexture2D(batch.texture, 0); + gl.drawArrays(topology, batch.first, batchVertexCount); + } + + // Left over data + batch = batches[batches.length - 1]; + + if (batch.textures.length > 0) + { + for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + var nTexture = batch.textures[textureIndex]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex); + } + } + gl.activeTexture(gl.TEXTURE0); + } + + batchVertexCount = vertexCount - batch.first; + + if (batch.texture && batchVertexCount > 0) + { + renderer.setTexture2D(batch.texture, 0); + gl.drawArrays(topology, batch.first, batchVertexCount); + } + + this.vertexCount = 0; + batches.length = 0; + this.flushLocked = false; + + return this; + }, + /** * [description] * @@ -46075,6 +46286,11 @@ var TextureTintPipeline = new Class({ WebGLPipeline.prototype.onBind.call(this); this.mvpUpdate(); + if (this.batches.length === 0) + { + this.pushBatch(); + } + return this; }, @@ -46170,9 +46386,10 @@ var TextureTintPipeline = new Class({ var cos = Math.cos; var vertexComponentCount = this.vertexComponentCount; var vertexCapacity = this.vertexCapacity; + var texture = emitterManager.defaultFrame.source.glTexture; - renderer.setTexture2D(emitterManager.defaultFrame.source.glTexture, 0); - + this.setTexture2D(texture, 0); + for (var emitterIndex = 0; emitterIndex < emitterCount; ++emitterIndex) { var emitter = emitters[emitterIndex]; @@ -46190,15 +46407,15 @@ var TextureTintPipeline = new Class({ renderer.setBlendMode(emitter.blendMode); - if (this.vertexCount > 0) + if (this.vertexCount >= vertexCapacity) { this.flush(); + this.setTexture2D(texture, 0); } for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(aliveLength, maxQuads); - var vertexCount = 0; for (var index = 0; index < batchSize; ++index) { @@ -46238,7 +46455,7 @@ var TextureTintPipeline = new Class({ var ty2 = xw * mvb + yh * mvd + mvf; var tx3 = xw * mva + y * mvc + mve; var ty3 = xw * mvb + y * mvd + mvf; - var vertexOffset = vertexCount * vertexComponentCount; + var vertexOffset = this.vertexCount * vertexComponentCount; if (roundPixels) { @@ -46283,17 +46500,16 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 28] = uvs.y3; vertexViewU32[vertexOffset + 29] = color; - vertexCount += 6; + this.vertexCount += 6; } particleOffset += batchSize; aliveLength -= batchSize; - this.vertexCount = vertexCount; - - if (vertexCount >= vertexCapacity) + if (this.vertexCount >= vertexCapacity) { this.flush(); + this.setTexture2D(texture, 0); } } } @@ -46337,8 +46553,6 @@ var TextureTintPipeline = new Class({ for (var batchIndex = 0; batchIndex < batchCount; ++batchIndex) { var batchSize = Math.min(length, this.maxQuads); - var vertexOffset = 0; - var vertexCount = 0; for (var index = 0; index < batchSize; ++index) { @@ -46375,7 +46589,9 @@ var TextureTintPipeline = new Class({ // Bind Texture if texture wasn't bound. // This needs to be here because of multiple // texture atlas. - renderer.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); + this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); + var vertexOffset = this.vertexCount * this.vertexComponentCount; + vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -46408,16 +46624,19 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 28] = uvs.y3; vertexViewU32[vertexOffset + 29] = tint; - vertexOffset += 30; - vertexCount += 6; + this.vertexCount += 6; + + if (this.vertexCount >= this.vertexCapacity) + { + this.flush(); + } } batchOffset += batchSize; length -= batchSize; - if (vertexCount <= this.vertexCapacity) + if (this.vertexCount >= this.vertexCapacity) { - this.vertexCount = vertexCount; this.flush(); } } @@ -46507,7 +46726,7 @@ var TextureTintPipeline = new Class({ var tint3 = getTint(tintBR, alphaBR); var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -46624,7 +46843,8 @@ var TextureTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); + vertexOffset = this.vertexCount * this.vertexComponentCount; for (var index = 0, index0 = 0; index < length; index += 2) @@ -46750,7 +46970,7 @@ var TextureTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); for (var index = 0; index < textLength; ++index) { @@ -46974,7 +47194,7 @@ var TextureTintPipeline = new Class({ var uta, utb, utc, utd, ute, utf; var vertexOffset = 0; - renderer.setTexture2D(texture, 0); + this.setTexture2D(texture, 0); if (crop) { @@ -47410,8 +47630,8 @@ var TextureTintPipeline = new Class({ var v0 = (frameY / textureHeight) + vOffset; var u1 = (frameX + frameWidth) / textureWidth + uOffset; var v1 = (frameY + frameHeight) / textureHeight + vOffset; - - renderer.setTexture2D(texture, 0); + + this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -48831,11 +49051,11 @@ module.exports = Button; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var Key = __webpack_require__(243); -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(128); var KeyCombo = __webpack_require__(244); -var KeyMap = __webpack_require__(523); -var ProcessKeyDown = __webpack_require__(524); -var ProcessKeyUp = __webpack_require__(525); +var KeyMap = __webpack_require__(522); +var ProcessKeyDown = __webpack_require__(523); +var ProcessKeyUp = __webpack_require__(524); /** * @classdesc @@ -49460,8 +49680,8 @@ module.exports = Key; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(520); -var ResetKeyCombo = __webpack_require__(522); +var ProcessKeyCombo = __webpack_require__(519); +var ResetKeyCombo = __webpack_require__(521); /** * @classdesc @@ -49729,7 +49949,7 @@ module.exports = KeyCombo; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(123); +var Features = __webpack_require__(125); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -50941,7 +51161,7 @@ var CONST = __webpack_require__(84); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Scene = __webpack_require__(250); -var Systems = __webpack_require__(127); +var Systems = __webpack_require__(129); /** * @classdesc @@ -52096,7 +52316,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(127); +var Systems = __webpack_require__(129); /** * @classdesc @@ -52181,7 +52401,7 @@ module.exports = UppercaseFirst; var CONST = __webpack_require__(84); var GetValue = __webpack_require__(4); -var InjectionMap = __webpack_require__(528); +var InjectionMap = __webpack_require__(527); /** * Takes a Scene configuration object and returns a fully formed Systems object. @@ -55065,7 +55285,7 @@ module.exports = WebAudioSound; var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); var EventEmitter = __webpack_require__(13); var GenerateTexture = __webpack_require__(211); var GetValue = __webpack_require__(4); @@ -55855,15 +56075,15 @@ module.exports = TextureManager; module.exports = { - Canvas: __webpack_require__(529), - Image: __webpack_require__(530), - JSONArray: __webpack_require__(531), - JSONHash: __webpack_require__(532), - Pyxel: __webpack_require__(533), - SpriteSheet: __webpack_require__(534), - SpriteSheetFromAtlas: __webpack_require__(535), - StarlingXML: __webpack_require__(536), - UnityYAML: __webpack_require__(537) + Canvas: __webpack_require__(528), + Image: __webpack_require__(529), + JSONArray: __webpack_require__(530), + JSONHash: __webpack_require__(531), + Pyxel: __webpack_require__(532), + SpriteSheet: __webpack_require__(533), + SpriteSheetFromAtlas: __webpack_require__(534), + StarlingXML: __webpack_require__(535), + UnityYAML: __webpack_require__(536) }; @@ -55879,7 +56099,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(128); +var Frame = __webpack_require__(130); var TextureSource = __webpack_require__(263); /** @@ -56313,7 +56533,7 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(124); +var IsSizePowerOfTwo = __webpack_require__(126); var ScaleModes = __webpack_require__(62); /** @@ -56505,178 +56725,6 @@ module.exports = TextureSource; /* 264 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var List = __webpack_require__(129); -var PluginManager = __webpack_require__(11); -var StableSort = __webpack_require__(265); - -/** - * @classdesc - * [description] - * - * @class DisplayList - * @extends Phaser.Structs.List - * @memberOf Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - */ -var DisplayList = new Class({ - - Extends: List, - - initialize: - - function DisplayList (scene) - { - List.call(this, scene); - - /** - * [description] - * - * @name Phaser.GameObjects.DisplayList#sortChildrenFlag - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.sortChildrenFlag = false; - - /** - * [description] - * - * @name Phaser.GameObjects.DisplayList#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * [description] - * - * @name Phaser.GameObjects.DisplayList#systems - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.systems = scene.sys; - - if (!scene.sys.settings.isBooted) - { - scene.sys.events.once('boot', this.boot, this); - } - }, - - /** - * [description] - * - * @method Phaser.GameObjects.DisplayList#boot - * @since 3.0.0 - */ - boot: function () - { - var eventEmitter = this.systems.events; - - eventEmitter.on('shutdown', this.shutdown, this); - eventEmitter.on('destroy', this.destroy, this); - }, - - /** - * Force a sort of the display list on the next call to depthSort. - * - * @method Phaser.GameObjects.DisplayList#queueDepthSort - * @since 3.0.0 - */ - queueDepthSort: function () - { - this.sortChildrenFlag = true; - }, - - /** - * Immediately sorts the display list if the flag is set. - * - * @method Phaser.GameObjects.DisplayList#depthSort - * @since 3.0.0 - */ - depthSort: function () - { - if (this.sortChildrenFlag) - { - StableSort.inplace(this.list, this.sortByDepth); - - this.sortChildrenFlag = false; - } - }, - - /** - * [description] - * - * @method Phaser.GameObjects.DisplayList#sortByDepth - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} childA - [description] - * @param {Phaser.GameObjects.GameObject} childB - [description] - * - * @return {integer} [description] - */ - sortByDepth: function (childA, childB) - { - return childA._depth - childB._depth; - }, - - /** - * Given an array of Game Objects, sort the array and return it, - * so that the objects are in index order with the lowest at the bottom. - * - * @method Phaser.GameObjects.DisplayList#sortGameObjects - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] - * - * @return {array} [description] - */ - sortGameObjects: function (gameObjects) - { - if (gameObjects === undefined) { gameObjects = this.list; } - - this.scene.sys.depthSort(); - - return gameObjects.sort(this.sortIndexHandler.bind(this)); - }, - - /** - * Note that the given array is sorted in place, even though it isn't returned directly it will still be updated. - * - * @method Phaser.GameObjects.DisplayList#getTopGameObject - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] - * - * @return {Phaser.GameObjects.GameObject} The top-most Game Object on the Display List. - */ - getTopGameObject: function (gameObjects) - { - this.sortGameObjects(gameObjects); - - return gameObjects[gameObjects.length - 1]; - } - -}); - -PluginManager.register('DisplayList', DisplayList, 'displayList'); - -module.exports = DisplayList; - - -/***/ }), -/* 265 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -56796,7 +56844,7 @@ else { })(); /***/ }), -/* 266 */ +/* 265 */ /***/ (function(module, exports) { /** @@ -56935,7 +56983,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 267 */ +/* 266 */ /***/ (function(module, exports) { /** @@ -57067,6 +57115,37 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) module.exports = ParseXMLBitmapFont; +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Ellipse = __webpack_require__(135); + +Ellipse.Area = __webpack_require__(554); +Ellipse.Circumference = __webpack_require__(270); +Ellipse.CircumferencePoint = __webpack_require__(136); +Ellipse.Clone = __webpack_require__(555); +Ellipse.Contains = __webpack_require__(68); +Ellipse.ContainsPoint = __webpack_require__(556); +Ellipse.ContainsRect = __webpack_require__(557); +Ellipse.CopyFrom = __webpack_require__(558); +Ellipse.Equals = __webpack_require__(559); +Ellipse.GetBounds = __webpack_require__(560); +Ellipse.GetPoint = __webpack_require__(268); +Ellipse.GetPoints = __webpack_require__(269); +Ellipse.Offset = __webpack_require__(561); +Ellipse.OffsetPoint = __webpack_require__(562); +Ellipse.Random = __webpack_require__(110); + +module.exports = Ellipse; + + /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { @@ -57077,38 +57156,7 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(134); - -Ellipse.Area = __webpack_require__(554); -Ellipse.Circumference = __webpack_require__(271); -Ellipse.CircumferencePoint = __webpack_require__(135); -Ellipse.Clone = __webpack_require__(555); -Ellipse.Contains = __webpack_require__(68); -Ellipse.ContainsPoint = __webpack_require__(556); -Ellipse.ContainsRect = __webpack_require__(557); -Ellipse.CopyFrom = __webpack_require__(558); -Ellipse.Equals = __webpack_require__(559); -Ellipse.GetBounds = __webpack_require__(560); -Ellipse.GetPoint = __webpack_require__(269); -Ellipse.GetPoints = __webpack_require__(270); -Ellipse.Offset = __webpack_require__(561); -Ellipse.OffsetPoint = __webpack_require__(562); -Ellipse.Random = __webpack_require__(109); - -module.exports = Ellipse; - - -/***/ }), -/* 269 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var CircumferencePoint = __webpack_require__(135); +var CircumferencePoint = __webpack_require__(136); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -57140,7 +57188,7 @@ module.exports = GetPoint; /***/ }), -/* 270 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57149,8 +57197,8 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(271); -var CircumferencePoint = __webpack_require__(135); +var Circumference = __webpack_require__(270); +var CircumferencePoint = __webpack_require__(136); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -57192,7 +57240,7 @@ module.exports = GetPoints; /***/ }), -/* 271 */ +/* 270 */ /***/ (function(module, exports) { /** @@ -57224,7 +57272,7 @@ module.exports = Circumference; /***/ }), -/* 272 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57233,7 +57281,7 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Commands = __webpack_require__(125); +var Commands = __webpack_require__(127); var GameObject = __webpack_require__(2); /** @@ -57490,7 +57538,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 273 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57630,7 +57678,7 @@ module.exports = Range; /***/ }), -/* 274 */ +/* 273 */ /***/ (function(module, exports) { /** @@ -57659,7 +57707,7 @@ module.exports = FloatBetween; /***/ }), -/* 275 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57680,7 +57728,7 @@ module.exports = { /***/ }), -/* 276 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57701,7 +57749,7 @@ module.exports = { /***/ }), -/* 277 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57722,7 +57770,7 @@ module.exports = { /***/ }), -/* 278 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57743,7 +57791,7 @@ module.exports = { /***/ }), -/* 279 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57764,7 +57812,7 @@ module.exports = { /***/ }), -/* 280 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57785,7 +57833,7 @@ module.exports = { /***/ }), -/* 281 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57800,7 +57848,7 @@ module.exports = __webpack_require__(592); /***/ }), -/* 282 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57821,7 +57869,7 @@ module.exports = { /***/ }), -/* 283 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57842,7 +57890,7 @@ module.exports = { /***/ }), -/* 284 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57863,7 +57911,7 @@ module.exports = { /***/ }), -/* 285 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57884,7 +57932,7 @@ module.exports = { /***/ }), -/* 286 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57899,7 +57947,7 @@ module.exports = __webpack_require__(605); /***/ }), -/* 287 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -57936,7 +57984,7 @@ module.exports = HasAny; /***/ }), -/* 288 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57946,11 +57994,11 @@ module.exports = HasAny; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); var GetBoolean = __webpack_require__(73); var GetValue = __webpack_require__(4); -var Sprite = __webpack_require__(37); -var TWEEN_CONST = __webpack_require__(87); +var Sprite = __webpack_require__(38); +var TWEEN_CONST = __webpack_require__(88); var Vector2 = __webpack_require__(6); /** @@ -58358,7 +58406,7 @@ module.exports = PathFollower; /***/ }), -/* 289 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -58389,7 +58437,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 290 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58478,7 +58526,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 291 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58488,7 +58536,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); /** * @classdesc @@ -58732,7 +58780,7 @@ module.exports = Light; /***/ }), -/* 292 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58742,9 +58790,9 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(291); +var Light = __webpack_require__(290); var LightPipeline = __webpack_require__(235); -var Utils = __webpack_require__(38); +var Utils = __webpack_require__(34); /** * @classdesc @@ -59062,7 +59110,7 @@ module.exports = LightsManager; /***/ }), -/* 293 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59078,19 +59126,19 @@ module.exports = LightsManager; module.exports = { Circle: __webpack_require__(653), - Ellipse: __webpack_require__(268), - Intersects: __webpack_require__(294), + Ellipse: __webpack_require__(267), + Intersects: __webpack_require__(293), Line: __webpack_require__(673), Point: __webpack_require__(691), Polygon: __webpack_require__(705), - Rectangle: __webpack_require__(306), + Rectangle: __webpack_require__(305), Triangle: __webpack_require__(734) }; /***/ }), -/* 294 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59108,12 +59156,12 @@ module.exports = { CircleToCircle: __webpack_require__(663), CircleToRectangle: __webpack_require__(664), GetRectangleIntersection: __webpack_require__(665), - LineToCircle: __webpack_require__(296), - LineToLine: __webpack_require__(89), + LineToCircle: __webpack_require__(295), + LineToLine: __webpack_require__(90), LineToRectangle: __webpack_require__(666), - PointToLine: __webpack_require__(297), + PointToLine: __webpack_require__(296), PointToLineSegment: __webpack_require__(667), - RectangleToRectangle: __webpack_require__(295), + RectangleToRectangle: __webpack_require__(294), RectangleToTriangle: __webpack_require__(668), RectangleToValues: __webpack_require__(669), TriangleToCircle: __webpack_require__(670), @@ -59124,7 +59172,7 @@ module.exports = { /***/ }), -/* 295 */ +/* 294 */ /***/ (function(module, exports) { /** @@ -59158,7 +59206,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 296 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59243,7 +59291,7 @@ module.exports = LineToCircle; /***/ }), -/* 297 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -59272,7 +59320,7 @@ module.exports = PointToLine; /***/ }), -/* 298 */ +/* 297 */ /***/ (function(module, exports) { /** @@ -59308,7 +59356,7 @@ module.exports = Decompose; /***/ }), -/* 299 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -59343,7 +59391,7 @@ module.exports = Decompose; /***/ }), -/* 300 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59353,9 +59401,9 @@ module.exports = Decompose; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(301); -var GetPoints = __webpack_require__(108); -var Random = __webpack_require__(110); +var GetPoint = __webpack_require__(300); +var GetPoints = __webpack_require__(109); +var Random = __webpack_require__(111); /** * @classdesc @@ -59640,7 +59688,7 @@ module.exports = Line; /***/ }), -/* 301 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59680,7 +59728,7 @@ module.exports = GetPoint; /***/ }), -/* 302 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59714,7 +59762,7 @@ module.exports = NormalAngle; /***/ }), -/* 303 */ +/* 302 */ /***/ (function(module, exports) { /** @@ -59742,7 +59790,7 @@ module.exports = GetMagnitude; /***/ }), -/* 304 */ +/* 303 */ /***/ (function(module, exports) { /** @@ -59770,7 +59818,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 305 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59780,7 +59828,7 @@ module.exports = GetMagnitudeSq; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(143); +var Contains = __webpack_require__(144); /** * @classdesc @@ -59955,7 +60003,7 @@ module.exports = Polygon; /***/ }), -/* 306 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59969,26 +60017,26 @@ var Rectangle = __webpack_require__(8); Rectangle.Area = __webpack_require__(710); Rectangle.Ceil = __webpack_require__(711); Rectangle.CeilAll = __webpack_require__(712); -Rectangle.CenterOn = __webpack_require__(307); +Rectangle.CenterOn = __webpack_require__(306); Rectangle.Clone = __webpack_require__(713); Rectangle.Contains = __webpack_require__(33); Rectangle.ContainsPoint = __webpack_require__(714); Rectangle.ContainsRect = __webpack_require__(715); Rectangle.CopyFrom = __webpack_require__(716); -Rectangle.Decompose = __webpack_require__(298); +Rectangle.Decompose = __webpack_require__(297); Rectangle.Equals = __webpack_require__(717); Rectangle.FitInside = __webpack_require__(718); Rectangle.FitOutside = __webpack_require__(719); Rectangle.Floor = __webpack_require__(720); Rectangle.FloorAll = __webpack_require__(721); -Rectangle.FromPoints = __webpack_require__(120); -Rectangle.GetAspectRatio = __webpack_require__(144); +Rectangle.FromPoints = __webpack_require__(122); +Rectangle.GetAspectRatio = __webpack_require__(145); Rectangle.GetCenter = __webpack_require__(722); -Rectangle.GetPoint = __webpack_require__(106); -Rectangle.GetPoints = __webpack_require__(181); +Rectangle.GetPoint = __webpack_require__(107); +Rectangle.GetPoints = __webpack_require__(182); Rectangle.GetSize = __webpack_require__(723); Rectangle.Inflate = __webpack_require__(724); -Rectangle.MarchingAnts = __webpack_require__(185); +Rectangle.MarchingAnts = __webpack_require__(186); Rectangle.MergePoints = __webpack_require__(725); Rectangle.MergeRect = __webpack_require__(726); Rectangle.MergeXY = __webpack_require__(727); @@ -59997,7 +60045,7 @@ Rectangle.OffsetPoint = __webpack_require__(729); Rectangle.Overlaps = __webpack_require__(730); Rectangle.Perimeter = __webpack_require__(78); Rectangle.PerimeterPoint = __webpack_require__(731); -Rectangle.Random = __webpack_require__(107); +Rectangle.Random = __webpack_require__(108); Rectangle.Scale = __webpack_require__(732); Rectangle.Union = __webpack_require__(733); @@ -60005,7 +60053,7 @@ module.exports = Rectangle; /***/ }), -/* 307 */ +/* 306 */ /***/ (function(module, exports) { /** @@ -60040,7 +60088,7 @@ module.exports = CenterOn; /***/ }), -/* 308 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60126,7 +60174,7 @@ module.exports = GetPoint; /***/ }), -/* 309 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60217,7 +60265,7 @@ module.exports = GetPoints; /***/ }), -/* 310 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60257,7 +60305,7 @@ module.exports = Centroid; /***/ }), -/* 311 */ +/* 310 */ /***/ (function(module, exports) { /** @@ -60296,7 +60344,7 @@ module.exports = Offset; /***/ }), -/* 312 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60359,7 +60407,7 @@ module.exports = InCenter; /***/ }), -/* 313 */ +/* 312 */ /***/ (function(module, exports) { /** @@ -60408,7 +60456,7 @@ module.exports = InteractiveObject; /***/ }), -/* 314 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60417,7 +60465,7 @@ module.exports = InteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(147); +var MergeXHRSettings = __webpack_require__(148); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -60471,7 +60519,7 @@ module.exports = XHRLoader; /***/ }), -/* 315 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60485,7 +60533,7 @@ var CONST = __webpack_require__(22); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(316); +var HTML5AudioFile = __webpack_require__(315); /** * @classdesc @@ -60710,7 +60758,7 @@ module.exports = AudioFile; /***/ }), -/* 316 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60722,7 +60770,7 @@ module.exports = AudioFile; var Class = __webpack_require__(0); var File = __webpack_require__(18); var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(146); +var GetURL = __webpack_require__(147); /** * @classdesc @@ -60858,7 +60906,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 317 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60970,7 +61018,7 @@ module.exports = XMLFile; /***/ }), -/* 318 */ +/* 317 */ /***/ (function(module, exports) { /** @@ -61034,7 +61082,7 @@ module.exports = NumberArray; /***/ }), -/* 319 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61137,7 +61185,7 @@ module.exports = TextFile; /***/ }), -/* 320 */ +/* 319 */ /***/ (function(module, exports) { /** @@ -61174,7 +61222,7 @@ module.exports = Normalize; /***/ }), -/* 321 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61183,7 +61231,7 @@ module.exports = Normalize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Factorial = __webpack_require__(322); +var Factorial = __webpack_require__(321); /** * [description] @@ -61205,7 +61253,7 @@ module.exports = Bernstein; /***/ }), -/* 322 */ +/* 321 */ /***/ (function(module, exports) { /** @@ -61245,7 +61293,7 @@ module.exports = Factorial; /***/ }), -/* 323 */ +/* 322 */ /***/ (function(module, exports) { /** @@ -61280,7 +61328,7 @@ module.exports = Rotate; /***/ }), -/* 324 */ +/* 323 */ /***/ (function(module, exports) { /** @@ -61309,7 +61357,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 325 */ +/* 324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61318,12 +61366,12 @@ module.exports = RoundAwayFromZero; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeImage = __webpack_require__(326); -var ArcadeSprite = __webpack_require__(91); +var ArcadeImage = __webpack_require__(325); +var ArcadeSprite = __webpack_require__(92); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var PhysicsGroup = __webpack_require__(328); -var StaticPhysicsGroup = __webpack_require__(329); +var PhysicsGroup = __webpack_require__(327); +var StaticPhysicsGroup = __webpack_require__(328); /** * @classdesc @@ -61567,7 +61615,7 @@ module.exports = Factory; /***/ }), -/* 326 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61577,7 +61625,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(327); +var Components = __webpack_require__(326); var Image = __webpack_require__(70); /** @@ -61660,7 +61708,7 @@ module.exports = ArcadeImage; /***/ }), -/* 327 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61690,7 +61738,7 @@ module.exports = { /***/ }), -/* 328 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61699,7 +61747,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeSprite = __webpack_require__(91); +var ArcadeSprite = __webpack_require__(92); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var GetFastValue = __webpack_require__(1); @@ -61915,7 +61963,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 329 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61926,7 +61974,7 @@ module.exports = PhysicsGroup; // Phaser.Physics.Arcade.StaticGroup -var ArcadeSprite = __webpack_require__(91); +var ArcadeSprite = __webpack_require__(92); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var Group = __webpack_require__(69); @@ -62062,7 +62110,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 330 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62071,24 +62119,24 @@ module.exports = StaticPhysicsGroup; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(331); +var Body = __webpack_require__(330); var Clamp = __webpack_require__(60); var Class = __webpack_require__(0); -var Collider = __webpack_require__(332); +var Collider = __webpack_require__(331); var CONST = __webpack_require__(58); var DistanceBetween = __webpack_require__(43); var EventEmitter = __webpack_require__(13); var GetValue = __webpack_require__(4); -var ProcessQueue = __webpack_require__(333); +var ProcessQueue = __webpack_require__(332); var ProcessTileCallbacks = __webpack_require__(837); var Rectangle = __webpack_require__(8); -var RTree = __webpack_require__(334); +var RTree = __webpack_require__(333); var SeparateTile = __webpack_require__(838); var SeparateX = __webpack_require__(843); var SeparateY = __webpack_require__(845); var Set = __webpack_require__(61); -var StaticBody = __webpack_require__(337); -var TileIntersectsBody = __webpack_require__(336); +var StaticBody = __webpack_require__(336); +var TileIntersectsBody = __webpack_require__(335); var Vector2 = __webpack_require__(6); /** @@ -62141,6 +62189,15 @@ var World = new Class({ */ this.staticBodies = new Set(); + /** + * Static Bodies + * + * @name Phaser.Physics.Arcade.World#pendingDestroy + * @type {Phaser.Structs.Set} + * @since 3.1.0 + */ + this.pendingDestroy = new Set(); + /** * [description] * @@ -62431,7 +62488,7 @@ var World = new Class({ } else { - this.disableBody(object[i]); + this.disableGameObjectBody(object[i]); } } } @@ -62442,21 +62499,21 @@ var World = new Class({ } else { - this.disableBody(object); + this.disableGameObjectBody(object); } }, /** * [description] * - * @method Phaser.Physics.Arcade.World#disableBody - * @since 3.0.0 + * @method Phaser.Physics.Arcade.World#disableGameObjectBody + * @since 3.1.0 * * @param {Phaser.GameObjects.GameObject} object - [description] * * @return {Phaser.GameObjects.GameObject} [description] */ - disableBody: function (object) + disableGameObjectBody: function (object) { if (object.body) { @@ -62470,13 +62527,36 @@ var World = new Class({ this.staticTree.remove(object.body); } - object.body.destroy(); - object.body = null; + object.body.enable = false; } return object; }, + /** + * [description] + * + * @method Phaser.Physics.Arcade.World#disableBody + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - [description] + */ + disableBody: function (body) + { + if (body.physicsType === CONST.DYNAMIC_BODY) + { + this.tree.remove(body); + this.bodies.delete(body); + } + else if (body.physicsType === CONST.STATIC_BODY) + { + this.staticBodies.delete(body); + this.staticTree.remove(body); + } + + body.enable = false; + }, + /** * [description] * @@ -62726,7 +62806,12 @@ var World = new Class({ { var i; var body; - var bodies = this.bodies.entries; + + var dynamic = this.bodies; + var static = this.staticBodies; + var pending = this.pendingDestroy; + + var bodies = dynamic.entries; var len = bodies.length; for (i = 0; i < len; i++) @@ -62755,7 +62840,7 @@ var World = new Class({ } } - bodies = this.staticBodies.entries; + bodies = static.entries; len = bodies.length; for (i = 0; i < len; i++) @@ -62768,6 +62853,36 @@ var World = new Class({ } } } + + if (pending.size > 0) + { + var dynamicTree = this.tree; + var staticTree = this.staticTree; + + bodies = pending.entries; + len = bodies.length; + + for (i = 0; i < len; i++) + { + body = bodies[i]; + + if (body.physicsType === CONST.DYNAMIC_BODY) + { + dynamicTree.remove(body); + dynamic.delete(body); + } + else if (body.physicsType === CONST.STATIC_BODY) + { + staticTree.remove(body); + static.delete(body); + } + + body.world = undefined; + body.gameObject = undefined; + } + + pending.clear(); + } }, /** @@ -63470,13 +63585,13 @@ var World = new Class({ */ collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext, overlapOnly) { - if (group.length === 0) + var bodyA = sprite.body; + + if (group.length === 0 || !bodyA) { return; } - var bodyA = sprite.body; - // Does sprite collide with anything? var minMax = this.treeMinMax; @@ -63675,6 +63790,13 @@ var World = new Class({ { return; } + + var children = group1.getChildren(); + + for (var i = 0; i < children.length; i++) + { + this.collideSpriteVsGroup(children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly); + } }, /** @@ -63696,6 +63818,12 @@ var World = new Class({ */ destroy: function () { + this.tree.clear(); + this.staticTree.clear(); + this.bodies.clear(); + this.staticBodies.clear(); + this.colliders.destroy(); + this.removeAllListeners(); } @@ -63705,7 +63833,7 @@ module.exports = World; /***/ }), -/* 331 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64783,28 +64911,29 @@ var Body = new Class({ }, /** - * [description] + * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates. + * If the body had any velocity or acceleration it is lost as a result of calling this. * * @method Phaser.Physics.Arcade.Body#reset * @since 3.0.0 * - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The horizontal position to place the Game Object and Body. + * @param {number} y - The vertical position to place the Game Object and Body. */ reset: function (x, y) { this.stop(); - var sprite = this.gameObject; + var gameObject = this.gameObject; - this.position.x = x - sprite.displayOriginX + (sprite.scaleX * this.offset.x); - this.position.y = y - sprite.displayOriginY + (sprite.scaleY * this.offset.y); + gameObject.setPosition(x, y); - this.prev.x = this.position.x; - this.prev.y = this.position.y; + gameObject.getTopLeft(this.position); - this.rotation = this.gameObject.angle; - this.preRotation = this.rotation; + this.prev.copy(this.position); + + this.rotation = gameObject.angle; + this.preRotation = gameObject.angle; this.updateBounds(); this.updateCenter(); @@ -64977,8 +65106,9 @@ var Body = new Class({ */ destroy: function () { - this.gameObject.body = null; - this.gameObject = null; + this.enable = false; + + this.world.pendingDestroy.set(this); }, /** @@ -65559,7 +65689,7 @@ module.exports = Body; /***/ }), -/* 332 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65602,6 +65732,15 @@ var Collider = new Class({ */ this.world = world; + /** + * [description] + * + * @name Phaser.Physics.Arcade.Collider#name + * @type {string} + * @since 3.1.0 + */ + this.name = ''; + /** * [description] * @@ -65667,6 +65806,23 @@ var Collider = new Class({ this.callbackContext = callbackContext; }, + /** + * [description] + * + * @method Phaser.Physics.Arcade.Collider#setName + * @since 3.1.0 + * + * @param {string} name - [description] + * + * @return {Phaser.Physics.Arcade.Collider} [description] + */ + setName: function (name) + { + this.name = name; + + return this; + }, + /** * [description] * @@ -65713,7 +65869,7 @@ module.exports = Collider; /***/ }), -/* 333 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65911,7 +66067,7 @@ module.exports = ProcessQueue; /***/ }), -/* 334 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65920,7 +66076,7 @@ module.exports = ProcessQueue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(335); +var quickselect = __webpack_require__(334); /** * @classdesc @@ -66520,7 +66676,7 @@ module.exports = rbush; /***/ }), -/* 335 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -66638,7 +66794,7 @@ module.exports = QuickSelect; /***/ }), -/* 336 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -66675,7 +66831,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 337 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66800,7 +66956,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.width = gameObject.width; + this.width = gameObject.displayWidth; /** * [description] @@ -66809,31 +66965,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.height = gameObject.height; - - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#sourceWidth - * @type {number} - * @since 3.0.0 - */ - this.sourceWidth = gameObject.width; - - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#sourceHeight - * @type {number} - * @since 3.0.0 - */ - this.sourceHeight = gameObject.height; - - if (gameObject.frame) - { - this.sourceWidth = gameObject.frame.realWidth; - this.sourceHeight = gameObject.frame.realHeight; - } + this.height = gameObject.displayHeight; /** * [description] @@ -66842,7 +66974,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.halfWidth = Math.abs(gameObject.width / 2); + this.halfWidth = Math.abs(this.width / 2); /** * [description] @@ -66851,7 +66983,7 @@ var StaticBody = new Class({ * @type {number} * @since 3.0.0 */ - this.halfHeight = Math.abs(gameObject.height / 2); + this.halfHeight = Math.abs(this.height / 2); /** * [description] @@ -66869,7 +67001,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.velocity = new Vector2(); + this.velocity = Vector2.ZERO; /** * [description] @@ -66888,7 +67020,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.gravity = new Vector2(); + this.gravity = Vector2.ZERO; /** * [description] @@ -66897,7 +67029,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.bounce = new Vector2(); + this.bounce = Vector2.ZERO; // If true this Body will dispatch events @@ -66951,16 +67083,6 @@ var StaticBody = new Class({ */ this.immovable = true; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#moves - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.moves = false; - /** * [description] * @@ -67075,36 +67197,70 @@ var StaticBody = new Class({ * @since 3.0.0 */ this.physicsType = CONST.STATIC_BODY; + }, - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_sx - * @type {number} - * @private - * @since 3.0.0 - */ - this._sx = gameObject.scaleX; + /** + * Changes the Game Object this Body is bound to. + * First it removes its reference from the old Game Object, then sets the new one. + * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object. + * + * @method Phaser.Physics.Arcade.StaticBody#setGameObject + * @since 3.1.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body. + * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object? + * + * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. + */ + setGameObject: function (gameObject, update) + { + if (gameObject && gameObject !== this.gameObject) + { + // Remove this body from the old game object + this.gameObject.body = null; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_sy - * @type {number} - * @private - * @since 3.0.0 - */ - this._sy = gameObject.scaleY; + gameObject.body = this; - /** - * [description] - * - * @name Phaser.Physics.Arcade.StaticBody#_bounds - * @type {Phaser.Geom.Rectangle} - * @private - * @since 3.0.0 - */ - this._bounds = new Rectangle(); + // Update our reference + this.gameObject = gameObject; + } + + if (update) + { + this.updateFromGameObject(); + } + + return this; + }, + + /** + * Updates this Static Body so that its position and dimensions are updated + * based on the current Game Object it is bound to. + * + * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject + * @since 3.1.0 + * + * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. + */ + updateFromGameObject: function () + { + this.world.staticTree.remove(this); + + var gameObject = this.gameObject; + + gameObject.getTopLeft(this.position); + + this.width = gameObject.displayWidth; + this.height = gameObject.displayHeight; + + this.halfWidth = Math.abs(this.width / 2); + this.halfHeight = Math.abs(this.height / 2); + + this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight); + + this.world.staticTree.insert(this); + + return this; }, /** @@ -67127,12 +67283,12 @@ var StaticBody = new Class({ this.world.staticTree.remove(this); - this.sourceWidth = width; - this.sourceHeight = height; - 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.width = width; + this.height = height; + + this.halfWidth = Math.floor(width / 2); + this.halfHeight = Math.floor(height / 2); + this.offset.set(offsetX, offsetY); this.updateCenter(); @@ -67167,13 +67323,11 @@ var StaticBody = new Class({ this.world.staticTree.remove(this); this.isCircle = true; + this.radius = radius; - this.sourceWidth = radius * 2; - this.sourceHeight = radius * 2; - - this.width = this.sourceWidth * this._sx; - this.height = this.sourceHeight * this._sy; + this.width = radius * 2; + this.height = radius * 2; this.halfWidth = Math.floor(this.width / 2); this.halfHeight = Math.floor(this.height / 2); @@ -67214,17 +67368,14 @@ var StaticBody = new Class({ */ reset: function (x, y) { - var sprite = this.gameObject; + var gameObject = this.gameObject; - if (x === undefined) { x = sprite.x; } - if (y === undefined) { y = sprite.y; } + if (x === undefined) { x = gameObject.x; } + if (y === undefined) { y = gameObject.y; } this.world.staticTree.remove(this); - this.position.x = x - sprite.displayOriginX + (sprite.scaleX * this.offset.x); - this.position.y = y - sprite.displayOriginY + (sprite.scaleY * this.offset.y); - - this.rotation = this.gameObject.angle; + gameObject.getTopLeft(this.position); this.updateCenter(); @@ -67353,8 +67504,9 @@ var StaticBody = new Class({ */ destroy: function () { - this.gameObject.body = null; - this.gameObject = null; + this.enable = false; + + this.world.pendingDestroy.set(this); }, /** @@ -67428,9 +67580,10 @@ var StaticBody = new Class({ set: function (value) { + this.world.staticTree.remove(this); + this.position.x = value; - this.world.staticTree.remove(this); this.world.staticTree.insert(this); } @@ -67452,9 +67605,10 @@ var StaticBody = new Class({ set: function (value) { + this.world.staticTree.remove(this); + this.position.y = value; - this.world.staticTree.remove(this); this.world.staticTree.insert(this); } @@ -67534,7 +67688,7 @@ module.exports = StaticBody; /***/ }), -/* 338 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -67606,7 +67760,7 @@ module.exports = { /***/ }), -/* 339 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -67669,7 +67823,7 @@ module.exports = { /***/ }), -/* 340 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67682,7 +67836,7 @@ var Sleeping = {}; module.exports = Sleeping; -var Events = __webpack_require__(161); +var Events = __webpack_require__(162); (function() { @@ -67804,7 +67958,7 @@ var Events = __webpack_require__(161); /***/ }), -/* 341 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67847,7 +68001,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 342 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67889,7 +68043,7 @@ module.exports = HasTileAt; /***/ }), -/* 343 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67900,7 +68054,7 @@ module.exports = HasTileAt; var Tile = __webpack_require__(45); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(149); +var CalculateFacesAt = __webpack_require__(150); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -67950,7 +68104,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 344 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67960,10 +68114,10 @@ module.exports = RemoveTileAt; */ var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(152); -var ParseCSV = __webpack_require__(345); -var ParseJSONTiled = __webpack_require__(346); -var ParseWeltmeister = __webpack_require__(351); +var Parse2DArray = __webpack_require__(153); +var ParseCSV = __webpack_require__(344); +var ParseJSONTiled = __webpack_require__(345); +var ParseWeltmeister = __webpack_require__(350); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -68020,7 +68174,7 @@ module.exports = Parse; /***/ }), -/* 345 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68030,7 +68184,7 @@ module.exports = Parse; */ var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(152); +var Parse2DArray = __webpack_require__(153); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -68068,7 +68222,7 @@ module.exports = ParseCSV; /***/ }), -/* 346 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68144,7 +68298,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 347 */ +/* 346 */ /***/ (function(module, exports) { /** @@ -68234,7 +68388,7 @@ module.exports = ParseGID; /***/ }), -/* 348 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68406,7 +68560,7 @@ module.exports = ImageCollection; /***/ }), -/* 349 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68416,7 +68570,7 @@ module.exports = ImageCollection; */ var Pick = __webpack_require__(897); -var ParseGID = __webpack_require__(347); +var ParseGID = __webpack_require__(346); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -68488,7 +68642,7 @@ module.exports = ParseObject; /***/ }), -/* 350 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68594,7 +68748,7 @@ module.exports = ObjectLayer; /***/ }), -/* 351 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68661,7 +68815,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 352 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68671,16 +68825,16 @@ module.exports = ParseWeltmeister; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(353); +var DegToRad = __webpack_require__(36); +var DynamicTilemapLayer = __webpack_require__(352); var Extend = __webpack_require__(23); var Formats = __webpack_require__(19); var LayerData = __webpack_require__(75); -var Rotate = __webpack_require__(323); -var StaticTilemapLayer = __webpack_require__(354); +var Rotate = __webpack_require__(322); +var StaticTilemapLayer = __webpack_require__(353); var Tile = __webpack_require__(45); -var TilemapComponents = __webpack_require__(96); -var Tileset = __webpack_require__(100); +var TilemapComponents = __webpack_require__(97); +var Tileset = __webpack_require__(101); /** * @classdesc @@ -70920,7 +71074,7 @@ module.exports = Tilemap; /***/ }), -/* 353 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70933,7 +71087,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DynamicTilemapLayerRender = __webpack_require__(903); var GameObject = __webpack_require__(2); -var TilemapComponents = __webpack_require__(96); +var TilemapComponents = __webpack_require__(97); /** * @classdesc @@ -72039,7 +72193,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 354 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72052,7 +72206,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var StaticTilemapLayerRender = __webpack_require__(906); -var TilemapComponents = __webpack_require__(96); +var TilemapComponents = __webpack_require__(97); +var Utils = __webpack_require__(34); /** * @classdesc @@ -72292,7 +72447,6 @@ var StaticTilemapLayer = new Class({ var voffset = 0; var vertexCount = 0; var bufferSize = (mapWidth * mapHeight) * pipeline.vertexSize * 6; - var tint = 0xffffffff; if (bufferData === null) { @@ -72333,6 +72487,7 @@ var StaticTilemapLayer = new Class({ var ty2 = tyh; var tx3 = txw; var ty3 = ty; + var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha); vertexViewF32[voffset + 0] = tx0; vertexViewF32[voffset + 1] = ty0; @@ -73074,7 +73229,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 355 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73377,7 +73532,7 @@ module.exports = TimerEvent; /***/ }), -/* 356 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73435,7 +73590,7 @@ module.exports = GetProps; /***/ }), -/* 357 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73481,7 +73636,7 @@ module.exports = GetTweens; /***/ }), -/* 358 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73490,15 +73645,15 @@ module.exports = GetTweens; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(156); +var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(101); +var GetNewValue = __webpack_require__(102); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(155); -var Tween = __webpack_require__(157); -var TweenData = __webpack_require__(158); +var GetValueOp = __webpack_require__(156); +var Tween = __webpack_require__(158); +var TweenData = __webpack_require__(159); /** * [description] @@ -73609,7 +73764,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 359 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73619,16 +73774,16 @@ module.exports = NumberTweenBuilder; */ var Clone = __webpack_require__(52); -var Defaults = __webpack_require__(156); +var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(101); -var GetTargets = __webpack_require__(154); -var GetTweens = __webpack_require__(357); +var GetNewValue = __webpack_require__(102); +var GetTargets = __webpack_require__(155); +var GetTweens = __webpack_require__(356); var GetValue = __webpack_require__(4); -var Timeline = __webpack_require__(360); -var TweenBuilder = __webpack_require__(102); +var Timeline = __webpack_require__(359); +var TweenBuilder = __webpack_require__(103); /** * [description] @@ -73761,7 +73916,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 360 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73772,8 +73927,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); -var TweenBuilder = __webpack_require__(102); -var TWEEN_CONST = __webpack_require__(87); +var TweenBuilder = __webpack_require__(103); +var TWEEN_CONST = __webpack_require__(88); /** * @classdesc @@ -74615,7 +74770,7 @@ module.exports = Timeline; /***/ }), -/* 361 */ +/* 360 */ /***/ (function(module, exports) { /** @@ -74662,7 +74817,7 @@ module.exports = SpliceOne; /***/ }), -/* 362 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75482,7 +75637,7 @@ module.exports = Animation; /***/ }), -/* 363 */ +/* 362 */ /***/ (function(module, exports) { /** @@ -75622,9 +75777,10 @@ module.exports = Pair; /***/ }), -/* 364 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(364); __webpack_require__(365); __webpack_require__(366); __webpack_require__(367); @@ -75633,11 +75789,10 @@ __webpack_require__(369); __webpack_require__(370); __webpack_require__(371); __webpack_require__(372); -__webpack_require__(373); /***/ }), -/* 365 */ +/* 364 */ /***/ (function(module, exports) { /** @@ -75677,7 +75832,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 366 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -75693,7 +75848,7 @@ if (!Array.isArray) /***/ }), -/* 367 */ +/* 366 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -75881,7 +76036,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 368 */ +/* 367 */ /***/ (function(module, exports) { /** @@ -75896,7 +76051,7 @@ if (!window.console) /***/ }), -/* 369 */ +/* 368 */ /***/ (function(module, exports) { /** @@ -75944,7 +76099,7 @@ if (!Function.prototype.bind) { /***/ }), -/* 370 */ +/* 369 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -75956,7 +76111,7 @@ if (!Math.trunc) { /***/ }), -/* 371 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -75993,7 +76148,7 @@ if (!Math.trunc) { /***/ }), -/* 372 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -76063,10 +76218,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) /***/ }), -/* 373 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -76118,7 +76273,7 @@ if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "o /***/ }), -/* 374 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -76152,7 +76307,7 @@ module.exports = Angle; /***/ }), -/* 375 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -76189,7 +76344,7 @@ module.exports = Call; /***/ }), -/* 376 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -76245,7 +76400,7 @@ module.exports = GetFirst; /***/ }), -/* 377 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76254,8 +76409,8 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AlignIn = __webpack_require__(166); -var CONST = __webpack_require__(167); +var AlignIn = __webpack_require__(167); +var CONST = __webpack_require__(168); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Zone = __webpack_require__(77); @@ -76358,7 +76513,7 @@ module.exports = GridAlign; /***/ }), -/* 378 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76805,7 +76960,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 379 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77051,7 +77206,7 @@ module.exports = Alpha; /***/ }), -/* 380 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77162,7 +77317,7 @@ module.exports = BlendMode; /***/ }), -/* 381 */ +/* 380 */ /***/ (function(module, exports) { /** @@ -77249,7 +77404,7 @@ module.exports = ComputedSize; /***/ }), -/* 382 */ +/* 381 */ /***/ (function(module, exports) { /** @@ -77333,7 +77488,7 @@ module.exports = Depth; /***/ }), -/* 383 */ +/* 382 */ /***/ (function(module, exports) { /** @@ -77481,7 +77636,7 @@ module.exports = Flip; /***/ }), -/* 384 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77491,7 +77646,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(8); -var RotateAround = __webpack_require__(182); +var RotateAround = __webpack_require__(183); var Vector2 = __webpack_require__(6); /** @@ -77675,7 +77830,7 @@ module.exports = GetBounds; /***/ }), -/* 385 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -77867,7 +78022,7 @@ module.exports = Origin; /***/ }), -/* 386 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77938,7 +78093,7 @@ module.exports = ScaleMode; /***/ }), -/* 387 */ +/* 386 */ /***/ (function(module, exports) { /** @@ -78030,7 +78185,7 @@ module.exports = ScrollFactor; /***/ }), -/* 388 */ +/* 387 */ /***/ (function(module, exports) { /** @@ -78175,7 +78330,7 @@ module.exports = Size; /***/ }), -/* 389 */ +/* 388 */ /***/ (function(module, exports) { /** @@ -78275,7 +78430,7 @@ module.exports = Texture; /***/ }), -/* 390 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -78470,7 +78625,7 @@ module.exports = Tint; /***/ }), -/* 391 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -78523,7 +78678,7 @@ module.exports = ToJSON; /***/ }), -/* 392 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78533,8 +78688,8 @@ module.exports = ToJSON; */ var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(159); -var WrapAngleDegrees = __webpack_require__(160); +var WrapAngle = __webpack_require__(160); +var WrapAngleDegrees = __webpack_require__(161); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -78876,7 +79031,7 @@ module.exports = Transform; /***/ }), -/* 393 */ +/* 392 */ /***/ (function(module, exports) { /** @@ -78956,7 +79111,7 @@ module.exports = Visible; /***/ }), -/* 394 */ +/* 393 */ /***/ (function(module, exports) { /** @@ -78990,7 +79145,7 @@ module.exports = IncAlpha; /***/ }), -/* 395 */ +/* 394 */ /***/ (function(module, exports) { /** @@ -79024,7 +79179,7 @@ module.exports = IncX; /***/ }), -/* 396 */ +/* 395 */ /***/ (function(module, exports) { /** @@ -79060,7 +79215,7 @@ module.exports = IncXY; /***/ }), -/* 397 */ +/* 396 */ /***/ (function(module, exports) { /** @@ -79094,7 +79249,7 @@ module.exports = IncY; /***/ }), -/* 398 */ +/* 397 */ /***/ (function(module, exports) { /** @@ -79139,7 +79294,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 399 */ +/* 398 */ /***/ (function(module, exports) { /** @@ -79187,7 +79342,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 400 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79196,7 +79351,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoints = __webpack_require__(108); +var GetPoints = __webpack_require__(109); /** * [description] @@ -79229,7 +79384,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 401 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79238,9 +79393,9 @@ module.exports = PlaceOnLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MarchingAnts = __webpack_require__(185); -var RotateLeft = __webpack_require__(186); -var RotateRight = __webpack_require__(187); +var MarchingAnts = __webpack_require__(186); +var RotateLeft = __webpack_require__(187); +var RotateRight = __webpack_require__(188); // Place the items in the array around the perimeter of the given rectangle. @@ -79288,7 +79443,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 402 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79298,7 +79453,7 @@ module.exports = PlaceOnRectangle; */ // var GetPointsOnLine = require('../geom/line/GetPointsOnLine'); -var BresenhamPoints = __webpack_require__(188); +var BresenhamPoints = __webpack_require__(189); /** * [description] @@ -79346,7 +79501,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 403 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -79381,7 +79536,7 @@ module.exports = PlayAnimation; /***/ }), -/* 404 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79390,7 +79545,7 @@ module.exports = PlayAnimation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(105); +var Random = __webpack_require__(106); /** * [description] @@ -79417,7 +79572,7 @@ module.exports = RandomCircle; /***/ }), -/* 405 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79426,7 +79581,7 @@ module.exports = RandomCircle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(109); +var Random = __webpack_require__(110); /** * [description] @@ -79453,7 +79608,7 @@ module.exports = RandomEllipse; /***/ }), -/* 406 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79462,7 +79617,7 @@ module.exports = RandomEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(110); +var Random = __webpack_require__(111); /** * [description] @@ -79489,7 +79644,7 @@ module.exports = RandomLine; /***/ }), -/* 407 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79498,7 +79653,7 @@ module.exports = RandomLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(107); +var Random = __webpack_require__(108); /** * [description] @@ -79525,7 +79680,7 @@ module.exports = RandomRectangle; /***/ }), -/* 408 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79534,7 +79689,7 @@ module.exports = RandomRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(111); +var Random = __webpack_require__(112); /** * [description] @@ -79561,7 +79716,7 @@ module.exports = RandomTriangle; /***/ }), -/* 409 */ +/* 408 */ /***/ (function(module, exports) { /** @@ -79598,7 +79753,7 @@ module.exports = Rotate; /***/ }), -/* 410 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79607,7 +79762,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundDistance = __webpack_require__(112); +var RotateAroundDistance = __webpack_require__(113); var DistanceBetween = __webpack_require__(43); /** @@ -79641,7 +79796,7 @@ module.exports = RotateAround; /***/ }), -/* 411 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79650,7 +79805,7 @@ module.exports = RotateAround; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(112); +var MathRotateAroundDistance = __webpack_require__(113); /** * [description] @@ -79688,7 +79843,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 412 */ +/* 411 */ /***/ (function(module, exports) { /** @@ -79722,7 +79877,7 @@ module.exports = ScaleX; /***/ }), -/* 413 */ +/* 412 */ /***/ (function(module, exports) { /** @@ -79758,7 +79913,7 @@ module.exports = ScaleXY; /***/ }), -/* 414 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -79792,7 +79947,7 @@ module.exports = ScaleY; /***/ }), -/* 415 */ +/* 414 */ /***/ (function(module, exports) { /** @@ -79829,7 +79984,7 @@ module.exports = SetAlpha; /***/ }), -/* 416 */ +/* 415 */ /***/ (function(module, exports) { /** @@ -79863,7 +80018,7 @@ module.exports = SetBlendMode; /***/ }), -/* 417 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -79900,7 +80055,7 @@ module.exports = SetDepth; /***/ }), -/* 418 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -79925,7 +80080,7 @@ var SetHitArea = function (items, hitArea, hitAreaCallback) { for (var i = 0; i < items.length; i++) { - items[i].setHitArea(hitArea, hitAreaCallback); + items[i].setInteractive(hitArea, hitAreaCallback); } return items; @@ -79935,7 +80090,7 @@ module.exports = SetHitArea; /***/ }), -/* 419 */ +/* 418 */ /***/ (function(module, exports) { /** @@ -79970,7 +80125,7 @@ module.exports = SetOrigin; /***/ }), -/* 420 */ +/* 419 */ /***/ (function(module, exports) { /** @@ -80007,7 +80162,7 @@ module.exports = SetRotation; /***/ }), -/* 421 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -80050,7 +80205,7 @@ module.exports = SetScale; /***/ }), -/* 422 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -80087,7 +80242,7 @@ module.exports = SetScaleX; /***/ }), -/* 423 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -80124,7 +80279,7 @@ module.exports = SetScaleY; /***/ }), -/* 424 */ +/* 423 */ /***/ (function(module, exports) { /** @@ -80161,7 +80316,7 @@ module.exports = SetTint; /***/ }), -/* 425 */ +/* 424 */ /***/ (function(module, exports) { /** @@ -80195,7 +80350,7 @@ module.exports = SetVisible; /***/ }), -/* 426 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -80232,7 +80387,7 @@ module.exports = SetX; /***/ }), -/* 427 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -80273,7 +80428,7 @@ module.exports = SetXY; /***/ }), -/* 428 */ +/* 427 */ /***/ (function(module, exports) { /** @@ -80310,7 +80465,7 @@ module.exports = SetY; /***/ }), -/* 429 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80437,7 +80592,7 @@ module.exports = ShiftPosition; /***/ }), -/* 430 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80467,7 +80622,7 @@ module.exports = Shuffle; /***/ }), -/* 431 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80476,7 +80631,7 @@ module.exports = Shuffle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmootherStep = __webpack_require__(189); +var MathSmootherStep = __webpack_require__(190); /** * [description] @@ -80521,7 +80676,7 @@ module.exports = SmootherStep; /***/ }), -/* 432 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80530,7 +80685,7 @@ module.exports = SmootherStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmoothStep = __webpack_require__(190); +var MathSmoothStep = __webpack_require__(191); /** * [description] @@ -80575,7 +80730,7 @@ module.exports = SmoothStep; /***/ }), -/* 433 */ +/* 432 */ /***/ (function(module, exports) { /** @@ -80627,7 +80782,7 @@ module.exports = Spread; /***/ }), -/* 434 */ +/* 433 */ /***/ (function(module, exports) { /** @@ -80660,7 +80815,7 @@ module.exports = ToggleVisible; /***/ }), -/* 435 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80675,9 +80830,31 @@ module.exports = ToggleVisible; module.exports = { - Animation: __webpack_require__(191), - AnimationFrame: __webpack_require__(192), - AnimationManager: __webpack_require__(193) + Animation: __webpack_require__(192), + AnimationFrame: __webpack_require__(193), + AnimationManager: __webpack_require__(194) + +}; + + +/***/ }), +/* 435 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Cache + */ + +module.exports = { + + BaseCache: __webpack_require__(196), + CacheManager: __webpack_require__(197) }; @@ -80693,13 +80870,14 @@ module.exports = { */ /** - * @namespace Phaser.Cache + * @namespace Phaser.Cameras */ module.exports = { - BaseCache: __webpack_require__(195), - CacheManager: __webpack_require__(196) + Controls: __webpack_require__(437), + Scene2D: __webpack_require__(440), + Sprite3D: __webpack_require__(442) }; @@ -80715,14 +80893,13 @@ module.exports = { */ /** - * @namespace Phaser.Cameras + * @namespace Phaser.Cameras.Controls */ module.exports = { - Controls: __webpack_require__(438), - Scene2D: __webpack_require__(441), - Sprite3D: __webpack_require__(443) + Fixed: __webpack_require__(438), + Smoothed: __webpack_require__(439) }; @@ -80731,28 +80908,6 @@ module.exports = { /* 438 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Cameras.Controls - */ - -module.exports = { - - Fixed: __webpack_require__(439), - Smoothed: __webpack_require__(440) - -}; - - -/***/ }), -/* 439 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -81043,7 +81198,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 440 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81508,7 +81663,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 441 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81523,14 +81678,14 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(197), - CameraManager: __webpack_require__(442) + Camera: __webpack_require__(115), + CameraManager: __webpack_require__(441) }; /***/ }), -/* 442 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81539,7 +81694,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(197); +var Camera = __webpack_require__(115); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginManager = __webpack_require__(11); @@ -82010,7 +82165,7 @@ module.exports = CameraManager; /***/ }), -/* 443 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82025,8 +82180,8 @@ module.exports = CameraManager; module.exports = { - Camera: __webpack_require__(116), - CameraManager: __webpack_require__(447), + Camera: __webpack_require__(118), + CameraManager: __webpack_require__(446), OrthographicCamera: __webpack_require__(209), PerspectiveCamera: __webpack_require__(210) @@ -82034,7 +82189,7 @@ module.exports = { /***/ }), -/* 444 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82048,12 +82203,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(445); + renderWebGL = __webpack_require__(444); } if (true) { - renderCanvas = __webpack_require__(446); + renderCanvas = __webpack_require__(445); } module.exports = { @@ -82065,7 +82220,7 @@ module.exports = { /***/ }), -/* 445 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82104,7 +82259,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 446 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82143,7 +82298,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 447 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82398,7 +82553,7 @@ module.exports = CameraManager; /***/ }), -/* 448 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82414,13 +82569,13 @@ module.exports = CameraManager; module.exports = { GenerateTexture: __webpack_require__(211), - Palettes: __webpack_require__(449) + Palettes: __webpack_require__(448) }; /***/ }), -/* 449 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82436,16 +82591,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(212), - C64: __webpack_require__(450), - CGA: __webpack_require__(451), - JMP: __webpack_require__(452), - MSX: __webpack_require__(453) + C64: __webpack_require__(449), + CGA: __webpack_require__(450), + JMP: __webpack_require__(451), + MSX: __webpack_require__(452) }; /***/ }), -/* 450 */ +/* 449 */ /***/ (function(module, exports) { /** @@ -82499,7 +82654,7 @@ module.exports = { /***/ }), -/* 451 */ +/* 450 */ /***/ (function(module, exports) { /** @@ -82553,7 +82708,7 @@ module.exports = { /***/ }), -/* 452 */ +/* 451 */ /***/ (function(module, exports) { /** @@ -82607,7 +82762,7 @@ module.exports = { /***/ }), -/* 453 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -82661,7 +82816,7 @@ module.exports = { /***/ }), -/* 454 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82676,7 +82831,7 @@ module.exports = { module.exports = { - Path: __webpack_require__(455), + Path: __webpack_require__(454), CubicBezier: __webpack_require__(213), Curve: __webpack_require__(66), @@ -82688,7 +82843,7 @@ module.exports = { /***/ }), -/* 455 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82704,7 +82859,7 @@ var CubicBezierCurve = __webpack_require__(213); var EllipseCurve = __webpack_require__(215); var GameObjectFactory = __webpack_require__(9); var LineCurve = __webpack_require__(217); -var MovePathTo = __webpack_require__(456); +var MovePathTo = __webpack_require__(455); var Rectangle = __webpack_require__(8); var SplineCurve = __webpack_require__(218); var Vector2 = __webpack_require__(6); @@ -83453,7 +83608,7 @@ module.exports = Path; /***/ }), -/* 456 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83589,7 +83744,7 @@ module.exports = MoveTo; /***/ }), -/* 457 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83605,13 +83760,13 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(79), - DataManagerPlugin: __webpack_require__(458) + DataManagerPlugin: __webpack_require__(457) }; /***/ }), -/* 458 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83719,7 +83874,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 459 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83734,17 +83889,17 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(460), - Bounds: __webpack_require__(475), - Canvas: __webpack_require__(478), + Align: __webpack_require__(459), + Bounds: __webpack_require__(474), + Canvas: __webpack_require__(477), Color: __webpack_require__(220), - Masks: __webpack_require__(489) + Masks: __webpack_require__(488) }; /***/ }), -/* 460 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83759,8 +83914,38 @@ module.exports = { module.exports = { - In: __webpack_require__(461), - To: __webpack_require__(462) + In: __webpack_require__(460), + To: __webpack_require__(461) + +}; + + +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Display.Align.In + */ + +module.exports = { + + BottomCenter: __webpack_require__(169), + BottomLeft: __webpack_require__(170), + BottomRight: __webpack_require__(171), + Center: __webpack_require__(172), + LeftCenter: __webpack_require__(174), + QuickSet: __webpack_require__(167), + RightCenter: __webpack_require__(175), + TopCenter: __webpack_require__(176), + TopLeft: __webpack_require__(177), + TopRight: __webpack_require__(178) }; @@ -83776,21 +83961,23 @@ module.exports = { */ /** - * @namespace Phaser.Display.Align.In + * @namespace Phaser.Display.Align.To */ module.exports = { - BottomCenter: __webpack_require__(168), - BottomLeft: __webpack_require__(169), - BottomRight: __webpack_require__(170), - Center: __webpack_require__(171), - LeftCenter: __webpack_require__(173), - QuickSet: __webpack_require__(166), - RightCenter: __webpack_require__(174), - TopCenter: __webpack_require__(175), - TopLeft: __webpack_require__(176), - TopRight: __webpack_require__(177) + BottomCenter: __webpack_require__(462), + BottomLeft: __webpack_require__(463), + BottomRight: __webpack_require__(464), + LeftBottom: __webpack_require__(465), + LeftCenter: __webpack_require__(466), + LeftTop: __webpack_require__(467), + RightBottom: __webpack_require__(468), + RightCenter: __webpack_require__(469), + RightTop: __webpack_require__(470), + TopCenter: __webpack_require__(471), + TopLeft: __webpack_require__(472), + TopRight: __webpack_require__(473) }; @@ -83799,38 +83986,6 @@ module.exports = { /* 462 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Display.Align.To - */ - -module.exports = { - - BottomCenter: __webpack_require__(463), - BottomLeft: __webpack_require__(464), - BottomRight: __webpack_require__(465), - LeftBottom: __webpack_require__(466), - LeftCenter: __webpack_require__(467), - LeftTop: __webpack_require__(468), - RightBottom: __webpack_require__(469), - RightCenter: __webpack_require__(470), - RightTop: __webpack_require__(471), - TopCenter: __webpack_require__(472), - TopLeft: __webpack_require__(473), - TopRight: __webpack_require__(474) - -}; - - -/***/ }), -/* 463 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -83870,7 +84025,7 @@ module.exports = BottomCenter; /***/ }), -/* 464 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83912,7 +84067,7 @@ module.exports = BottomLeft; /***/ }), -/* 465 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83954,7 +84109,7 @@ module.exports = BottomRight; /***/ }), -/* 466 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83996,7 +84151,7 @@ module.exports = LeftBottom; /***/ }), -/* 467 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84038,7 +84193,7 @@ module.exports = LeftCenter; /***/ }), -/* 468 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84080,7 +84235,7 @@ module.exports = LeftTop; /***/ }), -/* 469 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84122,7 +84277,7 @@ module.exports = RightBottom; /***/ }), -/* 470 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84164,7 +84319,7 @@ module.exports = RightCenter; /***/ }), -/* 471 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84206,7 +84361,7 @@ module.exports = RightTop; /***/ }), -/* 472 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84248,7 +84403,7 @@ module.exports = TopCenter; /***/ }), -/* 473 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84290,7 +84445,7 @@ module.exports = TopLeft; /***/ }), -/* 474 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84332,7 +84487,7 @@ module.exports = TopRight; /***/ }), -/* 475 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84347,13 +84502,13 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(172), + CenterOn: __webpack_require__(173), GetBottom: __webpack_require__(24), GetCenterX: __webpack_require__(47), GetCenterY: __webpack_require__(50), GetLeft: __webpack_require__(26), - GetOffsetX: __webpack_require__(476), - GetOffsetY: __webpack_require__(477), + GetOffsetX: __webpack_require__(475), + GetOffsetY: __webpack_require__(476), GetRight: __webpack_require__(28), GetTop: __webpack_require__(30), SetBottom: __webpack_require__(25), @@ -84367,7 +84522,7 @@ module.exports = { /***/ }), -/* 476 */ +/* 475 */ /***/ (function(module, exports) { /** @@ -84397,7 +84552,7 @@ module.exports = GetOffsetX; /***/ }), -/* 477 */ +/* 476 */ /***/ (function(module, exports) { /** @@ -84427,7 +84582,7 @@ module.exports = GetOffsetY; /***/ }), -/* 478 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84444,15 +84599,15 @@ module.exports = { Interpolation: __webpack_require__(219), Pool: __webpack_require__(20), - Smoothing: __webpack_require__(119), - TouchAction: __webpack_require__(479), - UserSelect: __webpack_require__(480) + Smoothing: __webpack_require__(121), + TouchAction: __webpack_require__(478), + UserSelect: __webpack_require__(479) }; /***/ }), -/* 479 */ +/* 478 */ /***/ (function(module, exports) { /** @@ -84487,7 +84642,7 @@ module.exports = TouchAction; /***/ }), -/* 480 */ +/* 479 */ /***/ (function(module, exports) { /** @@ -84534,7 +84689,7 @@ module.exports = UserSelect; /***/ }), -/* 481 */ +/* 480 */ /***/ (function(module, exports) { /** @@ -84582,7 +84737,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 482 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84591,7 +84746,7 @@ module.exports = ColorToRGBA; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); var HueToComponent = __webpack_require__(222); /** @@ -84632,7 +84787,7 @@ module.exports = HSLToColor; /***/ }), -/* 483 */ +/* 482 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -84660,7 +84815,7 @@ module.exports = function(module) { /***/ }), -/* 484 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84701,7 +84856,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 485 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84804,7 +84959,7 @@ module.exports = { /***/ }), -/* 486 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84814,7 +84969,7 @@ module.exports = { */ var Between = __webpack_require__(226); -var Color = __webpack_require__(36); +var Color = __webpack_require__(37); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -84840,7 +84995,7 @@ module.exports = RandomRGB; /***/ }), -/* 487 */ +/* 486 */ /***/ (function(module, exports) { /** @@ -84904,7 +85059,7 @@ module.exports = RGBToHSV; /***/ }), -/* 488 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84948,7 +85103,7 @@ module.exports = RGBToString; /***/ }), -/* 489 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84963,14 +85118,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(490), - GeometryMask: __webpack_require__(491) + BitmapMask: __webpack_require__(489), + GeometryMask: __webpack_require__(490) }; /***/ }), -/* 490 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85185,7 +85340,7 @@ module.exports = BitmapMask; /***/ }), -/* 491 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85329,7 +85484,7 @@ module.exports = GeometryMask; /***/ }), -/* 492 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85344,7 +85499,7 @@ module.exports = GeometryMask; module.exports = { - AddToDOM: __webpack_require__(122), + AddToDOM: __webpack_require__(124), DOMContentLoaded: __webpack_require__(227), ParseXML: __webpack_require__(228), RemoveFromDOM: __webpack_require__(229), @@ -85354,7 +85509,7 @@ module.exports = { /***/ }), -/* 493 */ +/* 492 */ /***/ (function(module, exports) { // shim for using process in browser @@ -85544,7 +85699,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 494 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85726,7 +85881,7 @@ module.exports = EventEmitter; /***/ }), -/* 495 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85735,16 +85890,16 @@ module.exports = EventEmitter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(122); -var AnimationManager = __webpack_require__(193); -var CacheManager = __webpack_require__(196); +var AddToDOM = __webpack_require__(124); +var AnimationManager = __webpack_require__(194); +var CacheManager = __webpack_require__(197); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Config = __webpack_require__(496); -var CreateRenderer = __webpack_require__(497); +var Config = __webpack_require__(495); +var CreateRenderer = __webpack_require__(496); var DataManager = __webpack_require__(79); -var DebugHeader = __webpack_require__(514); -var Device = __webpack_require__(515); +var DebugHeader = __webpack_require__(513); +var Device = __webpack_require__(514); var DOMContentLoaded = __webpack_require__(227); var EventEmitter = __webpack_require__(13); var InputManager = __webpack_require__(237); @@ -85753,8 +85908,8 @@ var PluginManager = __webpack_require__(11); var SceneManager = __webpack_require__(249); var SoundManagerCreator = __webpack_require__(253); var TextureManager = __webpack_require__(260); -var TimeStep = __webpack_require__(538); -var VisibilityHandler = __webpack_require__(539); +var TimeStep = __webpack_require__(537); +var VisibilityHandler = __webpack_require__(538); /** * @classdesc @@ -86207,7 +86362,7 @@ module.exports = Game; /***/ }), -/* 496 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86222,7 +86377,7 @@ var GetValue = __webpack_require__(4); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(3); var Plugins = __webpack_require__(231); -var ValueToColor = __webpack_require__(114); +var ValueToColor = __webpack_require__(116); /** * This callback type is completely empty, a no-operation. @@ -86438,7 +86593,7 @@ module.exports = Config; /***/ }), -/* 497 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86450,7 +86605,7 @@ module.exports = Config; var CanvasInterpolation = __webpack_require__(219); var CanvasPool = __webpack_require__(20); var CONST = __webpack_require__(22); -var Features = __webpack_require__(123); +var Features = __webpack_require__(125); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -86526,8 +86681,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(498); - WebGLRenderer = __webpack_require__(503); + CanvasRenderer = __webpack_require__(497); + WebGLRenderer = __webpack_require__(502); // Let the config pick the renderer type, both are included if (config.renderType === CONST.WEBGL) @@ -86567,7 +86722,7 @@ module.exports = CreateRenderer; /***/ }), -/* 498 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86576,14 +86731,14 @@ module.exports = CreateRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitImage = __webpack_require__(499); -var CanvasSnapshot = __webpack_require__(500); +var BlitImage = __webpack_require__(498); +var CanvasSnapshot = __webpack_require__(499); var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var DrawImage = __webpack_require__(501); -var GetBlendModes = __webpack_require__(502); +var DrawImage = __webpack_require__(500); +var GetBlendModes = __webpack_require__(501); var ScaleModes = __webpack_require__(62); -var Smoothing = __webpack_require__(119); +var Smoothing = __webpack_require__(121); /** * @classdesc @@ -87096,7 +87251,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 499 */ +/* 498 */ /***/ (function(module, exports) { /** @@ -87137,7 +87292,7 @@ module.exports = BlitImage; /***/ }), -/* 500 */ +/* 499 */ /***/ (function(module, exports) { /** @@ -87176,7 +87331,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 501 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -87270,7 +87425,7 @@ module.exports = DrawImage; /***/ }), -/* 502 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87320,7 +87475,7 @@ module.exports = GetBlendModes; /***/ }), -/* 503 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87331,13 +87486,13 @@ module.exports = GetBlendModes; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(124); -var Utils = __webpack_require__(38); -var WebGLSnapshot = __webpack_require__(504); +var IsSizePowerOfTwo = __webpack_require__(126); +var Utils = __webpack_require__(34); +var WebGLSnapshot = __webpack_require__(503); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(505); -var FlatTintPipeline = __webpack_require__(508); +var BitmapMaskPipeline = __webpack_require__(504); +var FlatTintPipeline = __webpack_require__(507); var ForwardDiffuseLightPipeline = __webpack_require__(235); var TextureTintPipeline = __webpack_require__(236); @@ -87514,6 +87669,16 @@ var WebGLRenderer = new Class({ // Intenal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit + * @type {int} + * @since 3.1.0 + */ + this.currentActiveTextureUnit = 0; + + /** * [description] * @@ -88091,6 +88256,38 @@ var WebGLRenderer = new Class({ return this; }, + addBlendMode: function (func, equation) + { + var index = this.blendModes.push({ func: func, equation: equation }); + + return index - 1; + }, + + updateBlendMode: function (index, func, equation) + { + if (this.blendModes[index]) + { + this.blendModes[index].func = func; + + if (equation) + { + this.blendModes[index].equation = equation; + } + } + + return this; + }, + + removeBlendMode: function (index) + { + if (index > 16 && this.blendModes[index]) + { + this.blendModes.splice(index, 1); + } + + return this; + }, + /** * [description] * @@ -88110,7 +88307,11 @@ var WebGLRenderer = new Class({ { this.flush(); - gl.activeTexture(gl.TEXTURE0 + textureUnit); + if (this.currentActiveTextureUnit !== textureUnit) + { + gl.activeTexture(gl.TEXTURE0 + textureUnit); + this.currentActiveTextureUnit = textureUnit; + } gl.bindTexture(gl.TEXTURE_2D, texture); this.currentTextures[textureUnit] = texture; @@ -89076,7 +89277,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 504 */ +/* 503 */ /***/ (function(module, exports) { /** @@ -89145,7 +89346,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 505 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89155,9 +89356,9 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(506); -var ShaderSourceVS = __webpack_require__(507); -var Utils = __webpack_require__(38); +var ShaderSourceFS = __webpack_require__(505); +var ShaderSourceVS = __webpack_require__(506); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); /** @@ -89342,9 +89543,10 @@ var BitmapMaskPipeline = new Class({ // Bind bitmap mask pipeline and draw renderer.setPipeline(this); - renderer.setTexture2D(mask.mainTexture, 0); + renderer.setTexture2D(mask.maskTexture, 1); - + renderer.setTexture2D(mask.mainTexture, 0); + // Finally draw a triangle filling the whole screen gl.drawArrays(this.topology, 0, 3); } @@ -89356,19 +89558,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 506 */ +/* 505 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = maskColor.a * mainColor.a;\r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n" /***/ }), -/* 507 */ +/* 506 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n" /***/ }), -/* 508 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89378,12 +89580,12 @@ module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision med */ var Class = __webpack_require__(0); -var Commands = __webpack_require__(125); +var Commands = __webpack_require__(127); var Earcut = __webpack_require__(233); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(509); -var ShaderSourceVS = __webpack_require__(510); -var Utils = __webpack_require__(38); +var ShaderSourceFS = __webpack_require__(508); +var ShaderSourceVS = __webpack_require__(509); +var Utils = __webpack_require__(34); var WebGLPipeline = __webpack_require__(83); var Point = function (x, y, width, rgb, alpha) @@ -90626,37 +90828,37 @@ module.exports = FlatTintPipeline; /***/ }), -/* 509 */ +/* 508 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n" /***/ }), -/* 510 */ +/* 509 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n" /***/ }), -/* 511 */ +/* 510 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n" /***/ }), -/* 512 */ +/* 511 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n" /***/ }), -/* 513 */ +/* 512 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n" /***/ }), -/* 514 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90775,7 +90977,7 @@ module.exports = DebugHeader; /***/ }), -/* 515 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90797,18 +90999,18 @@ module.exports = { os: __webpack_require__(67), browser: __webpack_require__(82), - features: __webpack_require__(123), - input: __webpack_require__(516), - audio: __webpack_require__(517), - video: __webpack_require__(518), - fullscreen: __webpack_require__(519), + features: __webpack_require__(125), + input: __webpack_require__(515), + audio: __webpack_require__(516), + video: __webpack_require__(517), + fullscreen: __webpack_require__(518), canvasFeatures: __webpack_require__(232) }; /***/ }), -/* 516 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90888,7 +91090,7 @@ module.exports = init(); /***/ }), -/* 517 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91014,7 +91216,7 @@ module.exports = init(); /***/ }), -/* 518 */ +/* 517 */ /***/ (function(module, exports) { /** @@ -91100,7 +91302,7 @@ module.exports = init(); /***/ }), -/* 519 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -91199,7 +91401,7 @@ module.exports = init(); /***/ }), -/* 520 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91208,7 +91410,7 @@ module.exports = init(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(521); +var AdvanceKeyCombo = __webpack_require__(520); /** * Used internally by the KeyCombo class. @@ -91279,7 +91481,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 521 */ +/* 520 */ /***/ (function(module, exports) { /** @@ -91320,7 +91522,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 522 */ +/* 521 */ /***/ (function(module, exports) { /** @@ -91354,7 +91556,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 523 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91363,7 +91565,7 @@ module.exports = ResetKeyCombo; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(128); var KeyMap = {}; @@ -91376,7 +91578,7 @@ module.exports = KeyMap; /***/ }), -/* 524 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -91431,7 +91633,7 @@ module.exports = ProcessKeyDown; /***/ }), -/* 525 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -91481,7 +91683,7 @@ module.exports = ProcessKeyUp; /***/ }), -/* 526 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91543,7 +91745,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 527 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91589,7 +91791,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 528 */ +/* 527 */ /***/ (function(module, exports) { /** @@ -91637,7 +91839,7 @@ module.exports = InjectionMap; /***/ }), -/* 529 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -91670,7 +91872,7 @@ module.exports = Canvas; /***/ }), -/* 530 */ +/* 529 */ /***/ (function(module, exports) { /** @@ -91703,7 +91905,7 @@ module.exports = Image; /***/ }), -/* 531 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91808,7 +92010,7 @@ module.exports = JSONArray; /***/ }), -/* 532 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91905,7 +92107,7 @@ module.exports = JSONHash; /***/ }), -/* 533 */ +/* 532 */ /***/ (function(module, exports) { /** @@ -91978,7 +92180,7 @@ module.exports = Pyxel; /***/ }), -/* 534 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92090,7 +92292,7 @@ module.exports = SpriteSheet; /***/ }), -/* 535 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92273,7 +92475,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 536 */ +/* 535 */ /***/ (function(module, exports) { /** @@ -92356,7 +92558,7 @@ module.exports = StarlingXML; /***/ }), -/* 537 */ +/* 536 */ /***/ (function(module, exports) { /** @@ -92520,7 +92722,7 @@ TextureImporter: /***/ }), -/* 538 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93142,7 +93344,7 @@ module.exports = TimeStep; /***/ }), -/* 539 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -93256,7 +93458,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 540 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93271,25 +93473,25 @@ module.exports = VisibilityHandler; var GameObjects = { - DisplayList: __webpack_require__(264), + DisplayList: __webpack_require__(540), GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), UpdateList: __webpack_require__(541), Components: __webpack_require__(12), - BitmapText: __webpack_require__(130), - Blitter: __webpack_require__(131), - DynamicBitmapText: __webpack_require__(132), - Graphics: __webpack_require__(133), + BitmapText: __webpack_require__(131), + Blitter: __webpack_require__(132), + DynamicBitmapText: __webpack_require__(133), + Graphics: __webpack_require__(134), Group: __webpack_require__(69), Image: __webpack_require__(70), - Particles: __webpack_require__(136), - PathFollower: __webpack_require__(288), + Particles: __webpack_require__(137), + PathFollower: __webpack_require__(287), Sprite3D: __webpack_require__(81), - Sprite: __webpack_require__(37), - Text: __webpack_require__(138), - TileSprite: __webpack_require__(139), + Sprite: __webpack_require__(38), + Text: __webpack_require__(139), + TileSprite: __webpack_require__(140), Zone: __webpack_require__(77), // Game Object Factories @@ -93330,8 +93532,8 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(88); - GameObjects.Quad = __webpack_require__(140); + GameObjects.Mesh = __webpack_require__(89); + GameObjects.Quad = __webpack_require__(141); GameObjects.Factories.Mesh = __webpack_require__(648); GameObjects.Factories.Quad = __webpack_require__(649); @@ -93339,15 +93541,187 @@ if (true) GameObjects.Creators.Mesh = __webpack_require__(650); GameObjects.Creators.Quad = __webpack_require__(651); - GameObjects.Light = __webpack_require__(291); + GameObjects.Light = __webpack_require__(290); - __webpack_require__(292); + __webpack_require__(291); __webpack_require__(652); } module.exports = GameObjects; +/***/ }), +/* 540 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var List = __webpack_require__(87); +var PluginManager = __webpack_require__(11); +var StableSort = __webpack_require__(264); + +/** + * @classdesc + * [description] + * + * @class DisplayList + * @extends Phaser.Structs.List + * @memberOf Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + */ +var DisplayList = new Class({ + + Extends: List, + + initialize: + + function DisplayList (scene) + { + List.call(this, scene); + + /** + * [description] + * + * @name Phaser.GameObjects.DisplayList#sortChildrenFlag + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.sortChildrenFlag = false; + + /** + * [description] + * + * @name Phaser.GameObjects.DisplayList#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * [description] + * + * @name Phaser.GameObjects.DisplayList#systems + * @type {Phaser.Scenes.Systems} + * @since 3.0.0 + */ + this.systems = scene.sys; + + if (!scene.sys.settings.isBooted) + { + scene.sys.events.once('boot', this.boot, this); + } + }, + + /** + * [description] + * + * @method Phaser.GameObjects.DisplayList#boot + * @since 3.0.0 + */ + boot: function () + { + var eventEmitter = this.systems.events; + + eventEmitter.on('shutdown', this.shutdown, this); + eventEmitter.on('destroy', this.destroy, this); + }, + + /** + * Force a sort of the display list on the next call to depthSort. + * + * @method Phaser.GameObjects.DisplayList#queueDepthSort + * @since 3.0.0 + */ + queueDepthSort: function () + { + this.sortChildrenFlag = true; + }, + + /** + * Immediately sorts the display list if the flag is set. + * + * @method Phaser.GameObjects.DisplayList#depthSort + * @since 3.0.0 + */ + depthSort: function () + { + if (this.sortChildrenFlag) + { + StableSort.inplace(this.list, this.sortByDepth); + + this.sortChildrenFlag = false; + } + }, + + /** + * [description] + * + * @method Phaser.GameObjects.DisplayList#sortByDepth + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} childA - [description] + * @param {Phaser.GameObjects.GameObject} childB - [description] + * + * @return {integer} [description] + */ + sortByDepth: function (childA, childB) + { + return childA._depth - childB._depth; + }, + + /** + * Given an array of Game Objects, sort the array and return it, + * so that the objects are in index order with the lowest at the bottom. + * + * @method Phaser.GameObjects.DisplayList#sortGameObjects + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] + * + * @return {array} [description] + */ + sortGameObjects: function (gameObjects) + { + if (gameObjects === undefined) { gameObjects = this.list; } + + this.scene.sys.depthSort(); + + return gameObjects.sort(this.sortIndexHandler.bind(this)); + }, + + /** + * Note that the given array is sorted in place, even though it isn't returned directly it will still be updated. + * + * @method Phaser.GameObjects.DisplayList#getTopGameObject + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject[]} gameObjects - [description] + * + * @return {Phaser.GameObjects.GameObject} The top-most Game Object on the Display List. + */ + getTopGameObject: function (gameObjects) + { + this.sortGameObjects(gameObjects); + + return gameObjects[gameObjects.length - 1]; + } + +}); + +PluginManager.register('DisplayList', DisplayList, 'displayList'); + +module.exports = DisplayList; + + /***/ }), /* 541 */ /***/ (function(module, exports, __webpack_require__) { @@ -93631,7 +94005,7 @@ module.exports = UpdateList; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(267); +var ParseXMLBitmapFont = __webpack_require__(266); var ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing) { @@ -94892,7 +95266,7 @@ module.exports = Area; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Ellipse = __webpack_require__(134); +var Ellipse = __webpack_require__(135); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -95165,12 +95539,12 @@ if (true) renderWebGL = __webpack_require__(564); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(272); + renderCanvas = __webpack_require__(271); } if (true) { - renderCanvas = __webpack_require__(272); + renderCanvas = __webpack_require__(271); } module.exports = { @@ -95561,14 +95935,14 @@ var DeathZone = __webpack_require__(570); var EdgeZone = __webpack_require__(571); var EmitterOp = __webpack_require__(572); var GetFastValue = __webpack_require__(1); -var GetRandomElement = __webpack_require__(137); +var GetRandomElement = __webpack_require__(138); var GetValue = __webpack_require__(4); -var HasAny = __webpack_require__(287); +var HasAny = __webpack_require__(286); var HasValue = __webpack_require__(72); var Particle = __webpack_require__(606); var RandomZone = __webpack_require__(607); var Rectangle = __webpack_require__(8); -var StableSort = __webpack_require__(265); +var StableSort = __webpack_require__(264); var Vector2 = __webpack_require__(6); var Wrap = __webpack_require__(42); @@ -97854,7 +98228,7 @@ module.exports = EdgeZone; */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(274); +var FloatBetween = __webpack_require__(273); var GetEaseFunction = __webpack_require__(71); var GetFastValue = __webpack_require__(1); var Wrap = __webpack_require__(42); @@ -98413,18 +98787,18 @@ module.exports = EmitterOp; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(275); -var Bounce = __webpack_require__(276); -var Circular = __webpack_require__(277); -var Cubic = __webpack_require__(278); -var Elastic = __webpack_require__(279); -var Expo = __webpack_require__(280); -var Linear = __webpack_require__(281); -var Quadratic = __webpack_require__(282); -var Quartic = __webpack_require__(283); -var Quintic = __webpack_require__(284); -var Sine = __webpack_require__(285); -var Stepped = __webpack_require__(286); +var Back = __webpack_require__(274); +var Bounce = __webpack_require__(275); +var Circular = __webpack_require__(276); +var Cubic = __webpack_require__(277); +var Elastic = __webpack_require__(278); +var Expo = __webpack_require__(279); +var Linear = __webpack_require__(280); +var Quadratic = __webpack_require__(281); +var Quartic = __webpack_require__(282); +var Quintic = __webpack_require__(283); +var Sine = __webpack_require__(284); +var Stepped = __webpack_require__(285); // EaseMap module.exports = { @@ -99654,7 +100028,7 @@ module.exports = Stepped; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); var DistanceBetween = __webpack_require__(43); /** @@ -101913,7 +102287,7 @@ module.exports = TileSpriteCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(131); +var Blitter = __webpack_require__(132); var GameObjectFactory = __webpack_require__(9); /** @@ -101955,7 +102329,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var DynamicBitmapText = __webpack_require__(132); +var DynamicBitmapText = __webpack_require__(133); var GameObjectFactory = __webpack_require__(9); /** @@ -101998,7 +102372,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Graphics = __webpack_require__(133); +var Graphics = __webpack_require__(134); var GameObjectFactory = __webpack_require__(9); /** @@ -102126,7 +102500,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var ParticleEmitterManager = __webpack_require__(136); +var ParticleEmitterManager = __webpack_require__(137); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -102172,7 +102546,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(9); -var PathFollower = __webpack_require__(288); +var PathFollower = __webpack_require__(287); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -102268,7 +102642,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -102314,7 +102688,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(130); +var BitmapText = __webpack_require__(131); var GameObjectFactory = __webpack_require__(9); /** @@ -102357,7 +102731,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(138); +var Text = __webpack_require__(139); var GameObjectFactory = __webpack_require__(9); /** @@ -102399,7 +102773,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileSprite = __webpack_require__(139); +var TileSprite = __webpack_require__(140); var GameObjectFactory = __webpack_require__(9); /** @@ -102485,7 +102859,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Blitter = __webpack_require__(131); +var Blitter = __webpack_require__(132); var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); @@ -102527,7 +102901,7 @@ GameObjectCreator.register('blitter', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(132); +var BitmapText = __webpack_require__(133); var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); @@ -102572,7 +102946,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) */ var GameObjectCreator = __webpack_require__(14); -var Graphics = __webpack_require__(133); +var Graphics = __webpack_require__(134); /** * Creates a new Graphics Game Object and returns it. @@ -102682,7 +103056,7 @@ GameObjectCreator.register('image', function (config) var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var GetFastValue = __webpack_require__(1); -var ParticleEmitterManager = __webpack_require__(136); +var ParticleEmitterManager = __webpack_require__(137); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -102737,7 +103111,7 @@ GameObjectCreator.register('particles', function (config) */ var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(290); +var BuildGameObjectAnimation = __webpack_require__(289); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var Sprite3D = __webpack_require__(81); @@ -102786,10 +103160,10 @@ GameObjectCreator.register('sprite3D', function (config) */ var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(290); +var BuildGameObjectAnimation = __webpack_require__(289); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * Creates a new Sprite Game Object and returns it. @@ -102834,7 +103208,7 @@ GameObjectCreator.register('sprite', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapText = __webpack_require__(130); +var BitmapText = __webpack_require__(131); var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); @@ -102882,7 +103256,7 @@ GameObjectCreator.register('bitmapText', function (config) var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Text = __webpack_require__(138); +var Text = __webpack_require__(139); /** * Creates a new Text Game Object and returns it. @@ -102961,7 +103335,7 @@ GameObjectCreator.register('text', function (config) var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var TileSprite = __webpack_require__(139); +var TileSprite = __webpack_require__(140); /** * Creates a new TileSprite Game Object and returns it. @@ -103142,7 +103516,7 @@ module.exports = MeshCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Mesh = __webpack_require__(88); +var Mesh = __webpack_require__(89); var GameObjectFactory = __webpack_require__(9); /** @@ -103192,7 +103566,7 @@ if (true) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Quad = __webpack_require__(140); +var Quad = __webpack_require__(141); var GameObjectFactory = __webpack_require__(9); /** @@ -103242,7 +103616,7 @@ var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var Mesh = __webpack_require__(88); +var Mesh = __webpack_require__(89); /** * Creates a new Mesh Game Object and returns it. @@ -103288,7 +103662,7 @@ GameObjectCreator.register('mesh', function (config) var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Quad = __webpack_require__(140); +var Quad = __webpack_require__(141); /** * Creates a new Quad Game Object and returns it. @@ -103330,7 +103704,7 @@ GameObjectCreator.register('quad', function (config) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(292); +var LightsManager = __webpack_require__(291); var PluginManager = __webpack_require__(11); /** @@ -103427,8 +103801,8 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(63); Circle.Area = __webpack_require__(654); -Circle.Circumference = __webpack_require__(180); -Circle.CircumferencePoint = __webpack_require__(104); +Circle.Circumference = __webpack_require__(181); +Circle.CircumferencePoint = __webpack_require__(105); Circle.Clone = __webpack_require__(655); Circle.Contains = __webpack_require__(32); Circle.ContainsPoint = __webpack_require__(656); @@ -103436,11 +103810,11 @@ Circle.ContainsRect = __webpack_require__(657); Circle.CopyFrom = __webpack_require__(658); Circle.Equals = __webpack_require__(659); Circle.GetBounds = __webpack_require__(660); -Circle.GetPoint = __webpack_require__(178); -Circle.GetPoints = __webpack_require__(179); +Circle.GetPoint = __webpack_require__(179); +Circle.GetPoints = __webpack_require__(180); Circle.Offset = __webpack_require__(661); Circle.OffsetPoint = __webpack_require__(662); -Circle.Random = __webpack_require__(105); +Circle.Random = __webpack_require__(106); module.exports = Circle; @@ -103833,7 +104207,7 @@ module.exports = CircleToRectangle; */ var Rectangle = __webpack_require__(8); -var RectangleToRectangle = __webpack_require__(295); +var RectangleToRectangle = __webpack_require__(294); /** * [description] @@ -103976,7 +104350,7 @@ module.exports = LineToRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PointToLine = __webpack_require__(297); +var PointToLine = __webpack_require__(296); /** * [description] @@ -104017,10 +104391,10 @@ module.exports = PointToLineSegment; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToLine = __webpack_require__(89); +var LineToLine = __webpack_require__(90); var Contains = __webpack_require__(33); -var ContainsArray = __webpack_require__(141); -var Decompose = __webpack_require__(298); +var ContainsArray = __webpack_require__(142); +var Decompose = __webpack_require__(297); /** * [description] @@ -104150,7 +104524,7 @@ module.exports = RectangleToValues; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToCircle = __webpack_require__(296); +var LineToCircle = __webpack_require__(295); var Contains = __webpack_require__(53); /** @@ -104214,7 +104588,7 @@ module.exports = TriangleToCircle; */ var Contains = __webpack_require__(53); -var LineToLine = __webpack_require__(89); +var LineToLine = __webpack_require__(90); /** * [description] @@ -104267,9 +104641,9 @@ module.exports = TriangleToLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ContainsArray = __webpack_require__(141); -var Decompose = __webpack_require__(299); -var LineToLine = __webpack_require__(89); +var ContainsArray = __webpack_require__(142); +var Decompose = __webpack_require__(298); +var LineToLine = __webpack_require__(90); /** * [description] @@ -104355,30 +104729,30 @@ module.exports = TriangleToTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(300); +var Line = __webpack_require__(299); Line.Angle = __webpack_require__(54); -Line.BresenhamPoints = __webpack_require__(188); +Line.BresenhamPoints = __webpack_require__(189); Line.CenterOn = __webpack_require__(674); Line.Clone = __webpack_require__(675); Line.CopyFrom = __webpack_require__(676); Line.Equals = __webpack_require__(677); Line.GetMidPoint = __webpack_require__(678); Line.GetNormal = __webpack_require__(679); -Line.GetPoint = __webpack_require__(301); -Line.GetPoints = __webpack_require__(108); +Line.GetPoint = __webpack_require__(300); +Line.GetPoints = __webpack_require__(109); Line.Height = __webpack_require__(680); Line.Length = __webpack_require__(65); -Line.NormalAngle = __webpack_require__(302); +Line.NormalAngle = __webpack_require__(301); Line.NormalX = __webpack_require__(681); Line.NormalY = __webpack_require__(682); Line.Offset = __webpack_require__(683); Line.PerpSlope = __webpack_require__(684); -Line.Random = __webpack_require__(110); +Line.Random = __webpack_require__(111); Line.ReflectAngle = __webpack_require__(685); Line.Rotate = __webpack_require__(686); Line.RotateAroundPoint = __webpack_require__(687); -Line.RotateAroundXY = __webpack_require__(142); +Line.RotateAroundXY = __webpack_require__(143); Line.SetToAngle = __webpack_require__(688); Line.Slope = __webpack_require__(689); Line.Width = __webpack_require__(690); @@ -104436,7 +104810,7 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(300); +var Line = __webpack_require__(299); /** * [description] @@ -104760,7 +105134,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(54); -var NormalAngle = __webpack_require__(302); +var NormalAngle = __webpack_require__(301); /** * Returns the reflected angle between two lines. @@ -104795,7 +105169,7 @@ module.exports = ReflectAngle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(142); +var RotateAroundXY = __webpack_require__(143); /** * [description] @@ -104829,7 +105203,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(142); +var RotateAroundXY = __webpack_require__(143); /** * [description] @@ -104963,8 +105337,8 @@ Point.CopyFrom = __webpack_require__(694); Point.Equals = __webpack_require__(695); Point.Floor = __webpack_require__(696); Point.GetCentroid = __webpack_require__(697); -Point.GetMagnitude = __webpack_require__(303); -Point.GetMagnitudeSq = __webpack_require__(304); +Point.GetMagnitude = __webpack_require__(302); +Point.GetMagnitudeSq = __webpack_require__(303); Point.GetRectangleFromPoints = __webpack_require__(698); Point.Interpolate = __webpack_require__(699); Point.Invert = __webpack_require__(700); @@ -105360,7 +105734,7 @@ module.exports = Negative; */ var Point = __webpack_require__(5); -var GetMagnitudeSq = __webpack_require__(304); +var GetMagnitudeSq = __webpack_require__(303); /** * [description] @@ -105445,7 +105819,7 @@ module.exports = ProjectUnit; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetMagnitude = __webpack_require__(303); +var GetMagnitude = __webpack_require__(302); /** * [description] @@ -105487,10 +105861,10 @@ module.exports = SetMagnitude; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(305); +var Polygon = __webpack_require__(304); Polygon.Clone = __webpack_require__(706); -Polygon.Contains = __webpack_require__(143); +Polygon.Contains = __webpack_require__(144); Polygon.ContainsPoint = __webpack_require__(707); Polygon.GetAABB = __webpack_require__(708); Polygon.GetNumberArray = __webpack_require__(709); @@ -105508,7 +105882,7 @@ module.exports = Polygon; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(305); +var Polygon = __webpack_require__(304); /** * [description] @@ -105538,7 +105912,7 @@ module.exports = Clone; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(143); +var Contains = __webpack_require__(144); /** * [description] @@ -105920,7 +106294,7 @@ module.exports = Equals; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(144); +var GetAspectRatio = __webpack_require__(145); // Fits the target rectangle into the source rectangle. // Preserves aspect ratio. @@ -105971,7 +106345,7 @@ module.exports = FitInside; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(144); +var GetAspectRatio = __webpack_require__(145); // Fits the target rectangle around the source rectangle. // Preserves aspect ration. @@ -106163,7 +106537,7 @@ module.exports = GetSize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(307); +var CenterOn = __webpack_require__(306); // Increases the size of the Rectangle object by the specified amounts. // The center point of the Rectangle object stays the same, and its size increases @@ -106440,7 +106814,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(5); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); /** * [description] @@ -106580,25 +106954,25 @@ Triangle.BuildEquilateral = __webpack_require__(736); Triangle.BuildFromPolygon = __webpack_require__(737); Triangle.BuildRight = __webpack_require__(738); Triangle.CenterOn = __webpack_require__(739); -Triangle.Centroid = __webpack_require__(310); +Triangle.Centroid = __webpack_require__(309); Triangle.CircumCenter = __webpack_require__(740); Triangle.CircumCircle = __webpack_require__(741); Triangle.Clone = __webpack_require__(742); Triangle.Contains = __webpack_require__(53); -Triangle.ContainsArray = __webpack_require__(141); +Triangle.ContainsArray = __webpack_require__(142); Triangle.ContainsPoint = __webpack_require__(743); Triangle.CopyFrom = __webpack_require__(744); -Triangle.Decompose = __webpack_require__(299); +Triangle.Decompose = __webpack_require__(298); Triangle.Equals = __webpack_require__(745); -Triangle.GetPoint = __webpack_require__(308); -Triangle.GetPoints = __webpack_require__(309); -Triangle.InCenter = __webpack_require__(312); +Triangle.GetPoint = __webpack_require__(307); +Triangle.GetPoints = __webpack_require__(308); +Triangle.InCenter = __webpack_require__(311); Triangle.Perimeter = __webpack_require__(746); -Triangle.Offset = __webpack_require__(311); -Triangle.Random = __webpack_require__(111); +Triangle.Offset = __webpack_require__(310); +Triangle.Random = __webpack_require__(112); Triangle.Rotate = __webpack_require__(747); Triangle.RotateAroundPoint = __webpack_require__(748); -Triangle.RotateAroundXY = __webpack_require__(145); +Triangle.RotateAroundXY = __webpack_require__(146); module.exports = Triangle; @@ -106824,8 +107198,8 @@ module.exports = BuildRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Centroid = __webpack_require__(310); -var Offset = __webpack_require__(311); +var Centroid = __webpack_require__(309); +var Offset = __webpack_require__(310); /** * [description] @@ -107178,8 +107552,8 @@ module.exports = Perimeter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(145); -var InCenter = __webpack_require__(312); +var RotateAroundXY = __webpack_require__(146); +var InCenter = __webpack_require__(311); /** * [description] @@ -107212,7 +107586,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(145); +var RotateAroundXY = __webpack_require__(146); /** * [description] @@ -107253,7 +107627,7 @@ module.exports = { Gamepad: __webpack_require__(750), InputManager: __webpack_require__(237), InputPlugin: __webpack_require__(755), - InteractiveObject: __webpack_require__(313), + InteractiveObject: __webpack_require__(312), Keyboard: __webpack_require__(756), Mouse: __webpack_require__(761), Pointer: __webpack_require__(246), @@ -107466,10 +107840,10 @@ var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); var DistanceBetween = __webpack_require__(43); -var Ellipse = __webpack_require__(134); +var Ellipse = __webpack_require__(135); var EllipseContains = __webpack_require__(68); var EventEmitter = __webpack_require__(13); -var InteractiveObject = __webpack_require__(313); +var InteractiveObject = __webpack_require__(312); var PluginManager = __webpack_require__(11); var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); @@ -109053,7 +109427,7 @@ module.exports = { KeyboardManager: __webpack_require__(242), Key: __webpack_require__(243), - KeyCodes: __webpack_require__(126), + KeyCodes: __webpack_require__(128), KeyCombo: __webpack_require__(244), @@ -109269,11 +109643,11 @@ module.exports = { File: __webpack_require__(18), FileTypesManager: __webpack_require__(7), - GetURL: __webpack_require__(146), + GetURL: __webpack_require__(147), LoaderPlugin: __webpack_require__(780), - MergeXHRSettings: __webpack_require__(147), - XHRLoader: __webpack_require__(314), - XHRSettings: __webpack_require__(90) + MergeXHRSettings: __webpack_require__(148), + XHRLoader: __webpack_require__(313), + XHRSettings: __webpack_require__(91) }; @@ -109319,12 +109693,12 @@ module.exports = { AnimationJSONFile: __webpack_require__(765), AtlasJSONFile: __webpack_require__(766), - AudioFile: __webpack_require__(315), + AudioFile: __webpack_require__(314), AudioSprite: __webpack_require__(767), BinaryFile: __webpack_require__(768), BitmapFontFile: __webpack_require__(769), GLSLFile: __webpack_require__(770), - HTML5AudioFile: __webpack_require__(316), + HTML5AudioFile: __webpack_require__(315), HTMLFile: __webpack_require__(771), ImageFile: __webpack_require__(57), JSONFile: __webpack_require__(56), @@ -109333,11 +109707,11 @@ module.exports = { ScriptFile: __webpack_require__(774), SpriteSheetFile: __webpack_require__(775), SVGFile: __webpack_require__(776), - TextFile: __webpack_require__(319), + TextFile: __webpack_require__(318), TilemapCSVFile: __webpack_require__(777), TilemapJSONFile: __webpack_require__(778), UnityAtlasFile: __webpack_require__(779), - XMLFile: __webpack_require__(317) + XMLFile: __webpack_require__(316) }; @@ -109512,7 +109886,7 @@ module.exports = AtlasJSONFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(315); +var AudioFile = __webpack_require__(314); var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(56); @@ -109694,7 +110068,7 @@ module.exports = BinaryFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var XMLFile = __webpack_require__(317); +var XMLFile = __webpack_require__(316); /** * An Bitmap Font File. @@ -110043,7 +110417,7 @@ module.exports = HTMLFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); var JSONFile = __webpack_require__(56); -var NumberArray = __webpack_require__(318); +var NumberArray = __webpack_require__(317); /** * Adds a Multi File Texture Atlas to the current load queue. @@ -110813,7 +111187,7 @@ module.exports = TilemapJSONFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var TextFile = __webpack_require__(319); +var TextFile = __webpack_require__(318); /** * An Atlas JSON File. @@ -110896,9 +111270,9 @@ var CustomSet = __webpack_require__(61); var EventEmitter = __webpack_require__(13); var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(1); -var ParseXMLBitmapFont = __webpack_require__(267); +var ParseXMLBitmapFont = __webpack_require__(266); var PluginManager = __webpack_require__(11); -var XHRSettings = __webpack_require__(90); +var XHRSettings = __webpack_require__(91); /** * @classdesc @@ -111892,15 +112266,15 @@ var PhaserMath = { // Single functions Average: __webpack_require__(809), - Bernstein: __webpack_require__(321), + Bernstein: __webpack_require__(320), Between: __webpack_require__(226), - CatmullRom: __webpack_require__(121), + CatmullRom: __webpack_require__(123), CeilTo: __webpack_require__(810), Clamp: __webpack_require__(60), - DegToRad: __webpack_require__(35), + DegToRad: __webpack_require__(36), Difference: __webpack_require__(811), - Factorial: __webpack_require__(322), - FloatBetween: __webpack_require__(274), + Factorial: __webpack_require__(321), + FloatBetween: __webpack_require__(273), FloorTo: __webpack_require__(812), FromPercent: __webpack_require__(64), GetSpeed: __webpack_require__(813), @@ -111914,14 +112288,14 @@ var PhaserMath = { RandomXY: __webpack_require__(819), RandomXYZ: __webpack_require__(204), RandomXYZW: __webpack_require__(205), - Rotate: __webpack_require__(323), - RotateAround: __webpack_require__(182), - RotateAroundDistance: __webpack_require__(112), - RoundAwayFromZero: __webpack_require__(324), + Rotate: __webpack_require__(322), + RotateAround: __webpack_require__(183), + RotateAroundDistance: __webpack_require__(113), + RoundAwayFromZero: __webpack_require__(323), RoundTo: __webpack_require__(820), SinCosTableGenerator: __webpack_require__(821), - SmootherStep: __webpack_require__(189), - SmoothStep: __webpack_require__(190), + SmootherStep: __webpack_require__(190), + SmoothStep: __webpack_require__(191), TransformXY: __webpack_require__(248), Within: __webpack_require__(822), Wrap: __webpack_require__(42), @@ -111929,9 +112303,9 @@ var PhaserMath = { // Vector classes Vector2: __webpack_require__(6), Vector3: __webpack_require__(51), - Vector4: __webpack_require__(118), + Vector4: __webpack_require__(120), Matrix3: __webpack_require__(208), - Matrix4: __webpack_require__(117), + Matrix4: __webpack_require__(119), Quaternion: __webpack_require__(207), RotateVec3: __webpack_require__(206) @@ -111969,9 +112343,9 @@ module.exports = { Reverse: __webpack_require__(787), RotateTo: __webpack_require__(788), ShortestBetween: __webpack_require__(789), - Normalize: __webpack_require__(320), - Wrap: __webpack_require__(159), - WrapDegrees: __webpack_require__(160) + Normalize: __webpack_require__(319), + Wrap: __webpack_require__(160), + WrapDegrees: __webpack_require__(161) }; @@ -112106,7 +112480,7 @@ module.exports = BetweenPointsY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Normalize = __webpack_require__(320); +var Normalize = __webpack_require__(319); /** * [description] @@ -112346,18 +112720,18 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(275), - Bounce: __webpack_require__(276), - Circular: __webpack_require__(277), - Cubic: __webpack_require__(278), - Elastic: __webpack_require__(279), - Expo: __webpack_require__(280), - Linear: __webpack_require__(281), - Quadratic: __webpack_require__(282), - Quartic: __webpack_require__(283), - Quintic: __webpack_require__(284), - Sine: __webpack_require__(285), - Stepped: __webpack_require__(286) + Back: __webpack_require__(274), + Bounce: __webpack_require__(275), + Circular: __webpack_require__(276), + Cubic: __webpack_require__(277), + Elastic: __webpack_require__(278), + Expo: __webpack_require__(279), + Linear: __webpack_require__(280), + Quadratic: __webpack_require__(281), + Quartic: __webpack_require__(282), + Quintic: __webpack_require__(283), + Sine: __webpack_require__(284), + Stepped: __webpack_require__(285) }; @@ -112580,7 +112954,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bernstein = __webpack_require__(321); +var Bernstein = __webpack_require__(320); /** * [description] @@ -112619,7 +112993,7 @@ module.exports = BezierInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CatmullRom = __webpack_require__(121); +var CatmullRom = __webpack_require__(123); /** * [description] @@ -112682,8 +113056,8 @@ module.exports = CatmullRomInterpolation; module.exports = { - GetNext: __webpack_require__(289), - IsSize: __webpack_require__(124), + GetNext: __webpack_require__(288), + IsSize: __webpack_require__(126), IsValue: __webpack_require__(804) }; @@ -113372,15 +113746,15 @@ module.exports = Within; module.exports = { ArcadePhysics: __webpack_require__(824), - Body: __webpack_require__(331), - Collider: __webpack_require__(332), - Factory: __webpack_require__(325), - Group: __webpack_require__(328), - Image: __webpack_require__(326), - Sprite: __webpack_require__(91), - StaticBody: __webpack_require__(337), - StaticGroup: __webpack_require__(329), - World: __webpack_require__(330) + Body: __webpack_require__(330), + Collider: __webpack_require__(331), + Factory: __webpack_require__(324), + Group: __webpack_require__(327), + Image: __webpack_require__(325), + Sprite: __webpack_require__(92), + StaticBody: __webpack_require__(336), + StaticGroup: __webpack_require__(328), + World: __webpack_require__(329) }; @@ -113396,13 +113770,13 @@ module.exports = { */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(325); +var Factory = __webpack_require__(324); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(103); +var Merge = __webpack_require__(104); var PluginManager = __webpack_require__(11); -var World = __webpack_require__(330); +var World = __webpack_require__(329); var DistanceBetween = __webpack_require__(43); -var DegToRad = __webpack_require__(35); +var DegToRad = __webpack_require__(36); // All methods in this class are available under `this.physics` in a Scene. @@ -114320,18 +114694,16 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#enableBody * @since 3.0.0 * - * @param {[type]} reset - [description] - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} enableGameObject - [description] - * @param {[type]} showGameObject - [description] + * @param {boolean} reset - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {boolean} enableGameObject - [description] + * @param {boolean} showGameObject - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ enableBody: function (reset, x, y, enableGameObject, showGameObject) { - this.body.enable = true; - if (reset) { this.body.reset(x, y); @@ -114347,6 +114719,8 @@ var Enable = { this.body.gameObject.visible = true; } + this.body.enable = true; + return this; }, @@ -114356,10 +114730,10 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#disableBody * @since 3.0.0 * - * @param {[type]} disableGameObject - [description] - * @param {[type]} hideGameObject - [description] + * @param {boolean} [disableGameObject=false] - [description] + * @param {boolean} [hideGameObject=false] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ disableBody: function (disableGameObject, hideGameObject) { @@ -114380,6 +114754,24 @@ var Enable = { this.body.gameObject.visible = false; } + return this; + }, + + /** + * Syncs the Bodies position and size with its parent Game Object. + * You don't need to call this for Dynamic Bodies, as it happens automatically. + * But for Static bodies it's a useful way of modifying the position of a Static Body + * in the Physics World, based on its Game Object. + * + * @method Phaser.Physics.Arcade.Components.Enable#refreshBody + * @since 3.1.0 + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + refreshBody: function () + { + this.body.updateFromGameObject(); + return this; } @@ -114847,7 +115239,7 @@ module.exports = ProcessTileCallbacks; var TileCheckX = __webpack_require__(839); var TileCheckY = __webpack_require__(841); -var TileIntersectsBody = __webpack_require__(336); +var TileIntersectsBody = __webpack_require__(335); /** * The core separation function to separate a physics body and a tile. @@ -115564,7 +115956,7 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(94); +var Vector = __webpack_require__(95); var Common = __webpack_require__(39); (function() { @@ -115660,13 +116052,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(92); +var Bodies = __webpack_require__(93); var Body = __webpack_require__(59); var Class = __webpack_require__(0); var Components = __webpack_require__(849); var GetFastValue = __webpack_require__(1); var HasValue = __webpack_require__(72); -var Vertices = __webpack_require__(93); +var Vertices = __webpack_require__(94); /** * @classdesc @@ -115994,8 +116386,8 @@ var Detector = {}; module.exports = Detector; var SAT = __webpack_require__(852); -var Pair = __webpack_require__(363); -var Bounds = __webpack_require__(95); +var Pair = __webpack_require__(362); +var Bounds = __webpack_require__(96); (function() { @@ -116106,8 +116498,8 @@ var SAT = {}; module.exports = SAT; -var Vertices = __webpack_require__(93); -var Vector = __webpack_require__(94); +var Vertices = __webpack_require__(94); +var Vector = __webpack_require__(95); (function() { @@ -116379,33 +116771,33 @@ var Vector = __webpack_require__(94); var Matter = __webpack_require__(941); Matter.Body = __webpack_require__(59); -Matter.Composite = __webpack_require__(148); +Matter.Composite = __webpack_require__(149); Matter.World = __webpack_require__(855); Matter.Detector = __webpack_require__(851); Matter.Grid = __webpack_require__(942); Matter.Pairs = __webpack_require__(943); -Matter.Pair = __webpack_require__(363); +Matter.Pair = __webpack_require__(362); Matter.Query = __webpack_require__(983); Matter.Resolver = __webpack_require__(944); Matter.SAT = __webpack_require__(852); -Matter.Constraint = __webpack_require__(162); +Matter.Constraint = __webpack_require__(163); Matter.Common = __webpack_require__(39); Matter.Engine = __webpack_require__(945); -Matter.Events = __webpack_require__(161); -Matter.Sleeping = __webpack_require__(340); +Matter.Events = __webpack_require__(162); +Matter.Sleeping = __webpack_require__(339); Matter.Plugin = __webpack_require__(854); -Matter.Bodies = __webpack_require__(92); +Matter.Bodies = __webpack_require__(93); Matter.Composites = __webpack_require__(938); Matter.Axes = __webpack_require__(848); -Matter.Bounds = __webpack_require__(95); +Matter.Bounds = __webpack_require__(96); Matter.Svg = __webpack_require__(985); -Matter.Vector = __webpack_require__(94); -Matter.Vertices = __webpack_require__(93); +Matter.Vector = __webpack_require__(95); +Matter.Vertices = __webpack_require__(94); // aliases @@ -116790,8 +117182,8 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(148); -var Constraint = __webpack_require__(162); +var Composite = __webpack_require__(149); +var Constraint = __webpack_require__(163); var Common = __webpack_require__(39); (function() { @@ -116924,7 +117316,7 @@ module.exports = { SceneManager: __webpack_require__(249), ScenePlugin: __webpack_require__(857), Settings: __webpack_require__(252), - Systems: __webpack_require__(127) + Systems: __webpack_require__(129) }; @@ -117510,10 +117902,10 @@ module.exports = { module.exports = { - List: __webpack_require__(129), - Map: __webpack_require__(113), - ProcessQueue: __webpack_require__(333), - RTree: __webpack_require__(334), + List: __webpack_require__(87), + Map: __webpack_require__(114), + ProcessQueue: __webpack_require__(332), + RTree: __webpack_require__(333), Set: __webpack_require__(61) }; @@ -117538,7 +117930,7 @@ module.exports = { Parsers: __webpack_require__(261), FilterMode: __webpack_require__(861), - Frame: __webpack_require__(128), + Frame: __webpack_require__(130), Texture: __webpack_require__(262), TextureManager: __webpack_require__(260), TextureSource: __webpack_require__(263) @@ -117601,24 +117993,24 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(96), + Components: __webpack_require__(97), Parsers: __webpack_require__(892), Formats: __webpack_require__(19), - ImageCollection: __webpack_require__(348), - ParseToTilemap: __webpack_require__(153), + ImageCollection: __webpack_require__(347), + ParseToTilemap: __webpack_require__(154), Tile: __webpack_require__(45), - Tilemap: __webpack_require__(352), + Tilemap: __webpack_require__(351), TilemapCreator: __webpack_require__(909), TilemapFactory: __webpack_require__(910), - Tileset: __webpack_require__(100), + Tileset: __webpack_require__(101), LayerData: __webpack_require__(75), MapData: __webpack_require__(76), - ObjectLayer: __webpack_require__(350), + ObjectLayer: __webpack_require__(349), - DynamicTilemapLayer: __webpack_require__(353), - StaticTilemapLayer: __webpack_require__(354) + DynamicTilemapLayer: __webpack_require__(352), + StaticTilemapLayer: __webpack_require__(353) }; @@ -117634,7 +118026,7 @@ module.exports = { */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -117698,10 +118090,10 @@ module.exports = Copy; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(98); -var TileToWorldY = __webpack_require__(99); +var TileToWorldX = __webpack_require__(99); +var TileToWorldY = __webpack_require__(100); var GetTilesWithin = __webpack_require__(15); -var ReplaceByIndex = __webpack_require__(341); +var ReplaceByIndex = __webpack_require__(340); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -117854,7 +118246,7 @@ module.exports = CullTiles; */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); var SetTileCollision = __webpack_require__(44); /** @@ -118134,7 +118526,7 @@ module.exports = ForEachTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(97); +var GetTileAt = __webpack_require__(98); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -118175,12 +118567,12 @@ module.exports = GetTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Geom = __webpack_require__(293); +var Geom = __webpack_require__(292); var GetTilesWithin = __webpack_require__(15); -var Intersects = __webpack_require__(294); +var Intersects = __webpack_require__(293); var NOOP = __webpack_require__(3); -var TileToWorldX = __webpack_require__(98); -var TileToWorldY = __webpack_require__(99); +var TileToWorldX = __webpack_require__(99); +var TileToWorldY = __webpack_require__(100); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -118326,7 +118718,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasTileAt = __webpack_require__(342); +var HasTileAt = __webpack_require__(341); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -118365,7 +118757,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PutTileAt = __webpack_require__(150); +var PutTileAt = __webpack_require__(151); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -118407,8 +118799,8 @@ module.exports = PutTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CalculateFacesWithin = __webpack_require__(34); -var PutTileAt = __webpack_require__(150); +var CalculateFacesWithin = __webpack_require__(35); +var PutTileAt = __webpack_require__(151); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -118472,7 +118864,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(15); -var GetRandomElement = __webpack_require__(137); +var GetRandomElement = __webpack_require__(138); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -118528,7 +118920,7 @@ module.exports = Randomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RemoveTileAt = __webpack_require__(343); +var RemoveTileAt = __webpack_require__(342); var WorldToTileX = __webpack_require__(40); var WorldToTileY = __webpack_require__(41); @@ -118656,8 +119048,8 @@ module.exports = RenderDebug; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(151); +var CalculateFacesWithin = __webpack_require__(35); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -118717,8 +119109,8 @@ module.exports = SetCollision; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(151); +var CalculateFacesWithin = __webpack_require__(35); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -118783,8 +119175,8 @@ module.exports = SetCollisionBetween; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(151); +var CalculateFacesWithin = __webpack_require__(35); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -118838,7 +119230,7 @@ module.exports = SetCollisionByExclusion; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); var HasValue = __webpack_require__(72); /** @@ -118912,7 +119304,7 @@ module.exports = SetCollisionByProperty; */ var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(34); +var CalculateFacesWithin = __webpack_require__(35); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -119152,8 +119544,8 @@ module.exports = SwapByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(98); -var TileToWorldY = __webpack_require__(99); +var TileToWorldX = __webpack_require__(99); +var TileToWorldY = __webpack_require__(100); var Vector2 = __webpack_require__(6); /** @@ -119325,12 +119717,12 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(344), - Parse2DArray: __webpack_require__(152), - ParseCSV: __webpack_require__(345), + Parse: __webpack_require__(343), + Parse2DArray: __webpack_require__(153), + ParseCSV: __webpack_require__(344), - Impact: __webpack_require__(351), - Tiled: __webpack_require__(346) + Impact: __webpack_require__(350), + Tiled: __webpack_require__(345) }; @@ -119348,7 +119740,7 @@ module.exports = { var Base64Decode = __webpack_require__(894); var GetFastValue = __webpack_require__(1); var LayerData = __webpack_require__(75); -var ParseGID = __webpack_require__(347); +var ParseGID = __webpack_require__(346); var Tile = __webpack_require__(45); /** @@ -119566,9 +119958,9 @@ module.exports = ParseImageLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(100); -var ImageCollection = __webpack_require__(348); -var ParseObject = __webpack_require__(349); +var Tileset = __webpack_require__(101); +var ImageCollection = __webpack_require__(347); +var ParseObject = __webpack_require__(348); /** * Tilesets & Image Collections @@ -119715,8 +120107,8 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(349); -var ObjectLayer = __webpack_require__(350); +var ParseObject = __webpack_require__(348); +var ObjectLayer = __webpack_require__(349); /** * [description] @@ -120003,7 +120395,7 @@ module.exports = ParseTileLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(100); +var Tileset = __webpack_require__(101); /** * [description] @@ -120364,7 +120756,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(14); -var ParseToTilemap = __webpack_require__(153); +var ParseToTilemap = __webpack_require__(154); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -120424,7 +120816,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(9); -var ParseToTilemap = __webpack_require__(153); +var ParseToTilemap = __webpack_require__(154); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -120496,7 +120888,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { Clock: __webpack_require__(912), - TimerEvent: __webpack_require__(355) + TimerEvent: __webpack_require__(354) }; @@ -120513,7 +120905,7 @@ module.exports = { var Class = __webpack_require__(0); var PluginManager = __webpack_require__(11); -var TimerEvent = __webpack_require__(355); +var TimerEvent = __webpack_require__(354); /** * @classdesc @@ -120888,9 +121280,9 @@ module.exports = { Builders: __webpack_require__(914), TweenManager: __webpack_require__(916), - Tween: __webpack_require__(157), - TweenData: __webpack_require__(158), - Timeline: __webpack_require__(360) + Tween: __webpack_require__(158), + TweenData: __webpack_require__(159), + Timeline: __webpack_require__(359) }; @@ -120913,14 +121305,14 @@ module.exports = { GetBoolean: __webpack_require__(73), GetEaseFunction: __webpack_require__(71), - GetNewValue: __webpack_require__(101), - GetProps: __webpack_require__(356), - GetTargets: __webpack_require__(154), - GetTweens: __webpack_require__(357), - GetValueOp: __webpack_require__(155), - NumberTweenBuilder: __webpack_require__(358), - TimelineBuilder: __webpack_require__(359), - TweenBuilder: __webpack_require__(102), + GetNewValue: __webpack_require__(102), + GetProps: __webpack_require__(355), + GetTargets: __webpack_require__(155), + GetTweens: __webpack_require__(356), + GetValueOp: __webpack_require__(156), + NumberTweenBuilder: __webpack_require__(357), + TimelineBuilder: __webpack_require__(358), + TweenBuilder: __webpack_require__(103), }; @@ -121008,11 +121400,11 @@ module.exports = [ */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(358); +var NumberTweenBuilder = __webpack_require__(357); var PluginManager = __webpack_require__(11); -var TimelineBuilder = __webpack_require__(359); -var TWEEN_CONST = __webpack_require__(87); -var TweenBuilder = __webpack_require__(102); +var TimelineBuilder = __webpack_require__(358); +var TWEEN_CONST = __webpack_require__(88); +var TweenBuilder = __webpack_require__(103); // Phaser.Tweens.TweenManager @@ -121691,16 +122083,16 @@ module.exports = { module.exports = { FindClosestInSorted: __webpack_require__(919), - GetRandomElement: __webpack_require__(137), - NumberArray: __webpack_require__(318), + GetRandomElement: __webpack_require__(138), + NumberArray: __webpack_require__(317), NumberArrayStep: __webpack_require__(920), - QuickSelect: __webpack_require__(335), - Range: __webpack_require__(273), + QuickSelect: __webpack_require__(334), + Range: __webpack_require__(272), RemoveRandomElement: __webpack_require__(921), - RotateLeft: __webpack_require__(186), - RotateRight: __webpack_require__(187), + RotateLeft: __webpack_require__(187), + RotateRight: __webpack_require__(188), Shuffle: __webpack_require__(80), - SpliceOne: __webpack_require__(361) + SpliceOne: __webpack_require__(360) }; @@ -121763,7 +122155,7 @@ module.exports = FindClosestInSorted; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(324); +var RoundAwayFromZero = __webpack_require__(323); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -121840,7 +122232,7 @@ module.exports = NumberArrayStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SpliceOne = __webpack_require__(361); +var SpliceOne = __webpack_require__(360); /** * Removes a random object from the given array and returns it. @@ -121891,10 +122283,10 @@ module.exports = { GetMinMaxValue: __webpack_require__(923), GetValue: __webpack_require__(4), HasAll: __webpack_require__(924), - HasAny: __webpack_require__(287), + HasAny: __webpack_require__(286), HasValue: __webpack_require__(72), - IsPlainObject: __webpack_require__(164), - Merge: __webpack_require__(103), + IsPlainObject: __webpack_require__(165), + Merge: __webpack_require__(104), MergeRight: __webpack_require__(925) }; @@ -122036,7 +122428,7 @@ module.exports = MergeRight; module.exports = { Format: __webpack_require__(927), - Pad: __webpack_require__(194), + Pad: __webpack_require__(195), Reverse: __webpack_require__(928), UppercaseFirst: __webpack_require__(251) @@ -122120,9 +122512,9 @@ module.exports = ReverseString; */ var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(338); +var COLLIDES = __webpack_require__(337); var GetVelocity = __webpack_require__(950); -var TYPE = __webpack_require__(339); +var TYPE = __webpack_require__(338); var UpdateMotion = __webpack_require__(951); /** @@ -122687,6 +123079,8 @@ var Body = new Class({ */ destroy: function () { + this.world.remove(this); + this.enabled = false; this.world = null; @@ -123514,7 +123908,7 @@ module.exports = ImpactImage; var Class = __webpack_require__(0); var Components = __webpack_require__(847); -var Sprite = __webpack_require__(37); +var Sprite = __webpack_require__(38); /** * @classdesc @@ -123677,7 +124071,7 @@ module.exports = ImpactSprite; var Body = __webpack_require__(929); var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(338); +var COLLIDES = __webpack_require__(337); var CollisionMap = __webpack_require__(930); var EventEmitter = __webpack_require__(13); var GetFastValue = __webpack_require__(1); @@ -123685,7 +124079,7 @@ var HasValue = __webpack_require__(72); var Set = __webpack_require__(61); var Solver = __webpack_require__(966); var TILEMAP_FORMATS = __webpack_require__(19); -var TYPE = __webpack_require__(339); +var TYPE = __webpack_require__(338); /** * @classdesc @@ -124666,10 +125060,10 @@ module.exports = World; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(92); +var Bodies = __webpack_require__(93); var Class = __webpack_require__(0); var Composites = __webpack_require__(938); -var Constraint = __webpack_require__(162); +var Constraint = __webpack_require__(163); var MatterImage = __webpack_require__(939); var MatterSprite = __webpack_require__(940); var MatterTileBody = __webpack_require__(850); @@ -125877,11 +126271,11 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(148); -var Constraint = __webpack_require__(162); +var Composite = __webpack_require__(149); +var Constraint = __webpack_require__(163); var Common = __webpack_require__(39); var Body = __webpack_require__(59); -var Bodies = __webpack_require__(92); +var Bodies = __webpack_require__(93); (function() { @@ -126203,13 +126597,13 @@ var Bodies = __webpack_require__(92); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(92); +var Bodies = __webpack_require__(93); var Class = __webpack_require__(0); var Components = __webpack_require__(849); var GameObject = __webpack_require__(2); var GetFastValue = __webpack_require__(1); var Image = __webpack_require__(70); -var Pipeline = __webpack_require__(183); +var Pipeline = __webpack_require__(184); var Vector2 = __webpack_require__(6); /** @@ -126333,14 +126727,14 @@ module.exports = MatterImage; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AnimationComponent = __webpack_require__(362); -var Bodies = __webpack_require__(92); +var AnimationComponent = __webpack_require__(361); +var Bodies = __webpack_require__(93); var Class = __webpack_require__(0); var Components = __webpack_require__(849); var GameObject = __webpack_require__(2); var GetFastValue = __webpack_require__(1); -var Pipeline = __webpack_require__(183); -var Sprite = __webpack_require__(37); +var Pipeline = __webpack_require__(184); +var Sprite = __webpack_require__(38); var Vector2 = __webpack_require__(6); /** @@ -126566,7 +126960,7 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(363); +var Pair = __webpack_require__(362); var Detector = __webpack_require__(851); var Common = __webpack_require__(39); @@ -126893,7 +127287,7 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(363); +var Pair = __webpack_require__(362); var Common = __webpack_require__(39); (function() { @@ -127058,10 +127452,10 @@ var Resolver = {}; module.exports = Resolver; -var Vertices = __webpack_require__(93); -var Vector = __webpack_require__(94); +var Vertices = __webpack_require__(94); +var Vector = __webpack_require__(95); var Common = __webpack_require__(39); -var Bounds = __webpack_require__(95); +var Bounds = __webpack_require__(96); (function() { @@ -127420,14 +127814,14 @@ var Engine = {}; module.exports = Engine; var World = __webpack_require__(855); -var Sleeping = __webpack_require__(340); +var Sleeping = __webpack_require__(339); var Resolver = __webpack_require__(944); var Pairs = __webpack_require__(943); var Metrics = __webpack_require__(984); var Grid = __webpack_require__(942); -var Events = __webpack_require__(161); -var Composite = __webpack_require__(148); -var Constraint = __webpack_require__(162); +var Events = __webpack_require__(162); +var Composite = __webpack_require__(149); +var Constraint = __webpack_require__(163); var Common = __webpack_require__(39); var Body = __webpack_require__(59); @@ -127928,15 +128322,15 @@ var Body = __webpack_require__(59); // Phaser.Physics.Matter.World -var Bodies = __webpack_require__(92); +var Bodies = __webpack_require__(93); var Class = __webpack_require__(0); -var Composite = __webpack_require__(148); +var Composite = __webpack_require__(149); var Engine = __webpack_require__(945); var EventEmitter = __webpack_require__(13); var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(4); var MatterBody = __webpack_require__(59); -var MatterEvents = __webpack_require__(161); +var MatterEvents = __webpack_require__(162); var MatterWorld = __webpack_require__(855); var MatterTileBody = __webpack_require__(850); @@ -128632,7 +129026,7 @@ module.exports = World; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(364); +__webpack_require__(363); var CONST = __webpack_require__(22); var Extend = __webpack_require__(23); @@ -128643,20 +129037,20 @@ var Extend = __webpack_require__(23); var Phaser = { - Actions: __webpack_require__(165), - Animation: __webpack_require__(435), - Cache: __webpack_require__(436), - Cameras: __webpack_require__(437), + Actions: __webpack_require__(166), + Animation: __webpack_require__(434), + Cache: __webpack_require__(435), + Cameras: __webpack_require__(436), Class: __webpack_require__(0), - Create: __webpack_require__(448), - Curves: __webpack_require__(454), - Data: __webpack_require__(457), - Display: __webpack_require__(459), - DOM: __webpack_require__(492), - EventEmitter: __webpack_require__(494), - Game: __webpack_require__(495), - GameObjects: __webpack_require__(540), - Geom: __webpack_require__(293), + Create: __webpack_require__(447), + Curves: __webpack_require__(453), + Data: __webpack_require__(456), + Display: __webpack_require__(458), + DOM: __webpack_require__(491), + EventEmitter: __webpack_require__(493), + Game: __webpack_require__(494), + GameObjects: __webpack_require__(539), + Geom: __webpack_require__(292), Input: __webpack_require__(749), Loader: __webpack_require__(763), Math: __webpack_require__(781), @@ -128689,7 +129083,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(163))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) /***/ }), /* 948 */ @@ -128743,14 +129137,14 @@ module.exports = { module.exports = { Body: __webpack_require__(929), - COLLIDES: __webpack_require__(338), + COLLIDES: __webpack_require__(337), CollisionMap: __webpack_require__(930), Factory: __webpack_require__(931), Image: __webpack_require__(933), ImpactBody: __webpack_require__(932), ImpactPhysics: __webpack_require__(965), Sprite: __webpack_require__(934), - TYPE: __webpack_require__(339), + TYPE: __webpack_require__(338), World: __webpack_require__(935) }; @@ -129137,7 +129531,7 @@ module.exports = BodyScale; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TYPE = __webpack_require__(339); +var TYPE = __webpack_require__(338); /** * [description] @@ -129298,7 +129692,7 @@ module.exports = Bounce; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TYPE = __webpack_require__(339); +var TYPE = __webpack_require__(338); /** * [description] @@ -129419,7 +129813,7 @@ module.exports = CheckAgainst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var COLLIDES = __webpack_require__(338); +var COLLIDES = __webpack_require__(337); /** * [description] @@ -130053,7 +130447,7 @@ module.exports = Velocity; var Class = __webpack_require__(0); var Factory = __webpack_require__(931); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(103); +var Merge = __webpack_require__(104); var PluginManager = __webpack_require__(11); var World = __webpack_require__(935); @@ -130229,7 +130623,7 @@ module.exports = ImpactPhysics; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var COLLIDES = __webpack_require__(338); +var COLLIDES = __webpack_require__(337); var SeperateX = __webpack_require__(967); var SeperateY = __webpack_require__(968); @@ -131040,7 +131434,7 @@ module.exports = Sensor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(92); +var Bodies = __webpack_require__(93); var Body = __webpack_require__(59); var GetFastValue = __webpack_require__(1); @@ -131148,6 +131542,14 @@ var SetBody = { this.body = body; this.body.gameObject = this; + var _this = this; + + this.body.destroy = function () + { + _this.world.remove(_this.body); + _this.body.gameObject = null; + }; + if (addToWorld) { this.world.add(this.body); @@ -131251,7 +131653,7 @@ module.exports = SetBody; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MatterEvents = __webpack_require__(161); +var MatterEvents = __webpack_require__(162); /** * [description] @@ -131372,8 +131774,8 @@ module.exports = Sleep; var Body = __webpack_require__(59); var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(159); -var WrapAngleDegrees = __webpack_require__(160); +var WrapAngle = __webpack_require__(160); +var WrapAngleDegrees = __webpack_require__(161); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -131762,16 +132164,16 @@ module.exports = Velocity; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bounds = __webpack_require__(95); +var Bounds = __webpack_require__(96); var Class = __webpack_require__(0); -var Composite = __webpack_require__(148); -var Constraint = __webpack_require__(162); +var Composite = __webpack_require__(149); +var Constraint = __webpack_require__(163); var Detector = __webpack_require__(851); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(103); -var Sleeping = __webpack_require__(340); +var Merge = __webpack_require__(104); +var Sleeping = __webpack_require__(339); var Vector2 = __webpack_require__(6); -var Vertices = __webpack_require__(93); +var Vertices = __webpack_require__(94); /** * @classdesc @@ -132059,11 +132461,11 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(94); +var Vector = __webpack_require__(95); var SAT = __webpack_require__(852); -var Bounds = __webpack_require__(95); -var Bodies = __webpack_require__(92); -var Vertices = __webpack_require__(93); +var Bounds = __webpack_require__(96); +var Bodies = __webpack_require__(93); +var Vertices = __webpack_require__(94); (function() { @@ -132175,7 +132577,7 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(148); +var Composite = __webpack_require__(149); var Common = __webpack_require__(39); (function() { @@ -132278,7 +132680,7 @@ var Svg = {}; module.exports = Svg; -var Bounds = __webpack_require__(95); +var Bounds = __webpack_require__(96); (function() { @@ -132502,7 +132904,7 @@ var GetValue = __webpack_require__(4); var MatterAttractors = __webpack_require__(987); var MatterLib = __webpack_require__(941); var MatterWrap = __webpack_require__(988); -var Merge = __webpack_require__(103); +var Merge = __webpack_require__(104); var Plugin = __webpack_require__(854); var PluginManager = __webpack_require__(11); var World = __webpack_require__(946); diff --git a/dist/phaser.min.js b/dist/phaser.min.js index cbc3e2116..91c8050cc 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()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=947)}([function(t,e){function i(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){var o=(u=e,c=r,f=void 0,p=void 0,p=(d=i)?u[c]:Object.getOwnPropertyDescriptor(u,c),!d&&p.value&&"object"==typeof p.value&&(p=p.value),!!(p&&(f=p,f.get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===p.enumerable&&(p.enumerable=!0),void 0===p.configurable&&(p.configurable=!0),p));if(!1!==o){if(a=(n||t).prototype,h=r,l=void 0,(l=Object.getOwnPropertyDescriptor(a,h))&&(l.value&&"object"==typeof l.value&&(l=l.value),!1===l.configurable)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var a,h,l,u,c,d,f,p}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(181),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d>>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){for(var e=0,i=0;i0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return t instanceof HTMLElement},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*g+x)*b,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(308),o=i(309),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,i,r,o){o=o||t.position;for(var a=0;a0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.values.forEach(function(t){e.add(t)}),this.entries.forEach(function(t){e.add(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.add(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.add(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(178),o=i(179),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(120),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(493))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(165),s=i(0),r=i(1),o=i(4),a=i(273),h=i(61),l=i(37),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(37),o=i(6),a=i(118),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=i(0),s=i(38),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes)},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(t,e){return this},onPostRender:function(){return this},flush:function(){var t=this.gl,e=this.vertexCount,i=(this.vertexBuffer,this.vertexData,this.topology),n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration,config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0):(console.error("addMarker - Marker has to have a valid name!"),!1):(console.error("addMarker - Marker object has to be provided!"),!1)},updateMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1):(console.error("updateMarker - Marker has to have a valid name!"),!1):(console.error("updateMarker - Marker object has to be provided!"),!1)},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):(console.error("removeMarker - Marker with name '"+e.name+"' does not exist for sound '"+this.key+"'!"),null)},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(645),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(327),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(39),o=i(59),a=i(95),h=i(94),l=i(937);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(39);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){t.exports={CalculateFacesAt:i(149),CalculateFacesWithin:i(34),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(97),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(342),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(150),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(343),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(341),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(98),TileToWorldXY:i(889),TileToWorldY:i(99),WeightedRandomize:i(890),WorldToTileX:i(40),WorldToTileXY:i(891),WorldToTileY:i(41)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(84),r=i(526),o=i(527),a=i(231),h=i(252),l=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=l},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(266),a=i(542),h=i(543),l=i(544),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(547),s=i(550),r=i(0),o=i(12),a=i(264),h=i(128),l=i(2),u=new r({Extends:l,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){l.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new a,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof h||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=u},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(266),a=i(551),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(0),s=i(125),r=i(12),o=i(268),a=i(2),h=i(4),l=i(16),u=i(563),c=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Pipeline,r.Transform,r.Visible,r.ScrollFactor,u],initialize:function(t,e){var i=h(e,"x",0),n=h(e,"y",0);a.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return h(t,"lineStyle",null)&&(this.defaultStrokeWidth=h(t,"lineStyle.width",1),this.defaultStrokeColor=h(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(t,"fillStyle",null)&&(this.defaultFillColor=h(t,"fillStyle.color",16777215),this.defaultFillAlpha=h(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(s.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(s.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(s.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(s.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(s.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(s.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(s.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(s.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.FILL_TRIANGLE,t,e,i,n,r,o),this},strokeTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.STROKE_TRIANGLE,t,e,i,n,r,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(s.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(s.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(s.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(s.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),c.TargetCamera.setViewport(0,0,e,i),c.TargetCamera.scrollX=this.x,c.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,c.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});t.exports=c},function(t,e,i){var n=i(0),s=i(68),r=i(269),o=i(270),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(568),a=i(129),h=i(569),l=i(608),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h]+" ")}r0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(l[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(l[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(289),h=i(617),l=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){var u=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=u,this.setTexture(h,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT,gl.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,b=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this.emit("pause",this),this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.manager.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this.emit("resume",this),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration)r=1,o=s.duration;else if(n>s.delay&&n<=s.t1)r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r;else if(n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)}s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(39);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(374),Call:i(375),GetFirst:i(376),GridAlign:i(377),IncAlpha:i(394),IncX:i(395),IncXY:i(396),IncY:i(397),PlaceOnCircle:i(398),PlaceOnEllipse:i(399),PlaceOnLine:i(400),PlaceOnRectangle:i(401),PlaceOnTriangle:i(402),PlayAnimation:i(403),RandomCircle:i(404),RandomEllipse:i(405),RandomLine:i(406),RandomRectangle:i(407),RandomTriangle:i(408),Rotate:i(409),RotateAround:i(410),RotateAroundDistance:i(411),ScaleX:i(412),ScaleXY:i(413),ScaleY:i(414),SetAlpha:i(415),SetBlendMode:i(416),SetDepth:i(417),SetHitArea:i(418),SetOrigin:i(419),SetRotation:i(420),SetScale:i(421),SetScaleX:i(422),SetScaleY:i(423),SetTint:i(424),SetVisible:i(425),SetX:i(426),SetXY:i(427),SetY:i(428),ShiftPosition:i(429),Shuffle:i(430),SmootherStep:i(431),SmoothStep:i(432),Spread:i(433),ToggleVisible:i(434)}},function(t,e,i){var n=i(167),s=[];s[n.BOTTOM_CENTER]=i(168),s[n.BOTTOM_LEFT]=i(169),s[n.BOTTOM_RIGHT]=i(170),s[n.CENTER]=i(171),s[n.LEFT_CENTER]=i(173),s[n.RIGHT_CENTER]=i(174),s[n.TOP_CENTER]=i(175),s[n.TOP_LEFT]=i(176),s[n.TOP_RIGHT]=i(177);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(47),r=i(25),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(172),s=i(47),r=i(50);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(48),s=i(49);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(50),s=i(26),r=i(49),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(50),s=i(28),r=i(49),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(47),s=i(30),r=i(48),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(180),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=l[0],l[0].prevFrame=o;var v=1/(l.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(191),s=i(0),r=i(113),o=i(13),a=i(4),h=i(194),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(195),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e-y||T>-m||w-y||A>-m||S-y||T>-m||w-y||A>-m||S-v&&A*n+C*r+h>-y&&(A+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],l=n[4],u=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*u-a*l)*c,y=(r*l-s*u)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),b=this.zoom,w=this.scrollX,T=this.scrollY,S=t+(w*m-T*x)*b,A=e+(w*x+T*m)*b;return i.x=S*d+A*p+v,i.y=S*f+A*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;eu&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom)}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=l},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e,i){var n=i(36),s=i(201);t.exports=function(t){var e=s(t);return new n(e.r,e.g,e.b,e.a)}},function(t,e){t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(117),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,w=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,_=c*m-p*g,E=d*y-f*v,P=d*m-p*v,L=f*m-p*y,k=x*L-b*P+w*E+T*_-S*M+A*C;return k?(k=1/k,i[0]=(h*L-l*P+u*E)*k,i[1]=(l*_-a*L-u*M)*k,i[2]=(a*P-h*_+u*C)*k,i[3]=(r*P-s*L-o*E)*k,i[4]=(n*L-r*_+o*M)*k,i[5]=(s*_-n*P-o*C)*k,i[6]=(v*A-y*S+m*T)*k,i[7]=(y*w-g*A-m*b)*k,i[8]=(g*S-v*w+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(116),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(116),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(483)(t))},function(t,e,i){var n=i(115);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l={r:i=Math.floor(i*=255),g:i,b:i,color:0},u=s%6;return 0===u?(l.g=h,l.b=o):1===u?(l.r=a,l.b=o):2===u?(l.r=o,l.b=h):3===u?(l.r=o,l.g=a):4===u?(l.r=h,l.g=o):5===u&&(l.g=o,l.b=a),l.color=n(l.r,l.g,l.b),l}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=w(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h,l,u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&(l=c,(h=u).next.i!==l.i&&h.prev.i!==l.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,l)&&x(h,l)&&x(l,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,l))){var d=b(u,c);return u=r(u,u.next),d=r(d,d.next),o(u,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}u=u.next}while(u!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function w(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix;let r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(511),r=i(236),o=(i(38),i(83),new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;for(var n=this.renderer,s=this.program,r=t.lights.cull(e),o=Math.min(r.length,10),a=e.matrix,h={x:0,y:0},l=n.height,u=0;u<10;++u)n.setFloat1(s,"uLights["+u+"].radius",0);if(o<=0)return this;n.setFloat4(s,"uCamera",e.x,e.y,e.rotation,e.zoom),n.setFloat3(s,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b);for(u=0;u0){var i=this.vertexBuffer,n=this.gl,s=this.renderer,r=t.tileset.image.get();s.currentPipeline&&s.currentPipeline.vertexCount>0&&s.flush(),this.vertexBuffer=t.vertexBuffer,s.setTexture2D(r.source.glTexture,0),s.setPipeline(this),n.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=i}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=(a.getTintAppendFloatAlpha,this.vertexViewF32),r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,l=o.config.resolution,u=this.maxQuads,c=e.scrollX,d=e.scrollY,f=e.matrix.matrix,p=f[0],g=f[1],v=f[2],y=f[3],m=f[4],x=f[5],b=Math.sin,w=Math.cos,T=this.vertexComponentCount,S=this.vertexCapacity;o.setTexture2D(t.defaultFrame.source.glTexture,0);for(var A=0;A0&&this.flush();for(var F=0;F=S&&this.flush()}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=this.renderer,o=e.roundPixels,h=r.config.resolution,l=t.getRenderList(),u=l.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,b=Math.ceil(u/this.maxQuads),w=0,T=t.x-m,S=t.y-x,A=0;Athis.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,l=o.config.resolution,u=e.matrix.matrix,c=t.frame,d=c.texture.source[c.sourceIndex].glTexture,f=!!d.isRenderTexture,p=t.flipX,g=t.flipY^f,v=c.uvs,y=c.width*(p?-1:1),m=c.height*(g?-1:1),x=-t.displayOriginX+c.x+c.width*(p?1:0),b=-t.displayOriginY+c.y+c.height*(g?1:0),w=x+y,T=b+m,S=t.x-e.scrollX*t.scrollFactorX,A=t.y-e.scrollY*t.scrollFactorY,C=t.scaleX,M=t.scaleY,_=-t.rotation,E=t._alphaTL,P=t._alphaTR,L=t._alphaBL,k=t._alphaBR,F=t._tintTL,R=t._tintTR,O=t._tintBL,B=t._tintBR,I=Math.sin(_),D=Math.cos(_),Y=D*C,z=-I*C,X=I*M,N=D*M,V=S,W=A,G=u[0],U=u[1],j=u[2],H=u[3],q=Y*G+z*j,K=Y*U+z*H,J=X*G+N*j,Z=X*U+N*H,Q=V*G+W*j+u[4],$=V*U+W*H+u[5],tt=x*q+b*J+Q,et=x*K+b*Z+$,it=x*q+T*J+Q,nt=x*K+T*Z+$,st=w*q+T*J+Q,rt=w*K+T*Z+$,ot=w*q+b*J+Q,at=w*K+b*Z+$,ht=n(F,E),lt=n(R,P),ut=n(O,L),ct=n(B,k);o.setTexture2D(d,0),i=this.vertexCount*this.vertexComponentCount,h&&(tt=(tt*l|0)/l,et=(et*l|0)/l,it=(it*l|0)/l,nt=(nt*l|0)/l,st=(st*l|0)/l,rt=(rt*l|0)/l,ot=(ot*l|0)/l,at=(at*l|0)/l),s[i+0]=tt,s[i+1]=et,s[i+2]=v.x0,s[i+3]=v.y0,r[i+4]=ht,s[i+5]=it,s[i+6]=nt,s[i+7]=v.x1,s[i+8]=v.y1,r[i+9]=lt,s[i+10]=st,s[i+11]=rt,s[i+12]=v.x2,s[i+13]=v.y2,r[i+14]=ut,s[i+15]=tt,s[i+16]=et,s[i+17]=v.x0,s[i+18]=v.y0,r[i+19]=ht,s[i+20]=st,s[i+21]=rt,s[i+22]=v.x2,s[i+23]=v.y2,r[i+24]=ut,s[i+25]=ot,s[i+26]=at,s[i+27]=v.x3,s[i+28]=v.y3,r[i+29]=ct,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,l=t.alphas,u=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=e.roundPixels,p=d.config.resolution,g=e.matrix.matrix,v=(g[0],g[1],g[2],g[3],g[4],g[5],t.frame),y=t.texture.source[v.sourceIndex].glTexture,m=t.x-e.scrollX*t.scrollFactorX,x=t.y-e.scrollY*t.scrollFactorY,b=t.scaleX,w=t.scaleY,T=-t.rotation,S=Math.sin(T),A=Math.cos(T),C=A*b,M=-S*b,_=S*w,E=A*w,P=m,L=x,k=g[0],F=g[1],R=g[2],O=g[3],B=C*k+M*R,I=C*F+M*O,D=_*k+E*R,Y=_*F+E*O,z=P*k+L*R+g[4],X=P*F+L*O+g[5],N=0;d.setTexture2D(y,0),N=this.vertexCount*this.vertexComponentCount;for(var V=0,W=0;Vthis.vertexCapacity&&this.flush();var i=t.text,n=i.length,s=a.getTintAppendFloatAlpha,r=this.vertexViewF32,o=this.vertexViewU32,h=this.renderer,l=e.roundPixels,u=h.config.resolution,c=e.matrix.matrix,d=e.width+50,f=e.height+50,p=t.frame,g=t.texture.source[p.sourceIndex],v=e.scrollX*t.scrollFactorX,y=e.scrollY*t.scrollFactorY,m=t.fontData,x=m.lineHeight,b=t.fontSize/m.size,w=m.chars,T=t.alpha,S=s(t._tintTL,T),A=s(t._tintTR,T),C=s(t._tintBL,T),M=s(t._tintBR,T),_=t.x,E=t.y,P=p.cutX,L=p.cutY,k=g.width,F=g.height,R=g.glTexture,O=0,B=0,I=0,D=0,Y=null,z=0,X=0,N=0,V=0,W=0,G=0,U=0,j=0,H=0,q=0,K=0,J=0,Z=null,Q=0,$=_-v+p.x,tt=E-y+p.y,et=-t.rotation,it=t.scaleX,nt=t.scaleY,st=Math.sin(et),rt=Math.cos(et),ot=rt*it,at=-st*it,ht=st*nt,lt=rt*nt,ut=$,ct=tt,dt=c[0],ft=c[1],pt=c[2],gt=c[3],vt=ot*dt+at*pt,yt=ot*ft+at*gt,mt=ht*dt+lt*pt,xt=ht*ft+lt*gt,bt=ut*dt+ct*pt+c[4],wt=ut*ft+ct*gt+c[5],Tt=0;h.setTexture2D(R,0);for(var St=0;Std||ty0<-50||ty0>f)&&(tx1<-50||tx1>d||ty1<-50||ty1>f)&&(tx2<-50||tx2>d||ty2<-50||ty2>f)&&(tx3<-50||tx3>d||ty3<-50||ty3>f)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Tt=this.vertexCount*this.vertexComponentCount,l&&(tx0=(tx0*u|0)/u,ty0=(ty0*u|0)/u,tx1=(tx1*u|0)/u,ty1=(ty1*u|0)/u,tx2=(tx2*u|0)/u,ty2=(ty2*u|0)/u,tx3=(tx3*u|0)/u,ty3=(ty3*u|0)/u),r[Tt+0]=tx0,r[Tt+1]=ty0,r[Tt+2]=H,r[Tt+3]=K,o[Tt+4]=S,r[Tt+5]=tx1,r[Tt+6]=ty1,r[Tt+7]=H,r[Tt+8]=J,o[Tt+9]=A,r[Tt+10]=tx2,r[Tt+11]=ty2,r[Tt+12]=q,r[Tt+13]=J,o[Tt+14]=C,r[Tt+15]=tx0,r[Tt+16]=ty0,r[Tt+17]=H,r[Tt+18]=K,o[Tt+19]=S,r[Tt+20]=tx2,r[Tt+21]=ty2,r[Tt+22]=q,r[Tt+23]=J,o[Tt+24]=C,r[Tt+25]=tx3,r[Tt+26]=ty3,r[Tt+27]=q,r[Tt+28]=K,o[Tt+29]=M,this.vertexCount+=6))}}else O=0,I=0,B+=x,Z=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,l=t.displayCallback,u=t.text,c=u.length,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=this.renderer,v=e.roundPixels,y=g.config.resolution,m=e.matrix.matrix,x=t.frame,b=t.texture.source[x.sourceIndex],w=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,S=t.scrollX,A=t.scrollY,C=t.fontData,M=C.lineHeight,_=t.fontSize/C.size,E=C.chars,P=t.alpha,L=d(t._tintTL,P),k=d(t._tintTR,P),F=d(t._tintBL,P),R=d(t._tintBR,P),O=t.x,B=t.y,I=x.cutX,D=x.cutY,Y=b.width,z=b.height,X=b.glTexture,N=0,V=0,W=0,G=0,U=null,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=null,rt=0,ot=O+x.x,at=B+x.y,ht=-t.rotation,lt=t.scaleX,ut=t.scaleY,ct=Math.sin(ht),dt=Math.cos(ht),ft=dt*lt,pt=-ct*lt,gt=ct*ut,vt=dt*ut,yt=ot,mt=at,xt=m[0],bt=m[1],wt=m[2],Tt=m[3],St=ft*xt+pt*wt,At=ft*bt+pt*Tt,Ct=gt*xt+vt*wt,Mt=gt*bt+vt*Tt,_t=yt*xt+mt*wt+m[4],Et=yt*bt+mt*Tt+m[5],Pt=t.cropWidth>0||t.cropHeight>0,Lt=0;g.setTexture2D(X,0),Pt&&g.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var kt=0;ktthis.vertexCapacity&&this.flush(),Lt=this.vertexCount*this.vertexComponentCount,v&&(tx0=(tx0*y|0)/y,ty0=(ty0*y|0)/y,tx1=(tx1*y|0)/y,ty1=(ty1*y|0)/y,tx2=(tx2*y|0)/y,ty2=(ty2*y|0)/y,tx3=(tx3*y|0)/y,ty3=(ty3*y|0)/y),f[Lt+0]=tx0,f[Lt+1]=ty0,f[Lt+2]=tt,f[Lt+3]=it,p[Lt+4]=L,f[Lt+5]=tx1,f[Lt+6]=ty1,f[Lt+7]=tt,f[Lt+8]=nt,p[Lt+9]=k,f[Lt+10]=tx2,f[Lt+11]=ty2,f[Lt+12]=et,f[Lt+13]=nt,p[Lt+14]=F,f[Lt+15]=tx0,f[Lt+16]=ty0,f[Lt+17]=tt,f[Lt+18]=it,p[Lt+19]=L,f[Lt+20]=tx2,f[Lt+21]=ty2,f[Lt+22]=et,f[Lt+23]=nt,p[Lt+24]=F,f[Lt+25]=tx3,f[Lt+26]=ty3,f[Lt+27]=et,f[Lt+28]=it,p[Lt+29]=R,this.vertexCount+=6}}}else N=0,W=0,V+=M,st=null;Pt&&g.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,l=t.alpha,u=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),f^=e.isRenderTexture?1:0,c=-c;a.getTintAppendFloatAlpha;var P,L=this.vertexViewF32,k=this.vertexViewU32,F=this.renderer,R=E.roundPixels,O=F.config.resolution,B=E.matrix.matrix,I=o*(d?1:0)-v,D=h*(f?1:0)-y,Y=I+o*(d?-1:1),z=D+h*(f?-1:1),X=s-E.scrollX*p,N=r-E.scrollY*g,V=Math.sin(c),W=Math.cos(c),G=W*l,U=-V*l,j=V*u,H=W*u,q=X,K=N,J=B[0],Z=B[1],Q=B[2],$=B[3],tt=G*J+U*Q,et=G*Z+U*$,it=j*J+H*Q,nt=j*Z+H*$,st=q*J+K*Q+B[4],rt=q*Z+K*$+B[5],ot=I*tt+D*it+st,at=I*et+D*nt+rt,ht=I*tt+z*it+st,lt=I*et+z*nt+rt,ut=Y*tt+z*it+st,ct=Y*et+z*nt+rt,dt=Y*tt+D*it+st,ft=Y*et+D*nt+rt,pt=m/i+M,gt=x/n+_,vt=(m+b)/i+M,yt=(x+w)/n+_;F.setTexture2D(e,0),P=this.vertexCount*this.vertexComponentCount,R&&(ot=(ot*O|0)/O,at=(at*O|0)/O,ht=(ht*O|0)/O,lt=(lt*O|0)/O,ut=(ut*O|0)/O,ct=(ct*O|0)/O,dt=(dt*O|0)/O,ft=(ft*O|0)/O),L[P+0]=ot,L[P+1]=at,L[P+2]=pt,L[P+3]=gt,k[P+4]=T,L[P+5]=ht,L[P+6]=lt,L[P+7]=pt,L[P+8]=yt,k[P+9]=S,L[P+10]=ut,L[P+11]=ct,L[P+12]=vt,L[P+13]=yt,k[P+14]=A,L[P+15]=ot,L[P+16]=at,L[P+17]=pt,L[P+18]=gt,k[P+19]=T,L[P+20]=ut,L[P+21]=ct,L[P+22]=vt,L[P+23]=yt,k[P+24]=A,L[P+25]=dt,L[P+26]=ft,L[P+27]=vt,L[P+28]=gt,k[P+29]=C,this.vertexCount+=6},batchGraphics:function(t,e){}});t.exports=l},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),l=i(8),u=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new u(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new l,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=0;u0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(126),a=i(244),h=i(523),l=i(524),u=i(525),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(127),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(84),s=i(4),r=i(528),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(){return!1},playAudioSprite:function(){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(86),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(){return!1},updateMarker:function(){return!1},removeMarker:function(){return null},play:function(){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(85),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){s.prototype.destroy.call(this),this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.context.suspend(),this.context=null}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(86),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var S=y+g-s,A=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,u=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,b=0,w=1,T=0,S=0,A=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(u-h,c-l),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,S=(65280&x)>>>8,A=255&x,v.strokeStyle="rgba("+T+","+S+","+A+","+y+")",v.lineWidth=w,C+=3;break;case n.FILL_STYLE:b=g[C+1],m=g[C+2],T=(16711680&b)>>>16,S=(65280&b)>>>8,A=255&b,v.fillStyle="rgba("+T+","+S+","+A+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+_)}}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(38),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(291),r=i(235),o=i(38),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(653),Ellipse:i(268),Intersects:i(294),Line:i(673),Point:i(691),Polygon:i(705),Rectangle:i(306),Triangle:i(734)}},function(t,e,i){t.exports={CircleToCircle:i(663),CircleToRectangle:i(664),GetRectangleIntersection:i(665),LineToCircle:i(296),LineToLine:i(89),LineToRectangle:i(666),PointToLine:i(297),PointToLineSegment:i(667),RectangleToRectangle:i(295),RectangleToTriangle:i(668),RectangleToValues:i(669),TriangleToCircle:i(670),TriangleToLine:i(671),TriangleToTriangle:i(672)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(301),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(42),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(143),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(147);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(316),l=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});l.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return console.info("Skipping loading audio '"+e+"' since sounds are disabled."),null;var u=l.findAudioURL(r,i);return u?!a.webAudio||o&&o.disableWebAudio?new h(e,u,t.path,n,r.sound.locked):new l(e,u,t.path,s,r.sound.context):(console.warn("No supported url provided for audio '"+e+"'!"),null)},o.register("audio",function(t,e,i,n){var s=l.create(this,t,e,i,n);return s&&this.addFile(s),this}),l.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(322);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(326),s=i(91),r=i(0),o=i(58),a=i(328),h=i(329),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=l},function(t,e,i){var n=i(0),s=i(327),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(825),Angular:i(826),Bounce:i(827),Debug:i(828),Drag:i(829),Enable:i(830),Friction:i(831),Gravity:i(832),Immovable:i(833),Mass:i(834),Size:i(835),Velocity:i(836)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(u.x,u.y,l.right,l.y)-u.radius):u.y>l.bottom&&(u.xl.right&&(a=h(u.x,u.y,l.right,l.bottom)-u.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,f=t.mass,p=e.velocity.x,g=e.velocity.y,v=e.mass,y=c*Math.cos(o)+d*Math.sin(o),m=c*Math.sin(o)-d*Math.cos(o),x=p*Math.cos(o)+g*Math.sin(o),b=p*Math.sin(o)-g*Math.cos(o),w=((f-v)*y+2*v*x)/(f+v),T=(2*f*y+(v-f)*x)/(f+v);return t.immovable||(t.velocity.x=(w*Math.cos(o)-m*Math.sin(o))*t.bounce.x,t.velocity.y=(m*Math.cos(o)+w*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(T*Math.cos(o)-b*Math.sin(o))*e.bounce.x,e.velocity.y=(b*Math.cos(o)+T*Math.sin(o))*e.bounce.y,p=e.velocity.x,g=e.velocity.y),Math.abs(o)0&&!t.immovable&&p>c?t.velocity.x*=-1:p<0&&!e.immovable&&c0&&!t.immovable&&g>d?t.velocity.y*=-1:g<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&p0&&!e.immovable&&c>p?e.velocity.x*=-1:d<0&&!t.immovable&&g0&&!e.immovable&&c>g&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){if(0!==e.length){var o=t.body,h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,l+=f}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p,v=e.getTilesWithinWorldXY(a,h,l,u);if(0===v.length)return!1;for(var y={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;this.position.x=t-i.displayOriginX+i.scaleX*this.offset.x,this.position.y=e-i.displayOriginY+i.scaleY*this.offset.y,this.prev.x=this.position.x,this.prev.y=this.position.y,this.rotation=this.gameObject.angle,this.preRotation=this.rotation,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.gameObject.body=null,this.gameObject=null},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(8),a=i(33),h=i(6),l=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new h,this.position=new h(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.width,this.height=e.height,this.sourceWidth=e.width,this.sourceHeight=e.height,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(e.width/2),this.halfHeight=Math.abs(e.height/2),this.center=new h(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=new h,this.allowGravity=!1,this.gravity=new h,this.bounce=new h,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.moves=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._bounds=new o},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.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.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),this.position.x=t-i.displayOriginX+i.scaleX*this.offset.x,this.position.y=e-i.displayOriginY+i.scaleY*this.offset.y,this.rotation=this.gameObject.angle,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.gameObject.body=null,this.gameObject=null},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t,this.world.staticTree.remove(this),this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t,this.world.staticTree.remove(this),this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(161);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(45),s=i(74),r=i(149);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(152),r=i(345),o=i(346),a=i(351);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(152);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),l=i(899),u=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(35),r=i(353),o=i(23),a=i(19),h=i(75),l=i(323),u=i(354),c=i(45),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[l])return this.tilesets[l].setTileSize(i,n),this.tilesets[l].setSpacing(s,r),this.tilesets[l].setImage(h),this.tilesets[l];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var u=new f(t,o,i,n,s,r);return u.setImage(h),this.tilesets.push(u),u},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(156),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),l=i(155),u=i(157),c=i(158);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),S=[],A=l("value",f),C=c(p[0],"value",A.getEnd,A.getStart,m,g,v,T,x,b,w,!1,!1);C.start=d,C.current=d,C.to=f,S.push(C);var M=new u(t,S,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var _=h(e,"callbackScope",M),E=[M,null],P=u.TYPES,L=0;L0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(182),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(159),r=i(160),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(197),CameraManager:i(442)}},function(t,e,i){var n=i(197),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(46),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(124),o=i(38),a=i(504),h=i(505),l=i(508),u=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null};for(var n=0;n<=16;n++)this.blendModes.push({func:[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],equation:WebGLRenderingContext.FUNC_ADD});this.blendModes[1].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.DST_ALPHA],this.blendModes[2].func=[WebGLRenderingContext.DST_COLOR,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_COLOR],this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=void 0===l||null===l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this},deleteFramebuffer:function(t){return this},deleteProgram:function(t){return this},deleteBuffer:function(t){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){this.gl;var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;lthis.vertexCapacity&&this.flush();var b=this.renderer.config.resolution,w=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=r+a,C=o+h,M=m[0],_=m[1],E=m[2],P=m[3],L=d*M+f*E,k=d*_+f*P,F=p*M+g*E,R=p*_+g*P,O=v*M+y*E+m[4],B=v*_+y*P+m[5],I=r*L+o*F+O,D=r*k+o*R+B,Y=r*L+C*F+O,z=r*k+C*R+B,X=A*L+C*F+O,N=A*k+C*R+B,V=A*L+o*F+O,W=A*k+o*R+B,G=l.getTintAppendFloatAlphaAndSwap(u,c);x&&(I=(I*b|0)/b,D=(D*b|0)/b,Y=(Y*b|0)/b,z=(z*b|0)/b,X=(X*b|0)/b,N=(N*b|0)/b,V=(V*b|0)/b,W=(W*b|0)/b),w[S+0]=I,w[S+1]=D,T[S+2]=G,w[S+3]=Y,w[S+4]=z,T[S+5]=G,w[S+6]=X,w[S+7]=N,T[S+8]=G,w[S+9]=I,w[S+10]=D,T[S+11]=G,w[S+12]=X,w[S+13]=N,T[S+14]=G,w[S+15]=V,w[S+16]=W,T[S+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.renderer.config.resolution,S=this.vertexViewF32,A=this.vertexViewU32,C=this.vertexCount*this.vertexComponentCount,M=b[0],_=b[1],E=b[2],P=b[3],L=p*M+g*E,k=p*_+g*P,F=v*M+y*E,R=v*_+y*P,O=m*M+x*E+b[4],B=m*_+x*P+b[5],I=r*L+o*F+O,D=r*k+o*R+B,Y=a*L+h*F+O,z=a*k+h*R+B,X=u*L+c*F+O,N=u*k+c*R+B,V=l.getTintAppendFloatAlphaAndSwap(d,f);w&&(I=(I*T|0)/T,D=(D*T|0)/T,Y=(Y*T|0)/T,z=(z*T|0)/T,X=(X*T|0)/T,N=(N*T|0)/T),S[C+0]=I,S[C+1]=D,A[C+2]=V,S[C+3]=Y,S[C+4]=z,A[C+5]=V,S[C+6]=X,S[C+7]=N,A[C+8]=V,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,b,w){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=l,T[2].y=u,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,v,y,m,x,!1,b,w)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v,y){this.renderer.setPipeline(this);for(var m,x,b,w,T,S,A,C,M,_,E,P,L,k,F,R,O,B=this.renderer.config.resolution,I=o.length,D=this.polygonCache,Y=this.vertexViewF32,z=this.vertexViewU32,X=0,N=v[0],V=v[1],W=v[2],G=v[3],U=u*N+c*W,j=u*V+c*G,H=d*N+f*W,q=d*V+f*G,K=p*N+g*W+v[4],J=p*V+g*G+v[5],Z=l.getTintAppendFloatAlphaAndSwap(a,h),Q=0;Qthis.vertexCapacity&&this.flush(),X=this.vertexCount*this.vertexComponentCount,P=(S=D[b+0])*U+(A=D[b+1])*H+K,L=S*j+A*q+J,k=(C=D[w+0])*U+(M=D[w+1])*H+K,F=C*j+M*q+J,R=(_=D[T+0])*U+(E=D[T+1])*H+K,O=_*j+E*q+J,y&&(P=(P*B|0)/B,L=(L*B|0)/B,k=(k*B|0)/B,F=(F*B|0)/B,R=(R*B|0)/B,O=(O*B|0)/B),Y[X+0]=P,Y[X+1]=L,z[X+2]=Z,Y[X+3]=k,Y[X+4]=F,z[X+5]=Z,Y[X+6]=R,Y[X+7]=O,z[X+8]=Z,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m){var x,b;this.renderer.setPipeline(this);for(var w,T,S,A,C=r.length,M=this.polygonCache,_=this.vertexViewF32,E=this.vertexViewU32,P=l.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=M[k-1]||M[F-1],T=M[k],_[(S=this.vertexCount*this.vertexComponentCount)+0]=w[6],_[S+1]=w[7],E[S+2]=P(w[8],h),_[S+3]=w[0],_[S+4]=w[1],E[S+5]=P(w[2],h),_[S+6]=T[9],_[S+7]=T[10],E[S+8]=P(T[11],h),_[S+9]=w[0],_[S+10]=w[1],E[S+11]=P(w[2],h),_[S+12]=w[6],_[S+13]=w[7],E[S+14]=P(w[8],h),_[S+15]=T[3],_[S+16]=T[4],E[S+17]=P(T[5],h),this.vertexCount+=6;M.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var S=this.renderer.config.resolution,A=w[0],C=w[1],M=w[2],_=w[3],E=g*A+v*M,P=g*C+v*_,L=y*A+m*M,k=y*C+m*_,F=x*A+b*M+w[4],R=x*C+b*_+w[5],O=this.vertexViewF32,B=this.vertexViewU32,I=a-r,D=h-o,Y=Math.sqrt(I*I+D*D),z=u*(h-o)/Y,X=u*(r-a)/Y,N=c*(h-o)/Y,V=c*(r-a)/Y,W=a-N,G=h-V,U=r-z,j=o-X,H=a+N,q=h+V,K=r+z,J=o+X,Z=W*E+G*L+F,Q=W*P+G*k+R,$=U*E+j*L+F,tt=U*P+j*k+R,et=H*E+q*L+F,it=H*P+q*k+R,nt=K*E+J*L+F,st=K*P+J*k+R,rt=l.getTintAppendFloatAlphaAndSwap,ot=rt(d,p),at=rt(f,p),ht=this.vertexCount*this.vertexComponentCount;return T&&(Z=(Z*S|0)/S,Q=(Q*S|0)/S,$=($*S|0)/S,tt=(tt*S|0)/S,et=(et*S|0)/S,it=(it*S|0)/S,nt=(nt*S|0)/S,st=(st*S|0)/S),O[ht+0]=Z,O[ht+1]=Q,B[ht+2]=at,O[ht+3]=$,O[ht+4]=tt,B[ht+5]=ot,O[ht+6]=et,O[ht+7]=it,B[ht+8]=at,O[ht+9]=$,O[ht+10]=tt,B[ht+11]=ot,O[ht+12]=nt,O[ht+13]=st,B[ht+14]=ot,O[ht+15]=et,O[ht+16]=it,B[ht+17]=at,this.vertexCount+=6,[Z,Q,f,$,tt,d,et,it,f,nt,st,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i=e.scrollX*t.scrollFactorX,n=e.scrollY*t.scrollFactorY,r=t.x-i,o=t.y-n,a=t.scaleX,h=t.scaleY,l=-t.rotation,u=t.commandBuffer,y=1,m=1,x=0,b=0,w=1,T=e.matrix.matrix,S=null,A=0,C=0,M=0,_=0,E=0,P=0,L=0,k=0,F=0,R=null,O=Math.sin,B=Math.cos,I=O(l),D=B(l),Y=D*a,z=-I*a,X=I*h,N=D*h,V=r,W=o,G=T[0],U=T[1],j=T[2],H=T[3],q=Y*G+z*j,K=Y*U+z*H,J=X*G+N*j,Z=X*U+N*H,Q=V*G+W*j+T[4],$=V*U+W*H+T[5],tt=e.roundPixels;v.length=0;for(var et=0,it=u.length;et0){var nt=S.points[0],st=S.points[S.points.length-1];S.points.push(nt),S=new d(st.x,st.y,st.width,st.rgb,st.alpha),v.push(S)}break;case s.FILL_PATH:for(var rt=0,ot=v.length;rt=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(126),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,b=0;br&&(m=w-r),T>o&&(x=T-o),t.add(b,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,b=e.x,w=s-b,T=s-(g-f-b),S=e.y,A=r-S,C=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=l,_=l,E=0,P=e.sourceIndex,L=0;L0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(264),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(541),Components:i(12),BitmapText:i(130),Blitter:i(131),DynamicBitmapText:i(132),Graphics:i(133),Group:i(69),Image:i(70),Particles:i(136),PathFollower:i(288),Sprite3D:i(81),Sprite:i(37),Text:i(138),TileSprite:i(139),Zone:i(77),Factories:{Blitter:i(620),DynamicBitmapText:i(621),Graphics:i(622),Group:i(623),Image:i(624),Particles:i(625),PathFollower:i(626),Sprite3D:i(627),Sprite:i(628),StaticBitmapText:i(629),Text:i(630),TileSprite:i(631),Zone:i(632)},Creators:{Blitter:i(633),DynamicBitmapText:i(634),Graphics:i(635),Group:i(636),Image:i(637),Particles:i(638),Sprite3D:i(639),Sprite:i(640),StaticBitmapText:i(641),Text:i(642),TileSprite:i(643),Zone:i(644)}};n.Mesh=i(88),n.Quad=i(140),n.Factories.Mesh=i(648),n.Factories.Quad=i(649),n.Creators.Mesh=i(650),n.Creators.Quad=i(651),n.Light=i(291),i(292),i(652),t.exports=n},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(t,e){var i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){var s,r;for(s=0;s-1&&this._list.splice(o,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(545),s=i(546),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,b=0,w=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,_=a.cutX,E=a.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-l+e.frame.y),C.rotate(e.rotation),C.scale(e.scaleX,e.scaleY);for(var L=0;L0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode),t.currentAlpha;for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,l=0;l0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,b=0,w=0,T=0,S=0,A=null,C=0,M=t.currentContext,_=e.frame.source.image,E=a.cutX,P=a.cutY,L=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(134);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(564),s=i(272),s=i(272),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(567),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e,i){var n=this.x-t.x,s=this.y-t.y,r=n*n+s*s;if(0!==r){var o=Math.sqrt(r);r0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(0),s=(i(42),new n({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}}));t.exports=s},function(t,e,i){var n=i(0),s=i(274),r=i(71),o=i(1),a=i(42),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i,n){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},function(t,e,i){var n=i(275),s=i(276),r=i(277),o=i(278),a=i(279),h=i(280),l=i(281),u=i(282),c=i(283),d=i(284),f=i(285),p=i(286);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(43),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(609),s=i(610),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,b=y.canvasData,w=-m,T=-x;u.globalAlpha=v,u.save(),u.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),u.rotate(g.rotation),u.scale(g.scaleX,g.scaleY),u.drawImage(y.source.image,b.sx,b.sy,b.sWidth,b.sHeight,w,T,b.dWidth,b.dHeight),u.restore()}}u.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;e.resolution,t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(616),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(131);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(133);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(136);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(288);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(130);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(138);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(139);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(133);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(136);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(290),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(290),r=i(14),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(130),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(138);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(646),s=i(647),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(t,e,i,n){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,key,h))})},function(t,e,i){var n=i(140);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(292),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(654),n.Circumference=i(180),n.CircumferencePoint=i(104),n.Clone=i(655),n.Contains=i(32),n.ContainsPoint=i(656),n.ContainsRect=i(657),n.CopyFrom=i(658),n.Equals=i(659),n.GetBounds=i(660),n.GetPoint=i(178),n.GetPoints=i(179),n.Offset=i(661),n.OffsetPoint=i(662),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(295);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(297);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(141),o=i(298);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(300);n.Angle=i(54),n.BresenhamPoints=i(188),n.CenterOn=i(674),n.Clone=i(675),n.CopyFrom=i(676),n.Equals=i(677),n.GetMidPoint=i(678),n.GetNormal=i(679),n.GetPoint=i(301),n.GetPoints=i(108),n.Height=i(680),n.Length=i(65),n.NormalAngle=i(302),n.NormalX=i(681),n.NormalY=i(682),n.Offset=i(683),n.PerpSlope=i(684),n.Random=i(110),n.ReflectAngle=i(685),n.Rotate=i(686),n.RotateAroundPoint=i(687),n.RotateAroundXY=i(142),n.SetToAngle=i(688),n.Slope=i(689),n.Width=i(690),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(300);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(302);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(142);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(142);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(692),n.Clone=i(693),n.CopyFrom=i(694),n.Equals=i(695),n.Floor=i(696),n.GetCentroid=i(697),n.GetMagnitude=i(303),n.GetMagnitudeSq=i(304),n.GetRectangleFromPoints=i(698),n.Interpolate=i(699),n.Invert=i(700),n.Negative=i(701),n.Project=i(702),n.ProjectUnit=i(703),n.SetMagnitude=i(704),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(307);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var l=[];for(i=0;i1&&(this.sortGameObjects(l),this.topOnly&&l.splice(1)),this._drag[t.id]=l,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var u=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),u[0]?(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&u[0]&&(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(126),KeyCombo:i(244),JustDown:i(757),JustUp:i(758),DownDuration:i(759),UpDuration:i(760)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(782),Distance:i(790),Easing:i(793),Fuzzy:i(794),Interpolation:i(800),Pow2:i(803),Snap:i(805),Average:i(809),Bernstein:i(321),Between:i(226),CatmullRom:i(121),CeilTo:i(810),Clamp:i(60),DegToRad:i(35),Difference:i(811),Factorial:i(322),FloatBetween:i(274),FloorTo:i(812),FromPercent:i(64),GetSpeed:i(813),IsEven:i(814),IsEvenStrict:i(815),Linear:i(225),MaxAdd:i(816),MinSub:i(817),Percent:i(818),RadToDeg:i(216),RandomXY:i(819),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(323),RotateAround:i(182),RotateAroundDistance:i(112),RoundAwayFromZero:i(324),RoundTo:i(820),SinCosTableGenerator:i(821),SmootherStep:i(189),SmoothStep:i(190),TransformXY:i(248),Within:i(822),Wrap:i(42),Vector2:i(6),Vector3:i(51),Vector4:i(118),Matrix3:i(208),Matrix4:i(117),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(783),BetweenY:i(784),BetweenPoints:i(785),BetweenPointsY:i(786),Reverse:i(787),RotateTo:i(788),ShortestBetween:i(789),Normalize:i(320),Wrap:i(159),WrapDegrees:i(160)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(320);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(806),Floor:i(807),To:i(808)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=l(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(u(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return this.body.enable=!0,t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(839),s=i(841),r=i(336);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(842);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){var n=i(846);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){t.exports={Acceleration:i(953),BodyScale:i(954),BodyType:i(955),Bounce:i(956),CheckAgainst:i(957),Collides:i(958),Debug:i(959),Friction:i(960),Gravity:i(961),Offset:i(962),SetGameObject:i(963),Velocity:i(964)}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(39);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(852),r=i(363),o=i(95);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(94);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(148),r=(i(162),i(39));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(127)}},function(t,e,i){var n=i(0),s=i(84),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this._queue=[]},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(86),BaseSoundManager:i(85),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(129),Map:i(113),ProcessQueue:i(333),RTree:i(334),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(128),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(892),Formats:i(19),ImageCollection:i(348),ParseToTilemap:i(153),Tile:i(45),Tilemap:i(352),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(350),DynamicTilemapLayer:i(353),StaticTilemapLayer:i(354)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(44),s=i(34),r=i(151);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(o,1),r.destroy()}for(s=0;s=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(t){},check:function(t){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(t){return!0},destroy:function(){this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(952),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var b=Math.floor((e+v)/f);if((l>0||u===b||b<0||b>=p)&&(b=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,b,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var C=Math.floor((i+w)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+T;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),b=g/x,w=-p/x,T=y*b+m*w,S=b*T,A=w*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:b,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(932),r=i(933),o=i(934),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s}});t.exports=a},function(t,e,i){var n=i(0),s=i(847),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(847),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(847),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(929),s=i(0),r=i(338),o=i(930),a=i(13),h=i(1),l=i(72),u=i(61),c=i(966),d=i(19),f=i(339),p=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new u,this.gravity=h(e,"gravity",0),this.cellSize=h(e,"cellSize",64),this.collisionMap=new o,this.timeScale=h(e,"timeScale",1),this.maxStep=h(e,"maxStep",.05),this.enabled=!0,this.drawDebug=h(e,"debug",!1),this.debugGraphic;var i=h(e,"maxVelocity",100);if(this.defaults={debugShowBody:h(e,"debugShowBody",!0),debugShowVelocity:h(e,"debugShowVelocity",!0),bodyDebugColor:h(e,"debugBodyColor",16711935),velocityDebugColor:h(e,"debugVelocityColor",65280),maxVelocityX:h(e,"maxVelocityX",i),maxVelocityY:h(e,"maxVelocityY",i),minBounceVelocity:h(e,"minBounceVelocity",40),gravityFactor:h(e,"gravityFactor",1),bounciness:h(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=h(n,"x",0),r=h(n,"y",0),l=h(n,"width",t.sys.game.config.width),c=h(n,"height",t.sys.game.config.height),d=h(n,"thickness",64),f=h(n,"left",!0),p=h(n,"right",!0),g=h(n,"top",!0),v=h(n,"bottom",!0);this.setBounds(s,r,l,c,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var k=0;kA&&(A+=e.length),S=Number.MAX_VALUE,A3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);r(f(t,e-1),f(t,e),f(t,e+1))||function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lv.bounds.max.x||b.bounds.max.yv.bounds.max.y)){var w=e(i,b);if(!b.region||w.id!==b.region.id||r){x.broadphaseTests+=1,b.region&&!r||(b.region=w);var T=t(w,b.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=w.startCol&&d<=w.endCol&&f>=w.startRow&&f<=w.endRow,A=d>=b.region.startCol&&d<=b.region.endCol&&f>=b.region.startRow&&f<=b.region.endRow;!S&&A&&A&&p&&u(i,p,b),(b.region===w||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,b))}b.region=w,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}}()},function(t,e,i){var n={};t.exports=n;var s=i(363),r=i(39);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a1e3&&h.push(r);for(r=0;rf.friction*f.frictionStatic*O*i&&(I=k,B=o.clamp(f.friction*F*i,-I,I));var D=r.cross(A,y),Y=r.cross(C,y),z=b/(g.inverseMass+v.inverseMass+g.inverseInertia*D*D+v.inverseInertia*Y*Y);if(R*=z,B*=z,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(L*L>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-I,I),B=T.tangentImpulse-N}s.x=y.x*R+m.x*B,s.y=y.y*R+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(855),r=i(340),o=i(944),a=i(943),h=i(984),l=i(942),u=i(161),c=i(148),d=i(162),f=i(39),p=i(59);!function(){n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);return n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(n,s,l){s=s||1e3/60,l=l||1;var f,p=n.world,g=n.timing,v=n.broadphase,y=[];g.timestamp+=s*g.timeScale;var m={timestamp:g.timestamp};u.trigger(n,"beforeUpdate",m);var x=c.allBodies(p),b=c.allConstraints(p);for(h.reset(n.metrics),n.enableSleeping&&r.update(x,g.timeScale),e(x,p.gravity),i(x,s,g.timeScale,l,p.bounds),d.preSolveAll(x),f=0;f0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),c.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),c.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&d.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&d.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setZ(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return d.add(this.localWorld,o),o},add:function(t){return d.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return r.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return r.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(936),Image:i(939),Matter:i(853),MatterPhysics:i(986),PolyDecomp:i(937),Sprite:i(940),TileBody:i(850),World:i(946)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(107),o=i(182),a=i(108),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s={},r=new n({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,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={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){for(var e=0,i=0;i0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return t instanceof HTMLElement},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*g+x)*b,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(112),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,i,r,o){o=o||t.position;for(var a=0;a0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.values.forEach(function(t){e.add(t)}),this.entries.forEach(function(t){e.add(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.add(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.add(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(106),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(122),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(492))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),l=i(38),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(38),o=i(6),a=i(120),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(t,e){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=(this.vertexBuffer,this.vertexData,this.topology),n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);for(var n in i.spritemap=this.game.cache.json.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration,config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0):(console.error("addMarker - Marker has to have a valid name!"),!1):(console.error("addMarker - Marker object has to be provided!"),!1)},updateMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1):(console.error("updateMarker - Marker has to have a valid name!"),!1):(console.error("updateMarker - Marker object has to be provided!"),!1)},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):(console.error("removeMarker - Marker with name '"+e.name+"' does not exist for sound '"+this.key+"'!"),null)},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(645),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(38),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(39),o=i(59),a=i(96),h=i(95),l=i(937);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n={};t.exports=n;var s=i(95),r=i(39);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(35),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(98),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(341),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(342),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(340),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(99),TileToWorldXY:i(889),TileToWorldY:i(100),WeightedRandomize:i(890),WorldToTileX:i(40),WorldToTileXY:i(891),WorldToTileY:i(41)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||w-y||A>-m||S-y||T>-m||w-y||A>-m||S-v&&A*n+C*r+h>-y&&(A+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],l=n[4],u=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*u-a*l)*c,y=(r*l-s*u)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),b=this.zoom,w=this.scrollX,T=this.scrollY,S=t+(w*m-T*x)*b,A=e+(w*x+T*m)*b;return i.x=S*d+A*p+v,i.y=S*f+A*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;eu&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom)}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=l},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(119),r=i(204),o=i(205),a=i(206),h=i(61),l=i(81),u=i(6),c=i(51),d=i(120),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(84),r=i(525),o=i(526),a=i(231),h=i(252),l=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=l},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(542),h=i(543),l=i(544),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(547),s=i(550),r=i(0),o=i(12),a=i(130),h=i(2),l=i(87),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=u},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(551),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(115),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),l=i(4),u=i(16),c=i(563),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=l(e,"x",0),n=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(110),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(568),a=i(87),h=i(569),l=i(608),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h]+" ")}r0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(l[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(l[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(617),l=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){var u=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=u,this.setTexture(h,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT,gl.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(0),s=i(89),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,b=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration)r=1,o=s.duration;else if(n>s.delay&&n<=s.t1)r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r;else if(n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)}s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(39);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(373),Call:i(374),GetFirst:i(375),GridAlign:i(376),IncAlpha:i(393),IncX:i(394),IncXY:i(395),IncY:i(396),PlaceOnCircle:i(397),PlaceOnEllipse:i(398),PlaceOnLine:i(399),PlaceOnRectangle:i(400),PlaceOnTriangle:i(401),PlayAnimation:i(402),RandomCircle:i(403),RandomEllipse:i(404),RandomLine:i(405),RandomRectangle:i(406),RandomTriangle:i(407),Rotate:i(408),RotateAround:i(409),RotateAroundDistance:i(410),ScaleX:i(411),ScaleXY:i(412),ScaleY:i(413),SetAlpha:i(414),SetBlendMode:i(415),SetDepth:i(416),SetHitArea:i(417),SetOrigin:i(418),SetRotation:i(419),SetScale:i(420),SetScaleX:i(421),SetScaleY:i(422),SetTint:i(423),SetVisible:i(424),SetX:i(425),SetXY:i(426),SetY:i(427),ShiftPosition:i(428),Shuffle:i(429),SmootherStep:i(430),SmoothStep:i(431),Spread:i(432),ToggleVisible:i(433)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(47),r=i(25),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(47),r=i(50);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(48),s=i(49);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(50),s=i(26),r=i(49),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(50),s=i(28),r=i(49),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(47),s=i(30),r=i(48),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(105),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(105),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=l[0],l[0].prevFrame=o;var v=1/(l.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(114),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(114),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(37);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(37);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(119),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,w=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,P=d*m-p*v,L=f*m-p*y,k=x*L-b*P+w*_+T*E-S*M+A*C;return k?(k=1/k,i[0]=(h*L-l*P+u*_)*k,i[1]=(l*E-a*L-u*M)*k,i[2]=(a*P-h*E+u*C)*k,i[3]=(r*P-s*L-o*_)*k,i[4]=(n*L-r*E+o*M)*k,i[5]=(s*E-n*P-o*C)*k,i[6]=(v*A-y*S+m*T)*k,i[7]=(y*w-g*A-m*b)*k,i[8]=(g*S-v*w+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(482)(t))},function(t,e,i){var n=i(117);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l={r:i=Math.floor(i*=255),g:i,b:i,color:0},u=s%6;return 0===u?(l.g=h,l.b=o):1===u?(l.r=a,l.b=o):2===u?(l.r=o,l.b=h):3===u?(l.r=o,l.g=a):4===u?(l.r=h,l.g=o):5===u&&(l.g=o,l.b=a),l.color=n(l.r,l.g,l.b),l}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&y(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(y(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!m(s,r)&&x(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&b(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&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;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(m(t,e)&&m(i,n)||m(t,n)&&m(i,e))||y(t,e,i)>0!=y(t,e,n)>0&&y(i,n,t)>0!=y(i,n,e)>0}function b(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function w(t,e){var i=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function T(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(510),r=i(236),o=(i(34),i(83),new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;for(var n=this.renderer,s=this.program,r=t.lights.cull(e),o=Math.min(r.length,10),a=e.matrix,h={x:0,y:0},l=n.height,u=0;u<10;++u)n.setFloat1(s,"uLights["+u+"].radius",0);if(o<=0)return this;n.setFloat4(s,"uCamera",e.x,e.y,e.rotation,e.zoom),n.setFloat3(s,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b);for(u=0;u0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.renderer,i=this.vertexCount,n=(this.vertexBuffer,this.vertexData,this.topology),s=this.vertexSize,r=this.batches,o=0,a=null;if(0===r.length||0===i)return this.flushLocked=!1,this;t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));for(var h=0;h0){for(var l=0;l0){for(l=0;l0&&(e.setTexture2D(a.texture,0),t.drawArrays(n,a.first,o)),this.vertexCount=0,r.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t,e){if(t.vertexCount>0){var i=this.vertexBuffer,n=this.gl,s=this.renderer,r=t.tileset.image.get();s.currentPipeline&&s.currentPipeline.vertexCount>0&&s.flush(),this.vertexBuffer=t.vertexBuffer,s.setTexture2D(r.source.glTexture,0),s.setPipeline(this),n.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=i}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=(a.getTintAppendFloatAlpha,this.vertexViewF32),r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,l=o.config.resolution,u=this.maxQuads,c=e.scrollX,d=e.scrollY,f=e.matrix.matrix,p=f[0],g=f[1],v=f[2],y=f[3],m=f[4],x=f[5],b=Math.sin,w=Math.cos,T=this.vertexComponentCount,S=this.vertexCapacity,A=t.defaultFrame.source.glTexture;this.setTexture2D(A,0);for(var C=0;C=S&&(this.flush(),this.setTexture2D(A,0));for(var R=0;R=S&&(this.flush(),this.setTexture2D(A,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=this.renderer,o=e.roundPixels,h=r.config.resolution,l=t.getRenderList(),u=l.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,b=Math.ceil(u/this.maxQuads),w=0,T=t.x-m,S=t.y-x,A=0;A=this.vertexCapacity&&this.flush()}w+=C,u-=C,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,l=o.config.resolution,u=e.matrix.matrix,c=t.frame,d=c.texture.source[c.sourceIndex].glTexture,f=!!d.isRenderTexture,p=t.flipX,g=t.flipY^f,v=c.uvs,y=c.width*(p?-1:1),m=c.height*(g?-1:1),x=-t.displayOriginX+c.x+c.width*(p?1:0),b=-t.displayOriginY+c.y+c.height*(g?1:0),w=x+y,T=b+m,S=t.x-e.scrollX*t.scrollFactorX,A=t.y-e.scrollY*t.scrollFactorY,C=t.scaleX,M=t.scaleY,E=-t.rotation,_=t._alphaTL,P=t._alphaTR,L=t._alphaBL,k=t._alphaBR,F=t._tintTL,R=t._tintTR,O=t._tintBL,B=t._tintBR,D=Math.sin(E),I=Math.cos(E),Y=I*C,z=-D*C,X=D*M,N=I*M,V=S,W=A,G=u[0],U=u[1],j=u[2],H=u[3],q=Y*G+z*j,K=Y*U+z*H,J=X*G+N*j,Z=X*U+N*H,Q=V*G+W*j+u[4],$=V*U+W*H+u[5],tt=x*q+b*J+Q,et=x*K+b*Z+$,it=x*q+T*J+Q,nt=x*K+T*Z+$,st=w*q+T*J+Q,rt=w*K+T*Z+$,ot=w*q+b*J+Q,at=w*K+b*Z+$,ht=n(F,_),lt=n(R,P),ut=n(O,L),ct=n(B,k);this.setTexture2D(d,0),h&&(tt=(tt*l|0)/l,et=(et*l|0)/l,it=(it*l|0)/l,nt=(nt*l|0)/l,st=(st*l|0)/l,rt=(rt*l|0)/l,ot=(ot*l|0)/l,at=(at*l|0)/l),s[(i=this.vertexCount*this.vertexComponentCount)+0]=tt,s[i+1]=et,s[i+2]=v.x0,s[i+3]=v.y0,r[i+4]=ht,s[i+5]=it,s[i+6]=nt,s[i+7]=v.x1,s[i+8]=v.y1,r[i+9]=lt,s[i+10]=st,s[i+11]=rt,s[i+12]=v.x2,s[i+13]=v.y2,r[i+14]=ut,s[i+15]=tt,s[i+16]=et,s[i+17]=v.x0,s[i+18]=v.y0,r[i+19]=ht,s[i+20]=st,s[i+21]=rt,s[i+22]=v.x2,s[i+23]=v.y2,r[i+24]=ut,s[i+25]=ot,s[i+26]=at,s[i+27]=v.x3,s[i+28]=v.y3,r[i+29]=ct,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,l=t.alphas,u=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=e.roundPixels,p=d.config.resolution,g=e.matrix.matrix,v=(g[0],g[1],g[2],g[3],g[4],g[5],t.frame),y=t.texture.source[v.sourceIndex].glTexture,m=t.x-e.scrollX*t.scrollFactorX,x=t.y-e.scrollY*t.scrollFactorY,b=t.scaleX,w=t.scaleY,T=-t.rotation,S=Math.sin(T),A=Math.cos(T),C=A*b,M=-S*b,E=S*w,_=A*w,P=m,L=x,k=g[0],F=g[1],R=g[2],O=g[3],B=C*k+M*R,D=C*F+M*O,I=E*k+_*R,Y=E*F+_*O,z=P*k+L*R+g[4],X=P*F+L*O+g[5],N=0;this.setTexture2D(y,0),N=this.vertexCount*this.vertexComponentCount;for(var V=0,W=0;Vthis.vertexCapacity&&this.flush();var i=t.text,n=i.length,s=a.getTintAppendFloatAlpha,r=this.vertexViewF32,o=this.vertexViewU32,h=this.renderer,l=e.roundPixels,u=h.config.resolution,c=e.matrix.matrix,d=e.width+50,f=e.height+50,p=t.frame,g=t.texture.source[p.sourceIndex],v=e.scrollX*t.scrollFactorX,y=e.scrollY*t.scrollFactorY,m=t.fontData,x=m.lineHeight,b=t.fontSize/m.size,w=m.chars,T=t.alpha,S=s(t._tintTL,T),A=s(t._tintTR,T),C=s(t._tintBL,T),M=s(t._tintBR,T),E=t.x,_=t.y,P=p.cutX,L=p.cutY,k=g.width,F=g.height,R=g.glTexture,O=0,B=0,D=0,I=0,Y=null,z=0,X=0,N=0,V=0,W=0,G=0,U=0,j=0,H=0,q=0,K=0,J=0,Z=null,Q=0,$=E-v+p.x,tt=_-y+p.y,et=-t.rotation,it=t.scaleX,nt=t.scaleY,st=Math.sin(et),rt=Math.cos(et),ot=rt*it,at=-st*it,ht=st*nt,lt=rt*nt,ut=$,ct=tt,dt=c[0],ft=c[1],pt=c[2],gt=c[3],vt=ot*dt+at*pt,yt=ot*ft+at*gt,mt=ht*dt+lt*pt,xt=ht*ft+lt*gt,bt=ut*dt+ct*pt+c[4],wt=ut*ft+ct*gt+c[5],Tt=0;this.setTexture2D(R,0);for(var St=0;Std||ty0<-50||ty0>f)&&(tx1<-50||tx1>d||ty1<-50||ty1>f)&&(tx2<-50||tx2>d||ty2<-50||ty2>f)&&(tx3<-50||tx3>d||ty3<-50||ty3>f)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Tt=this.vertexCount*this.vertexComponentCount,l&&(tx0=(tx0*u|0)/u,ty0=(ty0*u|0)/u,tx1=(tx1*u|0)/u,ty1=(ty1*u|0)/u,tx2=(tx2*u|0)/u,ty2=(ty2*u|0)/u,tx3=(tx3*u|0)/u,ty3=(ty3*u|0)/u),r[Tt+0]=tx0,r[Tt+1]=ty0,r[Tt+2]=H,r[Tt+3]=K,o[Tt+4]=S,r[Tt+5]=tx1,r[Tt+6]=ty1,r[Tt+7]=H,r[Tt+8]=J,o[Tt+9]=A,r[Tt+10]=tx2,r[Tt+11]=ty2,r[Tt+12]=q,r[Tt+13]=J,o[Tt+14]=C,r[Tt+15]=tx0,r[Tt+16]=ty0,r[Tt+17]=H,r[Tt+18]=K,o[Tt+19]=S,r[Tt+20]=tx2,r[Tt+21]=ty2,r[Tt+22]=q,r[Tt+23]=J,o[Tt+24]=C,r[Tt+25]=tx3,r[Tt+26]=ty3,r[Tt+27]=q,r[Tt+28]=K,o[Tt+29]=M,this.vertexCount+=6))}}else O=0,D=0,B+=x,Z=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,l=t.displayCallback,u=t.text,c=u.length,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=this.renderer,v=e.roundPixels,y=g.config.resolution,m=e.matrix.matrix,x=t.frame,b=t.texture.source[x.sourceIndex],w=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,S=t.scrollX,A=t.scrollY,C=t.fontData,M=C.lineHeight,E=t.fontSize/C.size,_=C.chars,P=t.alpha,L=d(t._tintTL,P),k=d(t._tintTR,P),F=d(t._tintBL,P),R=d(t._tintBR,P),O=t.x,B=t.y,D=x.cutX,I=x.cutY,Y=b.width,z=b.height,X=b.glTexture,N=0,V=0,W=0,G=0,U=null,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=null,rt=0,ot=O+x.x,at=B+x.y,ht=-t.rotation,lt=t.scaleX,ut=t.scaleY,ct=Math.sin(ht),dt=Math.cos(ht),ft=dt*lt,pt=-ct*lt,gt=ct*ut,vt=dt*ut,yt=ot,mt=at,xt=m[0],bt=m[1],wt=m[2],Tt=m[3],St=ft*xt+pt*wt,At=ft*bt+pt*Tt,Ct=gt*xt+vt*wt,Mt=gt*bt+vt*Tt,Et=yt*xt+mt*wt+m[4],_t=yt*bt+mt*Tt+m[5],Pt=t.cropWidth>0||t.cropHeight>0,Lt=0;this.setTexture2D(X,0),Pt&&g.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var kt=0;ktthis.vertexCapacity&&this.flush(),Lt=this.vertexCount*this.vertexComponentCount,v&&(tx0=(tx0*y|0)/y,ty0=(ty0*y|0)/y,tx1=(tx1*y|0)/y,ty1=(ty1*y|0)/y,tx2=(tx2*y|0)/y,ty2=(ty2*y|0)/y,tx3=(tx3*y|0)/y,ty3=(ty3*y|0)/y),f[Lt+0]=tx0,f[Lt+1]=ty0,f[Lt+2]=tt,f[Lt+3]=it,p[Lt+4]=L,f[Lt+5]=tx1,f[Lt+6]=ty1,f[Lt+7]=tt,f[Lt+8]=nt,p[Lt+9]=k,f[Lt+10]=tx2,f[Lt+11]=ty2,f[Lt+12]=et,f[Lt+13]=nt,p[Lt+14]=F,f[Lt+15]=tx0,f[Lt+16]=ty0,f[Lt+17]=tt,f[Lt+18]=it,p[Lt+19]=L,f[Lt+20]=tx2,f[Lt+21]=ty2,f[Lt+22]=et,f[Lt+23]=nt,p[Lt+24]=F,f[Lt+25]=tx3,f[Lt+26]=ty3,f[Lt+27]=et,f[Lt+28]=it,p[Lt+29]=R,this.vertexCount+=6}}}else N=0,W=0,V+=M,st=null;Pt&&g.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,l=t.alpha,u=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),f^=e.isRenderTexture?1:0,c=-c;a.getTintAppendFloatAlpha;var P,L=this.vertexViewF32,k=this.vertexViewU32,F=this.renderer,R=_.roundPixels,O=F.config.resolution,B=_.matrix.matrix,D=o*(d?1:0)-v,I=h*(f?1:0)-y,Y=D+o*(d?-1:1),z=I+h*(f?-1:1),X=s-_.scrollX*p,N=r-_.scrollY*g,V=Math.sin(c),W=Math.cos(c),G=W*l,U=-V*l,j=V*u,H=W*u,q=X,K=N,J=B[0],Z=B[1],Q=B[2],$=B[3],tt=G*J+U*Q,et=G*Z+U*$,it=j*J+H*Q,nt=j*Z+H*$,st=q*J+K*Q+B[4],rt=q*Z+K*$+B[5],ot=D*tt+I*it+st,at=D*et+I*nt+rt,ht=D*tt+z*it+st,lt=D*et+z*nt+rt,ut=Y*tt+z*it+st,ct=Y*et+z*nt+rt,dt=Y*tt+I*it+st,ft=Y*et+I*nt+rt,pt=m/i+M,gt=x/n+E,vt=(m+b)/i+M,yt=(x+w)/n+E;this.setTexture2D(e,0),R&&(ot=(ot*O|0)/O,at=(at*O|0)/O,ht=(ht*O|0)/O,lt=(lt*O|0)/O,ut=(ut*O|0)/O,ct=(ct*O|0)/O,dt=(dt*O|0)/O,ft=(ft*O|0)/O),L[(P=this.vertexCount*this.vertexComponentCount)+0]=ot,L[P+1]=at,L[P+2]=pt,L[P+3]=gt,k[P+4]=T,L[P+5]=ht,L[P+6]=lt,L[P+7]=pt,L[P+8]=yt,k[P+9]=S,L[P+10]=ut,L[P+11]=ct,L[P+12]=vt,L[P+13]=yt,k[P+14]=A,L[P+15]=ot,L[P+16]=at,L[P+17]=pt,L[P+18]=gt,k[P+19]=T,L[P+20]=ut,L[P+21]=ct,L[P+22]=vt,L[P+23]=yt,k[P+24]=A,L[P+25]=dt,L[P+26]=ft,L[P+27]=vt,L[P+28]=gt,k[P+29]=C,this.vertexCount+=6},batchGraphics:function(t,e){}});t.exports=l},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),l=i(8),u=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new u(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new l,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=0;u0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(522),l=i(523),u=i(524),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(84),s=i(4),r=i(527),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(){return!1},playAudioSprite:function(){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(86),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(){return!1},updateMarker:function(){return!1},removeMarker:function(){return null},play:function(){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(85),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){s.prototype.destroy.call(this),this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.context.suspend(),this.context=null}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(86),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var S=y+g-s,A=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,u=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,b=0,w=1,T=0,S=0,A=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(u-h,c-l),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,S=(65280&x)>>>8,A=255&x,v.strokeStyle="rgba("+T+","+S+","+A+","+y+")",v.lineWidth=w,C+=3;break;case n.FILL_STYLE:b=g[C+1],m=g[C+2],T=(16711680&b)>>>16,S=(65280&b)>>>8,A=255&b,v.fillStyle="rgba("+T+","+S+","+A+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+E)}}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(34),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(653),Ellipse:i(267),Intersects:i(293),Line:i(673),Point:i(691),Polygon:i(705),Rectangle:i(305),Triangle:i(734)}},function(t,e,i){t.exports={CircleToCircle:i(663),CircleToRectangle:i(664),GetRectangleIntersection:i(665),LineToCircle:i(295),LineToLine:i(90),LineToRectangle:i(666),PointToLine:i(296),PointToLineSegment:i(667),RectangleToRectangle:i(294),RectangleToTriangle:i(668),RectangleToValues:i(669),TriangleToCircle:i(670),TriangleToLine:i(671),TriangleToTriangle:i(672)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(109),o=i(111),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(42),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),l=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});l.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return console.info("Skipping loading audio '"+e+"' since sounds are disabled."),null;var u=l.findAudioURL(r,i);return u?!a.webAudio||o&&o.disableWebAudio?new h(e,u,t.path,n,r.sound.locked):new l(e,u,t.path,s,r.sound.context):(console.warn("No supported url provided for audio '"+e+"'!"),null)},o.register("audio",function(t,e,i,n){var s=l.create(this,t,e,i,n);return s&&this.addFile(s),this}),l.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(92),r=i(0),o=i(58),a=i(327),h=i(328),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=l},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(825),Angular:i(826),Bounce:i(827),Debug:i(828),Drag:i(829),Enable:i(830),Friction:i(831),Gravity:i(832),Immovable:i(833),Mass:i(834),Size:i(835),Velocity:i(836)}},function(t,e,i){var n=i(92),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(u.x,u.y,l.right,l.y)-u.radius):u.y>l.bottom&&(u.xl.right&&(a=h(u.x,u.y,l.right,l.bottom)-u.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,f=t.mass,p=e.velocity.x,g=e.velocity.y,v=e.mass,y=c*Math.cos(o)+d*Math.sin(o),m=c*Math.sin(o)-d*Math.cos(o),x=p*Math.cos(o)+g*Math.sin(o),b=p*Math.sin(o)-g*Math.cos(o),w=((f-v)*y+2*v*x)/(f+v),T=(2*f*y+(v-f)*x)/(f+v);return t.immovable||(t.velocity.x=(w*Math.cos(o)-m*Math.sin(o))*t.bounce.x,t.velocity.y=(m*Math.cos(o)+w*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(T*Math.cos(o)-b*Math.sin(o))*e.bounce.x,e.velocity.y=(b*Math.cos(o)+T*Math.sin(o))*e.bounce.y,p=e.velocity.x,g=e.velocity.y),Math.abs(o)0&&!t.immovable&&p>c?t.velocity.x*=-1:p<0&&!e.immovable&&c0&&!t.immovable&&g>d?t.velocity.y*=-1:g<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&p0&&!e.immovable&&c>p?e.velocity.x*=-1:d<0&&!t.immovable&&g0&&!e.immovable&&c>g&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,l+=f}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p,v=e.getTilesWithinWorldXY(a,h,l,u);if(0===v.length)return!1;for(var y={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=(i(8),i(33)),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(162);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(45),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(344),o=i(345),a=i(350);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),l=i(899),u=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(36),r=i(352),o=i(23),a=i(19),h=i(75),l=i(322),u=i(353),c=i(45),d=i(97),f=i(101),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[l])return this.tilesets[l].setTileSize(i,n),this.tilesets[l].setSpacing(s,r),this.tilesets[l].setImage(h),this.tilesets[l];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var u=new f(t,o,i,n,s,r);return u.setImage(h),this.tilesets.push(u),u},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(102),h=i(4),l=i(156),u=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),S=[],A=l("value",f),C=c(p[0],"value",A.getEnd,A.getStart,m,g,v,T,x,b,w,!1,!1);C.start=d,C.current=d,C.to=f,S.push(C);var M=new u(t,S,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],P=u.TYPES,L=0;L0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(115),CameraManager:i(441)}},function(t,e,i){var n=i(115),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(37),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(37);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){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(46),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(126),o=i(34),a=i(503),h=i(504),l=i(507),u=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null};for(var n=0;n<=16;n++)this.blendModes.push({func:[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],equation:WebGLRenderingContext.FUNC_ADD});this.blendModes[1].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.DST_ALPHA],this.blendModes[2].func=[WebGLRenderingContext.DST_COLOR,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_COLOR],this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=null==l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null==o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this},deleteFramebuffer:function(t){return this},deleteProgram:function(t){return this},deleteBuffer:function(t){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){this.gl;var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;lthis.vertexCapacity&&this.flush();var b=this.renderer.config.resolution,w=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=r+a,C=o+h,M=m[0],E=m[1],_=m[2],P=m[3],L=d*M+f*_,k=d*E+f*P,F=p*M+g*_,R=p*E+g*P,O=v*M+y*_+m[4],B=v*E+y*P+m[5],D=r*L+o*F+O,I=r*k+o*R+B,Y=r*L+C*F+O,z=r*k+C*R+B,X=A*L+C*F+O,N=A*k+C*R+B,V=A*L+o*F+O,W=A*k+o*R+B,G=l.getTintAppendFloatAlphaAndSwap(u,c);x&&(D=(D*b|0)/b,I=(I*b|0)/b,Y=(Y*b|0)/b,z=(z*b|0)/b,X=(X*b|0)/b,N=(N*b|0)/b,V=(V*b|0)/b,W=(W*b|0)/b),w[S+0]=D,w[S+1]=I,T[S+2]=G,w[S+3]=Y,w[S+4]=z,T[S+5]=G,w[S+6]=X,w[S+7]=N,T[S+8]=G,w[S+9]=D,w[S+10]=I,T[S+11]=G,w[S+12]=X,w[S+13]=N,T[S+14]=G,w[S+15]=V,w[S+16]=W,T[S+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.renderer.config.resolution,S=this.vertexViewF32,A=this.vertexViewU32,C=this.vertexCount*this.vertexComponentCount,M=b[0],E=b[1],_=b[2],P=b[3],L=p*M+g*_,k=p*E+g*P,F=v*M+y*_,R=v*E+y*P,O=m*M+x*_+b[4],B=m*E+x*P+b[5],D=r*L+o*F+O,I=r*k+o*R+B,Y=a*L+h*F+O,z=a*k+h*R+B,X=u*L+c*F+O,N=u*k+c*R+B,V=l.getTintAppendFloatAlphaAndSwap(d,f);w&&(D=(D*T|0)/T,I=(I*T|0)/T,Y=(Y*T|0)/T,z=(z*T|0)/T,X=(X*T|0)/T,N=(N*T|0)/T),S[C+0]=D,S[C+1]=I,A[C+2]=V,S[C+3]=Y,S[C+4]=z,A[C+5]=V,S[C+6]=X,S[C+7]=N,A[C+8]=V,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,b,w){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=l,T[2].y=u,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,v,y,m,x,!1,b,w)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v,y){this.renderer.setPipeline(this);for(var m,x,b,w,T,S,A,C,M,E,_,P,L,k,F,R,O,B=this.renderer.config.resolution,D=o.length,I=this.polygonCache,Y=this.vertexViewF32,z=this.vertexViewU32,X=0,N=v[0],V=v[1],W=v[2],G=v[3],U=u*N+c*W,j=u*V+c*G,H=d*N+f*W,q=d*V+f*G,K=p*N+g*W+v[4],J=p*V+g*G+v[5],Z=l.getTintAppendFloatAlphaAndSwap(a,h),Q=0;Qthis.vertexCapacity&&this.flush(),X=this.vertexCount*this.vertexComponentCount,P=(S=I[b+0])*U+(A=I[b+1])*H+K,L=S*j+A*q+J,k=(C=I[w+0])*U+(M=I[w+1])*H+K,F=C*j+M*q+J,R=(E=I[T+0])*U+(_=I[T+1])*H+K,O=E*j+_*q+J,y&&(P=(P*B|0)/B,L=(L*B|0)/B,k=(k*B|0)/B,F=(F*B|0)/B,R=(R*B|0)/B,O=(O*B|0)/B),Y[X+0]=P,Y[X+1]=L,z[X+2]=Z,Y[X+3]=k,Y[X+4]=F,z[X+5]=Z,Y[X+6]=R,Y[X+7]=O,z[X+8]=Z,this.vertexCount+=3;I.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m){var x,b;this.renderer.setPipeline(this);for(var w,T,S,A,C=r.length,M=this.polygonCache,E=this.vertexViewF32,_=this.vertexViewU32,P=l.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=M[k-1]||M[F-1],T=M[k],E[(S=this.vertexCount*this.vertexComponentCount)+0]=w[6],E[S+1]=w[7],_[S+2]=P(w[8],h),E[S+3]=w[0],E[S+4]=w[1],_[S+5]=P(w[2],h),E[S+6]=T[9],E[S+7]=T[10],_[S+8]=P(T[11],h),E[S+9]=w[0],E[S+10]=w[1],_[S+11]=P(w[2],h),E[S+12]=w[6],E[S+13]=w[7],_[S+14]=P(w[8],h),E[S+15]=T[3],E[S+16]=T[4],_[S+17]=P(T[5],h),this.vertexCount+=6;M.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var S=this.renderer.config.resolution,A=w[0],C=w[1],M=w[2],E=w[3],_=g*A+v*M,P=g*C+v*E,L=y*A+m*M,k=y*C+m*E,F=x*A+b*M+w[4],R=x*C+b*E+w[5],O=this.vertexViewF32,B=this.vertexViewU32,D=a-r,I=h-o,Y=Math.sqrt(D*D+I*I),z=u*(h-o)/Y,X=u*(r-a)/Y,N=c*(h-o)/Y,V=c*(r-a)/Y,W=a-N,G=h-V,U=r-z,j=o-X,H=a+N,q=h+V,K=r+z,J=o+X,Z=W*_+G*L+F,Q=W*P+G*k+R,$=U*_+j*L+F,tt=U*P+j*k+R,et=H*_+q*L+F,it=H*P+q*k+R,nt=K*_+J*L+F,st=K*P+J*k+R,rt=l.getTintAppendFloatAlphaAndSwap,ot=rt(d,p),at=rt(f,p),ht=this.vertexCount*this.vertexComponentCount;return T&&(Z=(Z*S|0)/S,Q=(Q*S|0)/S,$=($*S|0)/S,tt=(tt*S|0)/S,et=(et*S|0)/S,it=(it*S|0)/S,nt=(nt*S|0)/S,st=(st*S|0)/S),O[ht+0]=Z,O[ht+1]=Q,B[ht+2]=at,O[ht+3]=$,O[ht+4]=tt,B[ht+5]=ot,O[ht+6]=et,O[ht+7]=it,B[ht+8]=at,O[ht+9]=$,O[ht+10]=tt,B[ht+11]=ot,O[ht+12]=nt,O[ht+13]=st,B[ht+14]=ot,O[ht+15]=et,O[ht+16]=it,B[ht+17]=at,this.vertexCount+=6,[Z,Q,f,$,tt,d,et,it,f,nt,st,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i=e.scrollX*t.scrollFactorX,n=e.scrollY*t.scrollFactorY,r=t.x-i,o=t.y-n,a=t.scaleX,h=t.scaleY,l=-t.rotation,u=t.commandBuffer,y=1,m=1,x=0,b=0,w=1,T=e.matrix.matrix,S=null,A=0,C=0,M=0,E=0,_=0,P=0,L=0,k=0,F=0,R=null,O=Math.sin,B=Math.cos,D=O(l),I=B(l),Y=I*a,z=-D*a,X=D*h,N=I*h,V=r,W=o,G=T[0],U=T[1],j=T[2],H=T[3],q=Y*G+z*j,K=Y*U+z*H,J=X*G+N*j,Z=X*U+N*H,Q=V*G+W*j+T[4],$=V*U+W*H+T[5],tt=e.roundPixels;v.length=0;for(var et=0,it=u.length;et0){var nt=S.points[0],st=S.points[S.points.length-1];S.points.push(nt),S=new d(st.x,st.y,st.width,st.rgb,st.alpha),v.push(S)}break;case s.FILL_PATH:for(var rt=0,ot=v.length;rt=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,b=0;br&&(m=w-r),T>o&&(x=T-o),t.add(b,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,b=e.x,w=s-b,T=s-(g-f-b),S=e.y,A=r-S,C=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=l,E=l,_=0,P=e.sourceIndex,L=0;L0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(540),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(541),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(38),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(620),DynamicBitmapText:i(621),Graphics:i(622),Group:i(623),Image:i(624),Particles:i(625),PathFollower:i(626),Sprite3D:i(627),Sprite:i(628),StaticBitmapText:i(629),Text:i(630),TileSprite:i(631),Zone:i(632)},Creators:{Blitter:i(633),DynamicBitmapText:i(634),Graphics:i(635),Group:i(636),Image:i(637),Particles:i(638),Sprite3D:i(639),Sprite:i(640),StaticBitmapText:i(641),Text:i(642),TileSprite:i(643),Zone:i(644)}};n.Mesh=i(89),n.Quad=i(141),n.Factories.Mesh=i(648),n.Factories.Quad=i(649),n.Creators.Mesh=i(650),n.Creators.Quad=i(651),n.Light=i(290),i(291),i(652),t.exports=n},function(t,e,i){var n=i(0),s=i(87),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(t,e){var i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){var s,r;for(s=0;s-1&&this._list.splice(o,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(545),s=i(546),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,b=0,w=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-l+e.frame.y),C.rotate(e.rotation),C.scale(e.scaleX,e.scaleY);for(var L=0;L0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode),t.currentAlpha;for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,l=0;l0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,b=0,w=0,T=0,S=0,A=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,P=a.cutY,L=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(564),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(567),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e,i){var n=this.x-t.x,s=this.y-t.y,r=n*n+s*s;if(0!==r){var o=Math.sqrt(r);r0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(0),s=(i(42),new n({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}}));t.exports=s},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(42),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i,n){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),l=i(280),u=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(36),r=i(43),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(609),s=i(610),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,b=y.canvasData,w=-m,T=-x;u.globalAlpha=v,u.save(),u.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),u.rotate(g.rotation),u.scale(g.scaleX,g.scaleY),u.drawImage(y.source.image,b.sx,b.sy,b.sWidth,b.sHeight,w,T,b.dWidth,b.dHeight),u.restore()}}u.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;e.resolution,t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(616),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){for(var i in void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(38);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(38);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(646),s=i(647),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(t,e,i,n){}},function(t,e,i){var n=i(89);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,key,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(89);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(654),n.Circumference=i(181),n.CircumferencePoint=i(105),n.Clone=i(655),n.Contains=i(32),n.ContainsPoint=i(656),n.ContainsRect=i(657),n.CopyFrom=i(658),n.Equals=i(659),n.GetBounds=i(660),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(661),n.OffsetPoint=i(662),n.Random=i(106),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(90),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(674),n.Clone=i(675),n.CopyFrom=i(676),n.Equals=i(677),n.GetMidPoint=i(678),n.GetNormal=i(679),n.GetPoint=i(300),n.GetPoints=i(109),n.Height=i(680),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(681),n.NormalY=i(682),n.Offset=i(683),n.PerpSlope=i(684),n.Random=i(111),n.ReflectAngle=i(685),n.Rotate=i(686),n.RotateAroundPoint=i(687),n.RotateAroundXY=i(143),n.SetToAngle=i(688),n.Slope=i(689),n.Width=i(690),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(692),n.Clone=i(693),n.CopyFrom=i(694),n.Equals=i(695),n.Floor=i(696),n.GetCentroid=i(697),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(698),n.Interpolate=i(699),n.Invert=i(700),n.Negative=i(701),n.Project=i(702),n.ProjectUnit=i(703),n.SetMagnitude=i(704),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(36);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var l=[];for(i=0;i1&&(this.sortGameObjects(l),this.topOnly&&l.splice(1)),this._drag[t.id]=l,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var u=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),u[0]?(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&u[0]&&(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(757),JustUp:i(758),DownDuration:i(759),UpDuration:i(760)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(782),Distance:i(790),Easing:i(793),Fuzzy:i(794),Interpolation:i(800),Pow2:i(803),Snap:i(805),Average:i(809),Bernstein:i(320),Between:i(226),CatmullRom:i(123),CeilTo:i(810),Clamp:i(60),DegToRad:i(36),Difference:i(811),Factorial:i(321),FloatBetween:i(273),FloorTo:i(812),FromPercent:i(64),GetSpeed:i(813),IsEven:i(814),IsEvenStrict:i(815),Linear:i(225),MaxAdd:i(816),MinSub:i(817),Percent:i(818),RadToDeg:i(216),RandomXY:i(819),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(113),RoundAwayFromZero:i(323),RoundTo:i(820),SinCosTableGenerator:i(821),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(822),Wrap:i(42),Vector2:i(6),Vector3:i(51),Vector4:i(120),Matrix3:i(208),Matrix4:i(119),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(783),BetweenY:i(784),BetweenPoints:i(785),BetweenPointsY:i(786),Reverse:i(787),RotateTo:i(788),ShortestBetween:i(789),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(806),Floor:i(807),To:i(808)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=l(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(u(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(839),s=i(841),r=i(335);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(842);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){var n=i(846);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){t.exports={Acceleration:i(953),BodyScale:i(954),BodyType:i(955),Bounce:i(956),CheckAgainst:i(957),Collides:i(958),Debug:i(959),Friction:i(960),Gravity:i(961),Offset:i(962),SetGameObject:i(963),Velocity:i(964)}},function(t,e,i){var n={};t.exports=n;var s=i(95),r=i(39);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(852),r=i(362),o=i(96);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(95);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(149),r=(i(163),i(39));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(84),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this._queue=[]},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(86),BaseSoundManager:i(85),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(87),Map:i(114),ProcessQueue:i(332),RTree:i(333),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(97),Parsers:i(892),Formats:i(19),ImageCollection:i(347),ParseToTilemap:i(154),Tile:i(45),Tilemap:i(351),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(101),LayerData:i(75),MapData:i(76),ObjectLayer:i(349),DynamicTilemapLayer:i(352),StaticTilemapLayer:i(353)}},function(t,e,i){var n=i(15),s=i(35);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(44),s=i(35),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(101);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(o,1),r.destroy()}for(s=0;s=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(t){},check:function(t){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(t){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(952),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var b=Math.floor((e+v)/f);if((l>0||u===b||b<0||b>=p)&&(b=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,b,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var C=Math.floor((i+w)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+T;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),b=g/x,w=-p/x,T=y*b+m*w,S=b*T,A=w*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:b,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(932),r=i(933),o=i(934),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s}});t.exports=a},function(t,e,i){var n=i(0),s=i(847),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(847),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(847),r=i(38),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(929),s=i(0),r=i(337),o=i(930),a=i(13),h=i(1),l=i(72),u=i(61),c=i(966),d=i(19),f=i(338),p=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new u,this.gravity=h(e,"gravity",0),this.cellSize=h(e,"cellSize",64),this.collisionMap=new o,this.timeScale=h(e,"timeScale",1),this.maxStep=h(e,"maxStep",.05),this.enabled=!0,this.drawDebug=h(e,"debug",!1),this.debugGraphic;var i=h(e,"maxVelocity",100);if(this.defaults={debugShowBody:h(e,"debugShowBody",!0),debugShowVelocity:h(e,"debugShowVelocity",!0),bodyDebugColor:h(e,"debugBodyColor",16711935),velocityDebugColor:h(e,"debugVelocityColor",65280),maxVelocityX:h(e,"maxVelocityX",i),maxVelocityY:h(e,"maxVelocityY",i),minBounceVelocity:h(e,"minBounceVelocity",40),gravityFactor:h(e,"gravityFactor",1),bounciness:h(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=h(n,"x",0),r=h(n,"y",0),l=h(n,"width",t.sys.game.config.width),c=h(n,"height",t.sys.game.config.height),d=h(n,"thickness",64),f=h(n,"left",!0),p=h(n,"right",!0),g=h(n,"top",!0),v=h(n,"bottom",!0);this.setBounds(s,r,l,c,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var k=0;kA&&(A+=e.length),S=Number.MAX_VALUE,A3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);r(f(t,e-1),f(t,e),f(t,e+1))||function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lv.bounds.max.x||b.bounds.max.yv.bounds.max.y)){var w=e(i,b);if(!b.region||w.id!==b.region.id||r){x.broadphaseTests+=1,b.region&&!r||(b.region=w);var T=t(w,b.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=w.startCol&&d<=w.endCol&&f>=w.startRow&&f<=w.endRow,A=d>=b.region.startCol&&d<=b.region.endCol&&f>=b.region.startRow&&f<=b.region.endRow;!S&&A&&A&&p&&u(i,p,b),(b.region===w||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,b))}b.region=w,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}}()},function(t,e,i){var n={};t.exports=n;var s=i(362),r=i(39);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a1e3&&h.push(r);for(r=0;rf.friction*f.frictionStatic*O*i&&(D=k,B=o.clamp(f.friction*F*i,-D,D));var I=r.cross(A,y),Y=r.cross(C,y),z=b/(g.inverseMass+v.inverseMass+g.inverseInertia*I*I+v.inverseInertia*Y*Y);if(R*=z,B*=z,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(L*L>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-D,D),B=T.tangentImpulse-N}s.x=y.x*R+m.x*B,s.y=y.y*R+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(855),r=i(339),o=i(944),a=i(943),h=i(984),l=i(942),u=i(162),c=i(149),d=i(163),f=i(39),p=i(59);!function(){n.create=function(t,e){e=(e=f.isElement(t)?e:t)||{},((t=f.isElement(t)?t:null)||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);return n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(n,s,l){s=s||1e3/60,l=l||1;var f,p=n.world,g=n.timing,v=n.broadphase,y=[];g.timestamp+=s*g.timeScale;var m={timestamp:g.timestamp};u.trigger(n,"beforeUpdate",m);var x=c.allBodies(p),b=c.allConstraints(p);for(h.reset(n.metrics),n.enableSleeping&&r.update(x,g.timeScale),e(x,p.gravity),i(x,s,g.timeScale,l,p.bounds),d.preSolveAll(x),f=0;f0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),c.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),c.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&d.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&d.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setZ(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return d.add(this.localWorld,o),o},add:function(t){return d.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return r.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return r.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(936),Image:i(939),Matter:i(853),MatterPhysics:i(986),PolyDecomp:i(937),Sprite:i(940),TileBody:i(850),World:i(946)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y Date: Fri, 16 Feb 2018 18:07:29 +0000 Subject: [PATCH 017/200] Updated eslint ignore to exclude 3rd party libs --- .eslintignore | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.eslintignore b/.eslintignore index ced7ba3cc..42a406249 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,8 +1,8 @@ -merge/Intro.js -merge/Outro.js -merge/plugins/path/ -merge/physics/p2/p2.js -merge/animation/creature/ -src/physics/matter-js/ -src/renderer/webgl/renderers/shapebatch/earcut.js -webpack.*.js +src/physics/matter-js/lib/ +src/polyfills/ +src/renderer/webgl/shaders/ +src/geom/polygon/Earcut.js +src/sound/ +src/utils/array/StableSort.js +src/utils/object/Extend.js +src/structs/RTree.js From e1554c34d69f9fa498bf5a2c09f1540aa71fcae0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:07:49 +0000 Subject: [PATCH 018/200] eslint fixes --- src/renderer/webgl/WebGLPipeline.js | 6 +- src/renderer/webgl/WebGLRenderer.js | 83 +++++----- .../webgl/pipelines/FlatTintPipeline.js | 14 +- .../webgl/pipelines/TextureTintPipeline.js | 156 ++++++++++-------- src/structs/Map.js | 2 + src/structs/Set.js | 2 + src/textures/TextureManager.js | 4 +- src/textures/parsers/Pyxel.js | 2 +- src/textures/parsers/UnityYAML.js | 20 ++- .../DynamicTilemapLayerWebGLRenderer.js | 2 +- .../staticlayer/StaticTilemapLayer.js | 8 +- src/time/Clock.js | 2 +- src/tweens/builders/index.js | 2 +- src/tweens/tween/Tween.js | 9 +- src/utils/array/matrix/MatrixToString.js | 4 +- 15 files changed, 172 insertions(+), 144 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 8675175cd..97312697d 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -155,7 +155,7 @@ var WebGLPipeline = new Class({ * [description] * * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {int} + * @type {integer} * @since 3.0.0 */ this.vertexSize = config.vertexSize; @@ -164,7 +164,7 @@ var WebGLPipeline = new Class({ * [description] * * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {int} + * @type {integer} * @since 3.0.0 */ this.topology = config.topology; @@ -182,7 +182,7 @@ var WebGLPipeline = new Class({ * This will store the amount of components of 32 bit length * * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {int} + * @type {integer} * @since 3.0.0 */ this.vertexComponentCount = Utils.getComponentCount(config.attributes); diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 28038c7e2..6bdbc740e 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -187,18 +187,17 @@ var WebGLRenderer = new Class({ this.blendModes[2].func = [ WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ]; this.blendModes[3].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_COLOR ]; - // Intenal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) + // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) /** * [description] * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit - * @type {int} + * @type {integer} * @since 3.1.0 */ this.currentActiveTextureUnit = 0; - /** * [description] * @@ -262,7 +261,7 @@ var WebGLRenderer = new Class({ * [description] * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentBlendMode - * @type {int} + * @type {integer} * @since 3.0.0 */ this.currentBlendMode = Infinity; @@ -618,10 +617,10 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setScissor * @since 3.0.0 * - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} w - [description] - * @param {int} h - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} w - [description] + * @param {integer} h - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -664,10 +663,10 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#pushScissor * @since 3.0.0 * - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} w - [description] - * @param {int} h - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} w - [description] + * @param {integer} h - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -744,7 +743,7 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode * @since 3.0.0 * - * @param {int} blendModeId - [description] + * @param {integer} blendModeId - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -815,7 +814,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {WebGLTexture} texture - [description] - * @param {int} textureUnit - [description] + * @param {integer} textureUnit - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -948,9 +947,9 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {object} source - [description] - * @param {int} width - [description] - * @param {int} height - [description] - * @param {int} scaleMode - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] + * @param {integer} scaleMode - [description] * * @return {WebGLTexture} [description] */ @@ -996,15 +995,15 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#createTexture2D * @since 3.0.0 * - * @param {int} mipLevel - [description] - * @param {int} minFilter - [description] - * @param {int} magFilter - [description] - * @param {int} wrapT - [description] - * @param {int} wrapS - [description] - * @param {int} format - [description] + * @param {integer} mipLevel - [description] + * @param {integer} minFilter - [description] + * @param {integer} magFilter - [description] + * @param {integer} wrapT - [description] + * @param {integer} wrapS - [description] + * @param {integer} format - [description] * @param {object} pixels - [description] - * @param {int} width - [description] - * @param {int} height - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] * @param {boolean} pma - [description] * * @return {WebGLTexture} [description] @@ -1053,8 +1052,8 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#createFramebuffer * @since 3.0.0 * - * @param {int} width - [description] - * @param {int} height - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] * @param {WebGLFramebuffer} renderTexture - [description] * @param {boolean} addDepthStencilBuffer - [description] * @@ -1152,7 +1151,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {ArrayBuffer} initialDataOrSize - [description] - * @param {int} bufferUsage - [description] + * @param {integer} bufferUsage - [description] * * @return {WebGLBuffer} [description] */ @@ -1175,7 +1174,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {ArrayBuffer} initialDataOrSize - [description] - * @param {int} bufferUsage - [description] + * @param {integer} bufferUsage - [description] * * @return {WebGLBuffer} [description] */ @@ -1465,7 +1464,7 @@ var WebGLRenderer = new Class({ * @param {HTMLCanvasElement} srcCanvas - [description] * @param {WebGLTexture} dstTexture - [description] * @param {boolean} shouldReallocate - [description] - * @param {int} scaleMode - [description] + * @param {integer} scaleMode - [description] * * @return {WebGLTexture} [description] */ @@ -1511,8 +1510,8 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setTextureFilter * @since 3.0.0 * - * @param {int} texture - [description] - * @param {int} filter - [description] + * @param {integer} texture - [description] + * @param {integer} filter - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -1621,7 +1620,7 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] + * @param {integer} x - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -1640,8 +1639,8 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -1660,9 +1659,9 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} z - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} z - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -1681,10 +1680,10 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} z - [description] - * @param {int} w - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} z - [description] + * @param {integer} w - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ diff --git a/src/renderer/webgl/pipelines/FlatTintPipeline.js b/src/renderer/webgl/pipelines/FlatTintPipeline.js index c56b04db4..26f83a442 100644 --- a/src/renderer/webgl/pipelines/FlatTintPipeline.js +++ b/src/renderer/webgl/pipelines/FlatTintPipeline.js @@ -187,7 +187,7 @@ var FlatTintPipeline = new Class({ * @param {float} y - [description] * @param {float} width - [description] * @param {float} height - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -287,7 +287,7 @@ var FlatTintPipeline = new Class({ * @param {float} y1 - [description] * @param {float} x2 - [description] * @param {float} y2 - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -373,7 +373,7 @@ var FlatTintPipeline = new Class({ * @param {float} x2 - [description] * @param {float} y2 - [description] * @param {float} lineWidth - [description] - * @param {int} lineColor - [description] + * @param {integer} lineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a - [description] * @param {float} b - [description] @@ -431,7 +431,7 @@ var FlatTintPipeline = new Class({ * @param {float} srcScaleY - [description] * @param {float} srcRotation - [description] * @param {float} path - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -547,7 +547,7 @@ var FlatTintPipeline = new Class({ * @param {float} srcRotation - [description] * @param {array} path - [description] * @param {float} lineWidth - [description] - * @param {int} lineColor - [description] + * @param {integer} lineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a - [description] * @param {float} b - [description] @@ -646,8 +646,8 @@ var FlatTintPipeline = new Class({ * @param {float} by - [description] * @param {float} aLineWidth - [description] * @param {float} bLineWidth - [description] - * @param {int} aLineColor - [description] - * @param {int} bLineColor - [description] + * @param {integer} aLineColor - [description] + * @param {integer} bLineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index b16da10e2..4305b49f3 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -7,7 +7,7 @@ var Class = require('../../../utils/Class'); var ModelViewProjection = require('./components/ModelViewProjection'); var ShaderSourceFS = require('../shaders/TextureTint.frag'); -var ShaderSourceVS = require('../shaders/TextureTint.vert'); +var ShaderSourceVS = require('../shaders/TextureTint.vert'); var Utils = require('../Utils'); var WebGLPipeline = require('../WebGLPipeline'); @@ -47,9 +47,9 @@ var TextureTintPipeline = new Class({ fragShader: (overrideFragmentShader ? overrideFragmentShader : ShaderSourceFS), vertexCapacity: 6 * 2000, - vertexSize: - Float32Array.BYTES_PER_ELEMENT * 2 + - Float32Array.BYTES_PER_ELEMENT * 2 + + vertexSize: + Float32Array.BYTES_PER_ELEMENT * 2 + + Float32Array.BYTES_PER_ELEMENT * 2 + Uint8Array.BYTES_PER_ELEMENT * 4, attributes: [ @@ -124,13 +124,16 @@ var TextureTintPipeline = new Class({ * @since 3.1.0 * * @param {WebGLTexture} texture - [description] - * @param {int} textureUnit - [description] + * @param {integer} textureUnit - [description] * * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] */ setTexture2D: function (texture, unit) { - if (!texture) return this; + if (!texture) + { + return this; + } var batches = this.batches; @@ -190,27 +193,32 @@ var TextureTintPipeline = new Class({ */ flush: function () { - if (this.flushLocked) return this; + if (this.flushLocked) + { + return this; + } + this.flushLocked = true; var gl = this.gl; var renderer = this.renderer; var vertexCount = this.vertexCount; - var vertexBuffer = this.vertexBuffer; - var vertexData = this.vertexData; var topology = this.topology; var vertexSize = this.vertexSize; var batches = this.batches; var batchCount = batches.length; var batchVertexCount = 0; var batch = null; - var nextBatch = null; + var batchNext; + var textureIndex; + var nTexture; - if (batchCount === 0 || vertexCount === 0) + if (batchCount === 0 || vertexCount === 0) { this.flushLocked = false; return this; } + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); for (var index = 0; index < batches.length - 1; ++index) @@ -220,20 +228,22 @@ var TextureTintPipeline = new Class({ if (batch.textures.length > 0) { - for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) { - var nTexture = batch.textures[textureIndex]; + nTexture = batch.textures[textureIndex]; + if (nTexture) { renderer.setTexture2D(nTexture, 1 + textureIndex); } } + gl.activeTexture(gl.TEXTURE0); } batchVertexCount = batchNext.first - batch.first; - if (batch.texture === null || batchVertexCount <= 0) continue; + if (batch.texture === null || batchVertexCount <= 0) { continue; } renderer.setTexture2D(batch.texture, 0); gl.drawArrays(topology, batch.first, batchVertexCount); @@ -244,14 +254,16 @@ var TextureTintPipeline = new Class({ if (batch.textures.length > 0) { - for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) { - var nTexture = batch.textures[textureIndex]; + nTexture = batch.textures[textureIndex]; + if (nTexture) { renderer.setTexture2D(nTexture, 1 + textureIndex); } } + gl.activeTexture(gl.TEXTURE0); } @@ -319,7 +331,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function (tilemap) { if (tilemap.vertexCount > 0) { @@ -363,7 +375,6 @@ var TextureTintPipeline = new Class({ var emitters = emitterManager.emitters.list; var emitterCount = emitters.length; - var getTint = Utils.getTintAppendFloatAlpha; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; @@ -556,15 +567,15 @@ var TextureTintPipeline = new Class({ var bob = list[batchOffset + index]; var frame = bob.frame; var alpha = bob.alpha; - var tint = getTint(0xffffff, bob.alpha); + var tint = getTint(0xffffff, alpha); var uvs = frame.uvs; var flipX = bob.flipX; var flipY = bob.flipY; - var width = frame.width * (flipX ? -1.0 : 1.0); + var width = frame.width * (flipX ? -1.0 : 1.0); var height = frame.height * (flipY ? -1.0 : 1.0); var x = blitterX + bob.x + frame.x + (frame.width * ((flipX) ? 1.0 : 0.0)); var y = blitterY + bob.y + frame.y + (frame.height * ((flipY) ? 1.0 : 0.0)); - var xw = x + width; + var xw = x + width; var yh = y + height; var tx0 = x * a + y * c + e; var ty0 = x * b + y * d + f; @@ -577,18 +588,14 @@ var TextureTintPipeline = new Class({ ty0 = ((ty0 * resolution)|0) / resolution; tx1 = ((tx1 * resolution)|0) / resolution; ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; } // Bind Texture if texture wasn't bound. // This needs to be here because of multiple // texture atlas. this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); - var vertexOffset = this.vertexCount * this.vertexComponentCount; + var vertexOffset = this.vertexCount * this.vertexComponentCount; vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -805,12 +812,6 @@ var TextureTintPipeline = new Class({ var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var cameraMatrix = camera.matrix.matrix; - var a = cameraMatrix[0]; - var b = cameraMatrix[1]; - var c = cameraMatrix[2]; - var d = cameraMatrix[3]; - var e = cameraMatrix[4]; - var f = cameraMatrix[5]; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; var translateX = mesh.x - camera.scrollX * mesh.scrollFactorX; @@ -934,6 +935,16 @@ var TextureTintPipeline = new Class({ var y = 0; var xw = 0; var yh = 0; + + var tx0; + var ty0; + var tx1; + var ty1; + var tx2; + var ty2; + var tx3; + var ty3; + var umin = 0; var umax = 0; var vmin = 0; @@ -1002,7 +1013,7 @@ var TextureTintPipeline = new Class({ { var kerningOffset = glyph.kerning[lastCharCode]; x += (kerningOffset !== undefined) ? kerningOffset : 0; - } + } xAdvance += glyph.xAdvance; indexCount += 1; @@ -1155,6 +1166,14 @@ var TextureTintPipeline = new Class({ var x = 0; var y = 0; var xw = 0; + var tx0; + var ty0; + var tx1; + var ty1; + var tx2; + var ty2; + var tx3; + var ty3; var yh = 0; var umin = 0; var umax = 0; @@ -1196,12 +1215,12 @@ var TextureTintPipeline = new Class({ if (crop) { renderer.pushScissor( - bitmapText.x, - bitmapText.y, - bitmapText.cropWidth * bitmapText.scaleX, + bitmapText.x, + bitmapText.y, + bitmapText.cropWidth * bitmapText.scaleX, bitmapText.cropHeight * bitmapText.scaleY ); - } + } for (var index = 0; index < textLength; ++index) { @@ -1254,21 +1273,21 @@ var TextureTintPipeline = new Class({ if (displayCallback) { - var output = displayCallback({ - color: 0, - tint: { - topLeft: tint0, - topRight: tint1, - bottomLeft: tint2, - bottomRight: tint3 - }, - index: index, - charCode: charCode, - x: x, - y: y, - scale: scale, - rotation: 0, - data: glyph.data + var output = displayCallback({ + color: 0, + tint: { + topLeft: tint0, + topRight: tint1, + bottomLeft: tint2, + bottomRight: tint3 + }, + index: index, + charCode: charCode, + x: x, + y: y, + scale: scale, + rotation: 0, + data: glyph.data }); x = output.x; @@ -1418,9 +1437,9 @@ var TextureTintPipeline = new Class({ text.scrollFactorX, text.scrollFactorY, text.displayOriginX, text.displayOriginY, 0, 0, text.canvasTexture.width, text.canvasTexture.height, - getTint(text._tintTL, text._alphaTL), - getTint(text._tintTR, text._alphaTR), - getTint(text._tintBL, text._alphaBL), + getTint(text._tintTL, text._alphaTL), + getTint(text._tintTR, text._alphaTR), + getTint(text._tintBL, text._alphaBL), getTint(text._tintBR, text._alphaBR), 0, 0, camera @@ -1480,7 +1499,7 @@ var TextureTintPipeline = new Class({ 0, 0, camera ); - } + } }, /** @@ -1499,7 +1518,7 @@ var TextureTintPipeline = new Class({ this.batchTexture( tileSprite, tileSprite.tileTexture, - tileSprite.frame.width, tileSprite.frame.height, + tileSprite.frame.width, tileSprite.frame.height, tileSprite.x, tileSprite.y, tileSprite.width, tileSprite.height, tileSprite.scaleX, tileSprite.scaleY, @@ -1508,11 +1527,11 @@ var TextureTintPipeline = new Class({ tileSprite.scrollFactorX, tileSprite.scrollFactorY, tileSprite.originX * tileSprite.width, tileSprite.originY * tileSprite.height, 0, 0, tileSprite.width, tileSprite.height, - getTint(tileSprite._tintTL, tileSprite._alphaTL), - getTint(tileSprite._tintTR, tileSprite._alphaTR), - getTint(tileSprite._tintBL, tileSprite._alphaBL), + getTint(tileSprite._tintTL, tileSprite._alphaTL), + getTint(tileSprite._tintTR, tileSprite._alphaTR), + getTint(tileSprite._tintBL, tileSprite._alphaBL), getTint(tileSprite._tintBR, tileSprite._alphaBR), - tileSprite.tilePositionX / tileSprite.frame.width, + tileSprite.tilePositionX / tileSprite.frame.width, tileSprite.tilePositionY / tileSprite.frame.height, camera ); @@ -1526,8 +1545,8 @@ var TextureTintPipeline = new Class({ * * @param {Phaser.GameObjects.GameObject} gameObject - [description] * @param {WebGLTexture} texture - [description] - * @param {int} textureWidth - [description] - * @param {int} textureHeight - [description] + * @param {integer} textureWidth - [description] + * @param {integer} textureHeight - [description] * @param {float} srcX - [description] * @param {float} srcY - [description] * @param {float} srcWidth - [description] @@ -1545,10 +1564,10 @@ var TextureTintPipeline = new Class({ * @param {float} frameY - [description] * @param {float} frameWidth - [description] * @param {float} frameHeight - [description] - * @param {int} tintTL - [description] - * @param {int} tintTR - [description] - * @param {int} tintBL - [description] - * @param {int} tintBR - [description] + * @param {integer} tintTL - [description] + * @param {integer} tintTR - [description] + * @param {integer} tintBL - [description] + * @param {integer} tintBR - [description] * @param {float} uOffset - [description] * @param {float} vOffset - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] @@ -1579,7 +1598,6 @@ var TextureTintPipeline = new Class({ flipY = flipY ^ (texture.isRenderTexture ? 1 : 0); rotation = -rotation; - var getTint = Utils.getTintAppendFloatAlpha; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; @@ -1687,7 +1705,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.GameObjects.Graphics} graphics - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchGraphics: function (graphics, camera) + batchGraphics: function () { // Stub } diff --git a/src/structs/Map.js b/src/structs/Map.js index 8b31e2852..ceabf0a98 100644 --- a/src/structs/Map.js +++ b/src/structs/Map.js @@ -219,6 +219,7 @@ var Map = new Class({ { var entries = this.entries; + // eslint-disable-next-line no-use-before-define console.group('Map'); for (var key in entries) @@ -226,6 +227,7 @@ var Map = new Class({ console.log(key, entries[key]); } + // eslint-disable-next-line no-use-before-define console.groupEnd(); }, diff --git a/src/structs/Set.js b/src/structs/Set.js index 5bab777cd..ebf826cb8 100644 --- a/src/structs/Set.js +++ b/src/structs/Set.js @@ -129,6 +129,7 @@ var Set = new Class({ */ dump: function () { + // eslint-disable-next-line no-use-before-define console.group('Set'); for (var i = 0; i < this.entries.length; i++) @@ -137,6 +138,7 @@ var Set = new Class({ console.log(entry); } + // eslint-disable-next-line no-use-before-define console.groupEnd(); }, diff --git a/src/textures/TextureManager.js b/src/textures/TextureManager.js index ea3cfb622..91ad16486 100644 --- a/src/textures/TextureManager.js +++ b/src/textures/TextureManager.js @@ -688,8 +688,8 @@ var TextureManager = new Class({ // if (textureFrame.trimmed) // { - // x -= this.sprite.texture.trim.x; - // y -= this.sprite.texture.trim.y; + // x -= this.sprite.texture.trim.x; + // y -= this.sprite.texture.trim.y; // } var context = this._tempContext; diff --git a/src/textures/parsers/Pyxel.js b/src/textures/parsers/Pyxel.js index 5fc80f35d..304995d1a 100644 --- a/src/textures/parsers/Pyxel.js +++ b/src/textures/parsers/Pyxel.js @@ -54,7 +54,7 @@ var Pyxel = function (texture, json) frames[i].y, tilewidth, tileheight, - "frame_" + i // No names are included in pyxel tilemap data. + 'frame_' + i // No names are included in pyxel tilemap data. )); // No trim data is included. diff --git a/src/textures/parsers/UnityYAML.js b/src/textures/parsers/UnityYAML.js index 337cca65a..0c9c7ef74 100644 --- a/src/textures/parsers/UnityYAML.js +++ b/src/textures/parsers/UnityYAML.js @@ -12,7 +12,9 @@ var addFrame = function (texture, sourceIndex, name, frame) var y = imageHeight - frame.y - frame.height; - var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); + // var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); + + texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); // console.log('name', name, 'rect', frame.x, y, frame.width, frame.height); @@ -61,8 +63,8 @@ var UnityYAML = function (texture, sourceIndex, yaml) var prevSprite = ''; var currentSprite = ''; var rect = { x: 0, y: 0, width: 0, height: 0 }; - var pivot = { x: 0, y: 0 }; - var border = { x: 0, y: 0, z: 0, w: 0 }; + // var pivot = { x: 0, y: 0 }; + // var border = { x: 0, y: 0, z: 0, w: 0 }; for (var i = 0; i < data.length; i++) { @@ -105,13 +107,13 @@ var UnityYAML = function (texture, sourceIndex, yaml) rect[key] = parseInt(value, 10); break; - case 'pivot': - pivot = eval('var obj = ' + value); - break; + // case 'pivot': + // pivot = eval('var obj = ' + value); + // break; - case 'border': - border = eval('var obj = ' + value); - break; + // case 'border': + // border = eval('var obj = ' + value); + // break; } } diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js index be8575206..fd1a115e1 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js @@ -29,7 +29,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer src.cull(camera); - this.pipeline.batchDynamicTilemapLayer(src, camera); + this.pipeline.batchDynamicTilemapLayer(src, camera); }; module.exports = DynamicTilemapLayerWebGLRenderer; diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index 1e270e675..fc0da77ba 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -205,7 +205,7 @@ var StaticTilemapLayer = new Class({ * * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object. */ - contextRestore: function (renderer) + contextRestore: function () { this.dirty = true; this.vertexBuffer = null; @@ -330,13 +330,13 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (this.vertexBuffer === null) + if (vertexBuffer === null) { - this.vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); } else { - renderer.setVertexBuffer(this.vertexBuffer); + renderer.setVertexBuffer(vertexBuffer); gl.bufferSubData(gl.ARRAY_BUFFER, 0, bufferData); } } diff --git a/src/time/Clock.js b/src/time/Clock.js index c4743ea4a..26faeed56 100644 --- a/src/time/Clock.js +++ b/src/time/Clock.js @@ -206,7 +206,7 @@ var Clock = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time, delta) + preUpdate: function (time) { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; diff --git a/src/tweens/builders/index.js b/src/tweens/builders/index.js index 6ae9a90af..16cd7aba6 100644 --- a/src/tweens/builders/index.js +++ b/src/tweens/builders/index.js @@ -19,6 +19,6 @@ module.exports = { GetValueOp: require('./GetValueOp'), NumberTweenBuilder: require('./NumberTweenBuilder'), TimelineBuilder: require('./TimelineBuilder'), - TweenBuilder: require('./TweenBuilder'), + TweenBuilder: require('./TweenBuilder') }; diff --git a/src/tweens/tween/Tween.js b/src/tweens/tween/Tween.js index 6784b6f31..9a359d746 100644 --- a/src/tweens/tween/Tween.js +++ b/src/tweens/tween/Tween.js @@ -774,7 +774,7 @@ var Tween = new Class({ ms -= tweenData.delay; ms -= tweenData.t1; - var repeats = Math.floor(ms / tweenData.t2); + // var repeats = Math.floor(ms / tweenData.t2); // remainder ms = ((ms / tweenData.t2) % 1) * tweenData.t2; @@ -793,7 +793,12 @@ var Tween = new Class({ tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); - // console.log(tweenData.key, 'Seek', tweenData.target[tweenData.key], 'to', tweenData.current, 'pro', tweenData.progress, 'marker', marker, progress); + // console.log(tweenData.key, 'Seek', tweenData.target[tweenData.key], 'to', tweenData.current, 'pro', tweenData.progress, 'marker', toPosition, progress); + + // if (tweenData.current === 0) + // { + // console.log('zero', tweenData.start, tweenData.end, v, 'progress', progress); + // } tweenData.target[tweenData.key] = tweenData.current; } diff --git a/src/utils/array/matrix/MatrixToString.js b/src/utils/array/matrix/MatrixToString.js index 82dd05b32..450a92632 100644 --- a/src/utils/array/matrix/MatrixToString.js +++ b/src/utils/array/matrix/MatrixToString.js @@ -20,8 +20,8 @@ var CheckMatrix = require('./CheckMatrix'); * * @return {string} [description] */ - var MatrixToString = function (matrix) - { +var MatrixToString = function (matrix) +{ var str = ''; if (!CheckMatrix(matrix)) From 86f00eeb52a5ba6e9a2a0ef41e34f050a848604a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:17:51 +0000 Subject: [PATCH 019/200] eslint fixes --- .eslintignore | 1 + src/actions/GridAlign.js | 3 +- src/cameras/sprite3d/Camera.js | 4 +- src/display/mask/index.js | 4 +- src/gameobjects/bitmaptext/ParseRetroFont.js | 22 +++---- .../bitmaptext/ParseXMLBitmapFont.js | 4 +- .../static/BitmapTextCanvasRenderer.js | 1 + .../bitmaptext/static/BitmapTextCreator.js | 1 + src/gameobjects/components/Animation.js | 4 +- src/gameobjects/particles/ParticleEmitter.js | 2 +- src/gameobjects/quad/Quad.js | 16 ++--- src/gameobjects/text/static/Text.js | 3 +- .../text/static/TextCanvasRenderer.js | 3 +- src/gameobjects/tilesprite/TileSprite.js | 3 +- src/geom/intersects/TriangleToCircle.js | 2 +- src/geom/rectangle/ContainsRect.js | 2 +- src/geom/rectangle/MarchingAnts.js | 1 + src/geom/rectangle/Overlaps.js | 6 +- src/geom/triangle/BuildRight.js | 2 +- .../gamepad/configs/XBox360_Controller.js | 2 +- .../RandomDataGenerator.js | 2 +- src/physics/arcade/World.js | 5 +- src/physics/matter-js/World.js | 21 +++--- src/physics/matter-js/components/Collision.js | 2 +- src/physics/matter-js/components/Sleep.js | 6 +- src/renderer/canvas/utils/DrawImage.js | 1 + src/renderer/webgl/WebGLPipeline.js | 4 +- src/renderer/webgl/WebGLRenderer.js | 66 ++++++++++--------- .../webgl/pipelines/BitmapMaskPipeline.js | 4 +- .../webgl/pipelines/FlatTintPipeline.js | 41 ++++++++---- .../pipelines/ForwardDiffuseLightPipeline.js | 2 +- .../components/ModelViewProjection.js | 14 ++-- src/textures/parsers/UnityYAML.js | 1 + 33 files changed, 145 insertions(+), 110 deletions(-) diff --git a/.eslintignore b/.eslintignore index 42a406249..a249b8a8d 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ src/physics/matter-js/lib/ +src/physics/matter-js/poly-decomp/ src/polyfills/ src/renderer/webgl/shaders/ src/geom/polygon/Earcut.js diff --git a/src/actions/GridAlign.js b/src/actions/GridAlign.js index 0487fc581..61ee2590e 100644 --- a/src/actions/GridAlign.js +++ b/src/actions/GridAlign.js @@ -32,6 +32,7 @@ var GridAlign = function (items, options) var position = GetValue(options, 'position', CONST.TOP_LEFT); var x = GetValue(options, 'x', 0); var y = GetValue(options, 'y', 0); + // var centerX = GetValue(options, 'centerX', null); // var centerY = GetValue(options, 'centerY', null); @@ -43,7 +44,7 @@ var GridAlign = function (items, options) // If the Grid is centered on a position then we need to calculate it now // if (centerX !== null && centerY !== null) // { - // + // // } tempZone.setPosition(x, y); diff --git a/src/cameras/sprite3d/Camera.js b/src/cameras/sprite3d/Camera.js index 4ec2a3d20..d8cc63d4f 100644 --- a/src/cameras/sprite3d/Camera.js +++ b/src/cameras/sprite3d/Camera.js @@ -892,8 +892,8 @@ var Camera = new Class({ { if (out === undefined) { out = new Vector2(); } - //TODO: optimize this with a simple distance calculation: - //https://developer.valvesoftware.com/wiki/Field_of_View + // TODO: optimize this with a simple distance calculation: + // https://developer.valvesoftware.com/wiki/Field_of_View if (this.billboardMatrixDirty) { diff --git a/src/display/mask/index.js b/src/display/mask/index.js index 387624029..2a2802661 100644 --- a/src/display/mask/index.js +++ b/src/display/mask/index.js @@ -10,7 +10,7 @@ module.exports = { - BitmapMask: require('./BitmapMask'), - GeometryMask: require('./GeometryMask') + BitmapMask: require('./BitmapMask'), + GeometryMask: require('./GeometryMask') }; diff --git a/src/gameobjects/bitmaptext/ParseRetroFont.js b/src/gameobjects/bitmaptext/ParseRetroFont.js index ff09c729c..fc41f325a 100644 --- a/src/gameobjects/bitmaptext/ParseRetroFont.js +++ b/src/gameobjects/bitmaptext/ParseRetroFont.js @@ -114,76 +114,76 @@ var ParseRetroFont = function (scene, config) * @constant * @type {string} */ -ParseRetroFont.TEXT_SET1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; +ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; /** * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET2 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; +ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '; /** * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"; +ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789'; /** * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET5 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789"; +ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789'; /** * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' * @constant * @type {string} */ -ParseRetroFont.TEXT_SET6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' "; +ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' '; /** * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET7 = "AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39"; +ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39'; /** * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET8 = "0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! * @constant * @type {string} */ -ParseRetroFont.TEXT_SET9 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!"; +ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!'; /** * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET10 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET11 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"; +ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789'; module.exports = ParseRetroFont; diff --git a/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js b/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js index a8fd14796..233e109aa 100644 --- a/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js +++ b/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js @@ -56,13 +56,13 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) // if (gx + gw > frame.width) // { // diff = frame.width - (gx + gw); - // gw -= diff; + // gw -= diff; // } // if (gy + gh > frame.height) // { // diff = frame.height - (gy + gh); - // gh -= diff; + // gh -= diff; // } if (gx < left) diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js index ea403282c..be5c6cbba 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js @@ -144,6 +144,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, ctx.save(); ctx.translate(x, y); ctx.scale(scale, scale); + // ctx.fillRect(0, 0, glyphW, glyphH); ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH); ctx.restore(); diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCreator.js b/src/gameobjects/bitmaptext/static/BitmapTextCreator.js index 1fcadffdc..4bc8b349c 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCreator.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCreator.js @@ -27,6 +27,7 @@ GameObjectCreator.register('bitmapText', function (config) var font = GetValue(config, 'font', ''); var text = GetAdvancedValue(config, 'text', ''); var size = GetAdvancedValue(config, 'size', false); + // var align = GetValue(config, 'align', 'left'); var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size); diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index be07b6d77..11065a5df 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -658,8 +658,8 @@ var Animation = new Class({ return this; }, - // Scale the time (make it go faster / slower) - // Factor that's used to scale time where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + // Scale the time (make it go faster / slower) + // Factor that's used to scale time where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. /** * [description] diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index 2f81cb1bd..bbcee2a8c 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -942,7 +942,7 @@ var ParticleEmitter = new Class({ if (this._frameCounter === this.frameQuantity) { this._frameCounter = 0; - this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); + this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); } return frame; diff --git a/src/gameobjects/quad/Quad.js b/src/gameobjects/quad/Quad.js index fdf10ef74..98f3eddac 100644 --- a/src/gameobjects/quad/Quad.js +++ b/src/gameobjects/quad/Quad.js @@ -46,37 +46,37 @@ var Quad = new Class({ // | \ // 1----2 - var vertices = [ + var vertices = [ 0, 0, // tl 0, 0, // bl 0, 0, // br 0, 0, // tl 0, 0, // br - 0, 0 // tr + 0, 0 // tr ]; - var uv = [ + var uv = [ 0, 0, // tl 0, 1, // bl 1, 1, // br 0, 0, // tl 1, 1, // br - 1, 0 // tr + 1, 0 // tr ]; - var colors = [ + var colors = [ 0xffffff, // tl 0xffffff, // bl 0xffffff, // br 0xffffff, // tl 0xffffff, // br - 0xffffff // tr + 0xffffff // tr ]; - var alphas = [ + var alphas = [ 1, // tl 1, // bl 1, // br 1, // tl 1, // br - 1 // tr + 1 // tr ]; Mesh.call(this, scene, x, y, vertices, uv, colors, alphas, texture, frame); diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index 52cb9de7e..aa5244c3a 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -959,7 +959,8 @@ var Text = new Class({ } context.save(); - //context.scale(resolution, resolution); + + // context.scale(resolution, resolution); if (style.backgroundColor) { diff --git a/src/gameobjects/text/static/TextCanvasRenderer.js b/src/gameobjects/text/static/TextCanvasRenderer.js index 83b8028ac..dfa64ee15 100644 --- a/src/gameobjects/text/static/TextCanvasRenderer.js +++ b/src/gameobjects/text/static/TextCanvasRenderer.js @@ -53,7 +53,8 @@ var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camer var canvas = src.canvas; ctx.save(); - //ctx.scale(1.0 / resolution, 1.0 / resolution); + + // ctx.scale(1.0 / resolution, 1.0 / resolution); ctx.translate(src.x - camera.scrollX * src.scrollFactorX, src.y - camera.scrollY * src.scrollFactorY); ctx.rotate(src.rotation); ctx.scale(src.scaleX, src.scaleY); diff --git a/src/gameobjects/tilesprite/TileSprite.js b/src/gameobjects/tilesprite/TileSprite.js index b255fb5c3..687f16ca5 100644 --- a/src/gameobjects/tilesprite/TileSprite.js +++ b/src/gameobjects/tilesprite/TileSprite.js @@ -177,7 +177,8 @@ var TileSprite = new Class({ this.updateTileTexture(); - scene.sys.game.renderer.onContextRestored(function (renderer) { + scene.sys.game.renderer.onContextRestored(function (renderer) + { this.tileTexture = null; this.dirty = true; this.tileTexture = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.canvasBuffer, this.potWidth, this.potHeight); diff --git a/src/geom/intersects/TriangleToCircle.js b/src/geom/intersects/TriangleToCircle.js index ea29dfa22..ee6de1513 100644 --- a/src/geom/intersects/TriangleToCircle.js +++ b/src/geom/intersects/TriangleToCircle.js @@ -20,7 +20,7 @@ var Contains = require('../triangle/Contains'); */ var TriangleToCircle = function (triangle, circle) { - // First the cheapest ones: + // First the cheapest ones: if ( triangle.left > circle.right || diff --git a/src/geom/rectangle/ContainsRect.js b/src/geom/rectangle/ContainsRect.js index a9c6f33f2..ea9cc67ba 100644 --- a/src/geom/rectangle/ContainsRect.js +++ b/src/geom/rectangle/ContainsRect.js @@ -28,7 +28,7 @@ var ContainsRect = function (rectA, rectB) return ( (rectB.x > rectA.x && rectB.x < rectA.right) && (rectB.right > rectA.x && rectB.right < rectA.right) && - (rectB.y > rectA.y && rectB.y < rectA.bottom) && + (rectB.y > rectA.y && rectB.y < rectA.bottom) && (rectB.bottom > rectA.y && rectB.bottom < rectA.bottom) ); }; diff --git a/src/geom/rectangle/MarchingAnts.js b/src/geom/rectangle/MarchingAnts.js index 11a3ad2bc..7dab33077 100644 --- a/src/geom/rectangle/MarchingAnts.js +++ b/src/geom/rectangle/MarchingAnts.js @@ -56,6 +56,7 @@ var MarchingAnts = function (rect, step, quantity, out) switch (face) { + // Top face case 0: x += step; diff --git a/src/geom/rectangle/Overlaps.js b/src/geom/rectangle/Overlaps.js index eab976553..1fbb93116 100644 --- a/src/geom/rectangle/Overlaps.js +++ b/src/geom/rectangle/Overlaps.js @@ -18,9 +18,9 @@ var Overlaps = function (rectA, rectB) { return ( - rectA.x < rectB.right && - rectA.right > rectB.x && - rectA.y < rectB.bottom && + rectA.x < rectB.right && + rectA.right > rectB.x && + rectA.y < rectB.bottom && rectA.bottom > rectB.y ); }; diff --git a/src/geom/triangle/BuildRight.js b/src/geom/triangle/BuildRight.js index 1b82b299b..3cb04b2cd 100644 --- a/src/geom/triangle/BuildRight.js +++ b/src/geom/triangle/BuildRight.js @@ -25,7 +25,7 @@ var Triangle = require('./Triangle'); */ var BuildRight = function (x, y, width, height) { - if (height === undefined) { height = width; } + if (height === undefined) { height = width; } // 90 degree angle var x1 = x; diff --git a/src/input/gamepad/configs/XBox360_Controller.js b/src/input/gamepad/configs/XBox360_Controller.js index d35976c2a..c64bd7ab6 100644 --- a/src/input/gamepad/configs/XBox360_Controller.js +++ b/src/input/gamepad/configs/XBox360_Controller.js @@ -43,4 +43,4 @@ module.exports = { RIGHT_STICK_H: 2, RIGHT_STICK_V: 3 -}; \ No newline at end of file +}; diff --git a/src/math/random-data-generator/RandomDataGenerator.js b/src/math/random-data-generator/RandomDataGenerator.js index 7d482c03a..b720aa7a0 100644 --- a/src/math/random-data-generator/RandomDataGenerator.js +++ b/src/math/random-data-generator/RandomDataGenerator.js @@ -309,7 +309,7 @@ var RandomDataGenerator = new Class({ var a = ''; var b = ''; - for (b = a = ''; a++ < 36; b +=~a % 5 | a*3 & 4 ? (a^15 ? 8 ^ this.frac()*(a^20 ? 16 : 4) : 4).toString(16) : '-') + for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') { } diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 058fc0466..f31938d2d 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1388,6 +1388,7 @@ var World = new Class({ return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } } + // GROUPS else if (object1.isParent) { @@ -1404,6 +1405,7 @@ var World = new Class({ return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } } + // TILEMAP LAYERS else if (object1.isTilemap) { @@ -1546,7 +1548,8 @@ var World = new Class({ { if (children[i].body) { - if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) { + if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) + { didCollide = true; } } diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index c39ddf589..0384dbfc2 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -172,19 +172,22 @@ var World = new Class({ var _this = this; var engine = this.engine; - MatterEvents.on(engine, 'beforeUpdate', function (event) { + MatterEvents.on(engine, 'beforeUpdate', function (event) + { _this.emit('beforeupdate', event); }); - MatterEvents.on(engine, 'afterUpdate', function (event) { + MatterEvents.on(engine, 'afterUpdate', function (event) + { _this.emit('afterupdate', event); }); - MatterEvents.on(engine, 'collisionStart', function (event) { + MatterEvents.on(engine, 'collisionStart', function (event) + { var pairs = event.pairs; var bodyA; @@ -200,7 +203,8 @@ var World = new Class({ }); - MatterEvents.on(engine, 'collisionActive', function (event) { + MatterEvents.on(engine, 'collisionActive', function (event) + { var pairs = event.pairs; var bodyA; @@ -216,7 +220,8 @@ var World = new Class({ }); - MatterEvents.on(engine, 'collisionEnd', function (event) { + MatterEvents.on(engine, 'collisionEnd', function (event) + { var pairs = event.pairs; var bodyA; @@ -480,9 +485,7 @@ var World = new Class({ convertTilemapLayer: function (tilemapLayer, options) { var layerData = tilemapLayer.layer; - var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, { - isColliding: true - }); + var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, {isColliding: true}); this.convertTiles(tiles, options); @@ -663,7 +666,7 @@ var World = new Class({ var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig; - path.replace(pathPattern, function(match, x, y) + path.replace(pathPattern, function (match, x, y) { points.push({ x: parseFloat(x), y: parseFloat(y) }); }); diff --git a/src/physics/matter-js/components/Collision.js b/src/physics/matter-js/components/Collision.js index 39ededc90..0a0c39e00 100644 --- a/src/physics/matter-js/components/Collision.js +++ b/src/physics/matter-js/components/Collision.js @@ -75,7 +75,7 @@ var Collision = { this.body.collisionFilter.mask = flags; return this; - }, + } }; diff --git a/src/physics/matter-js/components/Sleep.js b/src/physics/matter-js/components/Sleep.js index ae915a913..15bf9fd35 100644 --- a/src/physics/matter-js/components/Sleep.js +++ b/src/physics/matter-js/components/Sleep.js @@ -68,7 +68,8 @@ var Sleep = { { var world = this.world; - MatterEvents.on(this.body, 'sleepStart', function (event) { + MatterEvents.on(this.body, 'sleepStart', function (event) + { world.emit('sleepstart', event, this); }); } @@ -96,7 +97,8 @@ var Sleep = { { var world = this.world; - MatterEvents.on(this.body, 'sleepEnd', function (event) { + MatterEvents.on(this.body, 'sleepEnd', function (event) + { world.emit('sleepend', event, this); }); } diff --git a/src/renderer/canvas/utils/DrawImage.js b/src/renderer/canvas/utils/DrawImage.js index 0f4f86980..3664ef4dd 100644 --- a/src/renderer/canvas/utils/DrawImage.js +++ b/src/renderer/canvas/utils/DrawImage.js @@ -40,6 +40,7 @@ var DrawImage = function (src, camera) if (this.currentScaleMode !== src.scaleMode) { this.currentScaleMode = src.scaleMode; + // ctx[this.smoothProperty] = (source.scaleMode === ScaleModes.LINEAR); } diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 97312697d..f2d47aacb 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -338,7 +338,7 @@ var WebGLPipeline = new Class({ */ flush: function () { - if (this.flushLocked) return this; + if (this.flushLocked) { return this; } this.flushLocked = true; var gl = this.gl; @@ -348,7 +348,7 @@ var WebGLPipeline = new Class({ var topology = this.topology; var vertexSize = this.vertexSize; - if (vertexCount === 0) + if (vertexCount === 0) { this.flushLocked = false; return; diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 6bdbc740e..d0a5f7abb 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -183,9 +183,9 @@ var WebGLRenderer = new Class({ this.blendModes.push({ func: [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ], equation: WebGLRenderingContext.FUNC_ADD }); } - this.blendModes[1].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.DST_ALPHA ]; - this.blendModes[2].func = [ WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ]; - this.blendModes[3].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_COLOR ]; + this.blendModes[1].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.DST_ALPHA ]; + this.blendModes[2].func = [ WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ]; + this.blendModes[3].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_COLOR ]; // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) @@ -283,7 +283,7 @@ var WebGLRenderer = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.currentScissor = new Uint32Array([0, 0, this.width, this.height]); + this.currentScissor = new Uint32Array([ 0, 0, this.width, this.height ]); /** * [description] @@ -302,11 +302,12 @@ var WebGLRenderer = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.scissorStack = new Uint32Array(4 * 1000); + this.scissorStack = new Uint32Array(4 * 1000); // Setup context lost and restore event listeners - this.canvas.addEventListener('webglcontextlost', function (event) { + this.canvas.addEventListener('webglcontextlost', function (event) + { renderer.contextLost = true; event.preventDefault(); @@ -317,7 +318,8 @@ var WebGLRenderer = new Class({ } }, false); - this.canvas.addEventListener('webglcontextrestored', function (event) { + this.canvas.addEventListener('webglcontextrestored', function (event) + { renderer.contextLost = false; renderer.init(renderer.config); for (var index = 0; index < renderer.restoredContextCallbacks.length; ++index) @@ -469,7 +471,7 @@ var WebGLRenderer = new Class({ */ onContextRestored: function (callback, target) { - this.restoredContextCallbacks.push([callback, target]); + this.restoredContextCallbacks.push([ callback, target ]); return this; }, @@ -486,7 +488,7 @@ var WebGLRenderer = new Class({ */ onContextLost: function (callback, target) { - this.lostContextCallbacks.push([callback, target]); + this.lostContextCallbacks.push([ callback, target ]); return this; }, @@ -517,7 +519,7 @@ var WebGLRenderer = new Class({ */ getExtension: function (extensionName) { - if (!this.hasExtension(extensionName)) return null; + if (!this.hasExtension(extensionName)) { return null; } if (!(extensionName in this.extensions)) { @@ -602,8 +604,8 @@ var WebGLRenderer = new Class({ */ addPipeline: function (pipelineName, pipelineInstance) { - if (!this.hasPipeline(pipelineName)) this.pipelines[pipelineName] = pipelineInstance; - else console.warn('Pipeline', pipelineName, ' already exists.'); + if (!this.hasPipeline(pipelineName)) { this.pipelines[pipelineName] = pipelineInstance; } + else { console.warn('Pipeline', pipelineName, ' already exists.'); } pipelineInstance.name = pipelineName; this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); @@ -630,9 +632,9 @@ var WebGLRenderer = new Class({ var currentScissor = this.currentScissor; var enabled = (x == 0 && y == 0 && w == gl.canvas.width && h == gl.canvas.height && w >= 0 && h >= 0); - if (currentScissor[0] !== x || - currentScissor[1] !== y || - currentScissor[2] !== w || + if (currentScissor[0] !== x || + currentScissor[1] !== y || + currentScissor[2] !== w || currentScissor[3] !== h) { this.flush(); @@ -706,7 +708,7 @@ var WebGLRenderer = new Class({ var h = scissorStack[stackIndex + 3]; this.currentScissorIdx = stackIndex; - this.setScissor(x, y, w, h); + this.setScissor(x, y, w, h); return this; }, @@ -954,7 +956,7 @@ var WebGLRenderer = new Class({ * @return {WebGLTexture} [description] */ createTextureFromSource: function (source, width, height, scaleMode) - { + { var gl = this.gl; var filter = gl.NEAREST; var wrap = gl.CLAMP_TO_EDGE; @@ -1013,7 +1015,7 @@ var WebGLRenderer = new Class({ var gl = this.gl; var texture = gl.createTexture(); - pma = (pma === undefined || pma === null) ? true : pma; + pma = (pma === undefined || pma === null) ? true : pma; this.setTexture2D(texture, 0); @@ -1272,12 +1274,12 @@ var WebGLRenderer = new Class({ var FlatTintPipeline = this.pipelines.FlatTintPipeline; FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0), color.alphaGL, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); FlatTintPipeline.flush(); @@ -1300,22 +1302,22 @@ var WebGLRenderer = new Class({ // Fade FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(camera._fadeRed, camera._fadeGreen, camera._fadeBlue, 1.0), camera._fadeAlpha, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); // Flash FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(camera._flashRed, camera._flashGreen, camera._flashBlue, 1.0), camera._flashAlpha, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); FlatTintPipeline.flush(); @@ -1332,7 +1334,7 @@ var WebGLRenderer = new Class({ */ preRender: function () { - if (this.contextLost) return; + if (this.contextLost) { return; } var gl = this.gl; var color = this.config.backgroundColor; @@ -1342,7 +1344,7 @@ var WebGLRenderer = new Class({ gl.clearColor(color.redGL, color.greenGL, color.blueGL, color.alphaGL); if (this.config.clearBeforeRender) - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + { gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); } for (var key in pipelines) { @@ -1363,7 +1365,7 @@ var WebGLRenderer = new Class({ */ render: function (scene, children, interpolationPercentage, camera) { - if (this.contextLost) return; + if (this.contextLost) { return; } var gl = this.gl; var list = children.list; @@ -1417,7 +1419,7 @@ var WebGLRenderer = new Class({ */ postRender: function () { - if (this.contextLost) return; + if (this.contextLost) { return; } // Unbind custom framebuffer here @@ -1774,7 +1776,7 @@ var WebGLRenderer = new Class({ for (var index = 0; index < this.nativeTextures.length; ++index) { this.deleteTexture(this.nativeTextures[index]); - delete this.nativeTextures[index]; + delete this.nativeTextures[index]; } if (this.hasExtension('WEBGL_lose_context')) diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index d1ca013bf..37bcae6f4 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -6,7 +6,7 @@ var Class = require('../../../utils/Class'); var ShaderSourceFS = require('../shaders/BitmapMask.frag'); -var ShaderSourceVS = require('../shaders/BitmapMask.vert'); +var ShaderSourceVS = require('../shaders/BitmapMask.vert'); var Utils = require('../Utils'); var WebGLPipeline = require('../WebGLPipeline'); @@ -41,7 +41,7 @@ var BitmapMaskPipeline = new Class({ fragShader: ShaderSourceFS, vertexCapacity: 3, - vertexSize: + vertexSize: Float32Array.BYTES_PER_ELEMENT * 2, vertices: new Float32Array([ diff --git a/src/renderer/webgl/pipelines/FlatTintPipeline.js b/src/renderer/webgl/pipelines/FlatTintPipeline.js index 26f83a442..68fc5352f 100644 --- a/src/renderer/webgl/pipelines/FlatTintPipeline.js +++ b/src/renderer/webgl/pipelines/FlatTintPipeline.js @@ -8,8 +8,8 @@ var Class = require('../../../utils/Class'); var Commands = require('../../../gameobjects/graphics/Commands'); var Earcut = require('../../../geom/polygon/Earcut'); var ModelViewProjection = require('./components/ModelViewProjection'); -var ShaderSourceFS = require('../shaders/FlatTint.frag'); -var ShaderSourceVS = require('../shaders/FlatTint.vert'); +var ShaderSourceFS = require('../shaders/FlatTint.frag'); +var ShaderSourceVS = require('../shaders/FlatTint.vert'); var Utils = require('../Utils'); var WebGLPipeline = require('../WebGLPipeline'); @@ -29,7 +29,7 @@ var Path = function (x, y, width, rgb, alpha) this.points[0] = new Point(x, y, width, rgb, alpha); }; -var currentMatrix = new Float32Array([1, 0, 0, 1, 0, 0]); +var currentMatrix = new Float32Array([ 1, 0, 0, 1, 0, 0 ]); var matrixStack = new Float32Array(6 * 1000); var matrixStackLength = 0; var pathArray = []; @@ -69,8 +69,8 @@ var FlatTintPipeline = new Class({ fragShader: ShaderSourceFS, vertexCapacity: 12000, - vertexSize: - Float32Array.BYTES_PER_ELEMENT * 2 + + vertexSize: + Float32Array.BYTES_PER_ELEMENT * 2 + Uint8Array.BYTES_PER_ELEMENT * 4, attributes: [ @@ -199,7 +199,7 @@ var FlatTintPipeline = new Class({ * @param {boolean} roundPixels - [description] */ batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) - { + { this.renderer.setPipeline(this); if (this.vertexCount + 6 > this.vertexCapacity) @@ -207,7 +207,7 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; + var renderer = this.renderer; var resolution = renderer.config.resolution; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; @@ -307,7 +307,7 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; + var renderer = this.renderer; var resolution = renderer.config.resolution; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; @@ -446,7 +446,7 @@ var FlatTintPipeline = new Class({ { this.renderer.setPipeline(this); - var renderer = this.renderer; + var renderer = this.renderer; var resolution = renderer.config.resolution; var length = path.length; var polygonCache = this.polygonCache; @@ -658,7 +658,7 @@ var FlatTintPipeline = new Class({ * @param {Float32Array} currentMatrix - [description] * @param {boolean} roundPixels - [description] */ - batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) { this.renderer.setPipeline(this); @@ -667,7 +667,7 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; + var renderer = this.renderer; var resolution = renderer.config.resolution; var a0 = currentMatrix[0]; var b0 = currentMatrix[1]; @@ -731,7 +731,7 @@ var FlatTintPipeline = new Class({ vertexViewU32[vertexOffset + 5] = aTint; vertexViewF32[vertexOffset + 6] = x2; vertexViewF32[vertexOffset + 7] = y2; - vertexViewU32[vertexOffset + 8] = bTint + vertexViewU32[vertexOffset + 8] = bTint; vertexViewF32[vertexOffset + 9] = x1; vertexViewF32[vertexOffset + 10] = y1; vertexViewU32[vertexOffset + 11] = aTint; @@ -763,7 +763,7 @@ var FlatTintPipeline = new Class({ */ batchGraphics: function (graphics, camera) { - if (graphics.commandBuffer.length <= 0) return; + if (graphics.commandBuffer.length <= 0) { return; } this.renderer.setPipeline(this); @@ -897,12 +897,15 @@ var FlatTintPipeline = new Class({ ++pathArrayIndex) { this.batchFillPath( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ pathArray[pathArrayIndex].points, fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, currentMatrix, @@ -918,13 +921,16 @@ var FlatTintPipeline = new Class({ { path = pathArray[pathArrayIndex]; this.batchStrokePath( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ path.points, lineWidth, lineColor, lineAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, path === this._lastPath, @@ -936,8 +942,10 @@ var FlatTintPipeline = new Class({ case Commands.FILL_RECT: this.batchFillRect( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -945,6 +953,7 @@ var FlatTintPipeline = new Class({ commands[cmdIndex + 4], fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, currentMatrix, @@ -956,8 +965,10 @@ var FlatTintPipeline = new Class({ case Commands.FILL_TRIANGLE: this.batchFillTriangle( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Triangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -967,6 +978,7 @@ var FlatTintPipeline = new Class({ commands[cmdIndex + 6], fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, currentMatrix, @@ -978,8 +990,10 @@ var FlatTintPipeline = new Class({ case Commands.STROKE_TRIANGLE: this.batchStrokeTriangle( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Triangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -990,6 +1004,7 @@ var FlatTintPipeline = new Class({ lineWidth, lineColor, lineAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, currentMatrix, diff --git a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js index 47bf1bfb9..cc4c9883e 100644 --- a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js +++ b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js @@ -95,7 +95,7 @@ var ForwardDiffuseLightPipeline = new Class({ renderer.setFloat1(program, 'uLights[' + index + '].radius', 0); // reset lights } - if (lightCount <= 0) return this; + if (lightCount <= 0) { return this; } renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom); renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b); diff --git a/src/renderer/webgl/pipelines/components/ModelViewProjection.js b/src/renderer/webgl/pipelines/components/ModelViewProjection.js index 66e1f02ab..20b324bc0 100644 --- a/src/renderer/webgl/pipelines/components/ModelViewProjection.js +++ b/src/renderer/webgl/pipelines/components/ModelViewProjection.js @@ -369,16 +369,16 @@ var ModelViewProjection = { vm[2] = 0.0; vm[3] = 0.0; vm[4] = matrix2D[2]; - vm[5] = matrix2D[3]; - vm[6] = 0.0; + vm[5] = matrix2D[3]; + vm[6] = 0.0; vm[7] = 0.0; vm[8] = matrix2D[4]; - vm[9] = matrix2D[5]; - vm[10] = 1.0; + vm[9] = matrix2D[5]; + vm[10] = 1.0; vm[11] = 0.0; - vm[12] = 0.0; - vm[13] = 0.0; - vm[14] = 0.0; + vm[12] = 0.0; + vm[13] = 0.0; + vm[14] = 0.0; vm[15] = 1.0; this.viewMatrixDirty = true; diff --git a/src/textures/parsers/UnityYAML.js b/src/textures/parsers/UnityYAML.js index 0c9c7ef74..8e5ba42a6 100644 --- a/src/textures/parsers/UnityYAML.js +++ b/src/textures/parsers/UnityYAML.js @@ -63,6 +63,7 @@ var UnityYAML = function (texture, sourceIndex, yaml) var prevSprite = ''; var currentSprite = ''; var rect = { x: 0, y: 0, width: 0, height: 0 }; + // var pivot = { x: 0, y: 0 }; // var border = { x: 0, y: 0, z: 0, w: 0 }; From 164ba4be412590013319bd4c90791c59d718799c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:41:12 +0000 Subject: [PATCH 020/200] Updated ignore list --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index a249b8a8d..d19e51dd8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ +src/phaser-arcade-physics.js src/physics/matter-js/lib/ src/physics/matter-js/poly-decomp/ src/polyfills/ From 3f155bf8f31141fb4a370a35254db2e20b105331 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:43:06 +0000 Subject: [PATCH 021/200] World didn't import GetOverlapX or GetOverlapY, causing `separateCircle` to break. --- src/physics/arcade/World.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index f31938d2d..193527f8f 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -11,6 +11,8 @@ var Collider = require('./Collider'); var CONST = require('./const'); var DistanceBetween = require('../../math/distance/DistanceBetween'); var EventEmitter = require('eventemitter3'); +var GetOverlapX = require('./GetOverlapX'); +var GetOverlapY = require('./GetOverlapY'); var GetValue = require('../../utils/object/GetValue'); var ProcessQueue = require('../../structs/ProcessQueue'); var ProcessTileCallbacks = require('./tilemap/ProcessTileCallbacks'); From 4a3f4293d4769d91235acde36d99e128be4099a6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:43:52 +0000 Subject: [PATCH 022/200] Fuzzy.Floor had an incorrect method signature. --- src/math/fuzzy/Floor.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/math/fuzzy/Floor.js b/src/math/fuzzy/Floor.js index 5fd7c4401..4fb012741 100644 --- a/src/math/fuzzy/Floor.js +++ b/src/math/fuzzy/Floor.js @@ -10,13 +10,12 @@ * @function Phaser.Math.Fuzzy.Floor * @since 3.0.0 * - * @param {number} a - [description] - * @param {number} b - [description] + * @param {number} value - [description] * @param {float} [epsilon=0.0001] - [description] * * @return {number} [description] */ -var Floor = function (a, b, epsilon) +var Floor = function (value, epsilon) { if (epsilon === undefined) { epsilon = 0.0001; } From d23688c3e446585ba7f0c8e81d9c1aefd32eff29 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:44:07 +0000 Subject: [PATCH 023/200] Added eslint fixes and overrides --- src/input/mouse/index.js | 2 ++ src/input/touch/index.js | 2 ++ src/math/IsEven.js | 2 ++ src/physics/arcade/StaticBody.js | 1 - src/physics/arcade/StaticPhysicsGroup.js | 2 +- src/physics/impact/Body.js | 6 +++--- src/renderer/canvas/CanvasRenderer.js | 4 ++-- src/renderer/webgl/WebGLPipeline.js | 6 +++--- src/renderer/webgl/WebGLRenderer.js | 18 +++++++--------- .../webgl/pipelines/BitmapMaskPipeline.js | 1 - .../webgl/pipelines/FlatTintPipeline.js | 21 ++++++++++--------- .../pipelines/ForwardDiffuseLightPipeline.js | 7 +++---- src/scene/ScenePlugin.js | 4 ++-- src/structs/Map.js | 4 ++-- src/structs/Set.js | 4 ++-- src/time/Clock.js | 2 +- 16 files changed, 44 insertions(+), 42 deletions(-) diff --git a/src/input/mouse/index.js b/src/input/mouse/index.js index 5b1a33fce..6f4cd14a1 100644 --- a/src/input/mouse/index.js +++ b/src/input/mouse/index.js @@ -8,8 +8,10 @@ * @namespace Phaser.Input.Mouse */ +/*eslint-disable */ module.exports = { MouseManager: require('./MouseManager') }; +/*eslint-enable */ diff --git a/src/input/touch/index.js b/src/input/touch/index.js index d8a00c37f..3db1ef817 100644 --- a/src/input/touch/index.js +++ b/src/input/touch/index.js @@ -8,8 +8,10 @@ * @namespace Phaser.Input.Touch */ +/*eslint-disable */ module.exports = { TouchManager: require('./TouchManager') }; +/*eslint-enable */ diff --git a/src/math/IsEven.js b/src/math/IsEven.js index 75daa9253..b541d269a 100644 --- a/src/math/IsEven.js +++ b/src/math/IsEven.js @@ -17,6 +17,8 @@ var IsEven = function (value) { // Use abstract equality == for "is number" test + + // eslint-disable-next-line eqeqeq return (value == parseFloat(value)) ? !(value % 2) : void 0; }; diff --git a/src/physics/arcade/StaticBody.js b/src/physics/arcade/StaticBody.js index 1900820da..49cd0ce57 100644 --- a/src/physics/arcade/StaticBody.js +++ b/src/physics/arcade/StaticBody.js @@ -7,7 +7,6 @@ var CircleContains = require('../../geom/circle/Contains'); var Class = require('../../utils/Class'); var CONST = require('./const'); -var Rectangle = require('../../geom/rectangle/Rectangle'); var RectangleContains = require('../../geom/rectangle/Contains'); var Vector2 = require('../../math/Vector2'); diff --git a/src/physics/arcade/StaticPhysicsGroup.js b/src/physics/arcade/StaticPhysicsGroup.js index 8b88e041e..2de4a5d1d 100644 --- a/src/physics/arcade/StaticPhysicsGroup.js +++ b/src/physics/arcade/StaticPhysicsGroup.js @@ -111,7 +111,7 @@ var StaticPhysicsGroup = new Class({ * * @param {object} entries - [description] */ - createMultipleCallback: function (entries) + createMultipleCallback: function () { this.refresh(); }, diff --git a/src/physics/impact/Body.js b/src/physics/impact/Body.js index efdfaa389..fe344685f 100644 --- a/src/physics/impact/Body.js +++ b/src/physics/impact/Body.js @@ -516,7 +516,7 @@ var Body = new Class({ * * @param {object} config - [description] */ - fromJSON: function (config) + fromJSON: function () { }, @@ -526,9 +526,9 @@ var Body = new Class({ * @method Phaser.Physics.Impact.Body#check * @since 3.0.0 * - * @param {[type]} other - [description] + * @param {Phaser.Physics.Impact.Body} other - [description] */ - check: function (other) + check: function () { }, diff --git a/src/renderer/canvas/CanvasRenderer.js b/src/renderer/canvas/CanvasRenderer.js index d8447df78..19d383ff1 100644 --- a/src/renderer/canvas/CanvasRenderer.js +++ b/src/renderer/canvas/CanvasRenderer.js @@ -268,7 +268,7 @@ var CanvasRenderer = new Class({ * * @param {function} callback - [description] */ - onContextLost: function (callback) + onContextLost: function () { }, @@ -280,7 +280,7 @@ var CanvasRenderer = new Class({ * * @param {function} callback - [description] */ - onContextRestored: function (callback) + onContextRestored: function () { }, diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index f2d47aacb..d90841158 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -308,7 +308,7 @@ var WebGLPipeline = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] */ - onRender: function (scene, camera) + onRender: function () { // called for each camera return this; @@ -339,12 +339,11 @@ var WebGLPipeline = new Class({ flush: function () { if (this.flushLocked) { return this; } + this.flushLocked = true; var gl = this.gl; var vertexCount = this.vertexCount; - var vertexBuffer = this.vertexBuffer; - var vertexData = this.vertexData; var topology = this.topology; var vertexSize = this.vertexSize; @@ -353,6 +352,7 @@ var WebGLPipeline = new Class({ this.flushLocked = false; return; } + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); gl.drawArrays(topology, 0, vertexCount); diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index d0a5f7abb..3705f4bb4 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -33,6 +33,7 @@ var WebGLRenderer = new Class({ function WebGLRenderer (game) { + // eslint-disable-next-line consistent-this var renderer = this; var contextCreationConfig = { @@ -318,7 +319,7 @@ var WebGLRenderer = new Class({ } }, false); - this.canvas.addEventListener('webglcontextrestored', function (event) + this.canvas.addEventListener('webglcontextrestored', function () { renderer.contextLost = false; renderer.init(renderer.config); @@ -630,7 +631,7 @@ var WebGLRenderer = new Class({ { var gl = this.gl; var currentScissor = this.currentScissor; - var enabled = (x == 0 && y == 0 && w == gl.canvas.width && h == gl.canvas.height && w >= 0 && h >= 0); + var enabled = (x === 0 && y === 0 && w === gl.canvas.width && h === gl.canvas.height && w >= 0 && h >= 0); if (currentScissor[0] !== x || currentScissor[1] !== y || @@ -1202,7 +1203,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteTexture: function (texture) + deleteTexture: function () { return this; }, @@ -1217,7 +1218,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteFramebuffer: function (framebuffer) + deleteFramebuffer: function () { return this; }, @@ -1232,7 +1233,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteProgram: function (program) + deleteProgram: function () { return this; }, @@ -1247,7 +1248,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteBuffer: function (vertexBuffer) + deleteBuffer: function () { return this; }, @@ -1367,7 +1368,6 @@ var WebGLRenderer = new Class({ { if (this.contextLost) { return; } - var gl = this.gl; var list = children.list; var childCount = list.length; var pipelines = this.pipelines; @@ -1470,7 +1470,7 @@ var WebGLRenderer = new Class({ * * @return {WebGLTexture} [description] */ - canvasToTexture: function (srcCanvas, dstTexture, shouldReallocate, scaleMode) + canvasToTexture: function (srcCanvas, dstTexture, shouldReallocate) { var gl = this.gl; @@ -1764,8 +1764,6 @@ var WebGLRenderer = new Class({ */ destroy: function () { - var gl = this.gl; - // Clear-up anything that should be cleared :) for (var key in this.pipelines) { diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 37bcae6f4..8aaeb074c 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -7,7 +7,6 @@ var Class = require('../../../utils/Class'); var ShaderSourceFS = require('../shaders/BitmapMask.frag'); var ShaderSourceVS = require('../shaders/BitmapMask.vert'); -var Utils = require('../Utils'); var WebGLPipeline = require('../WebGLPipeline'); /** diff --git a/src/renderer/webgl/pipelines/FlatTintPipeline.js b/src/renderer/webgl/pipelines/FlatTintPipeline.js index 68fc5352f..3fa219b40 100644 --- a/src/renderer/webgl/pipelines/FlatTintPipeline.js +++ b/src/renderer/webgl/pipelines/FlatTintPipeline.js @@ -1124,6 +1124,7 @@ var FlatTintPipeline = new Class({ break; default: + // eslint-disable-next-line no-console console.error('Phaser: Invalid Graphics Command ID ' + cmd); break; } @@ -1141,7 +1142,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function () { }, @@ -1154,7 +1155,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Particles.ParticleEmittermanager} emitterManager - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawEmitterManager: function (emitterManager, camera) + drawEmitterManager: function () { }, @@ -1167,7 +1168,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Blitter} blitter - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawBlitter: function (blitter, camera) + drawBlitter: function () { }, @@ -1180,7 +1181,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Sprite} sprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchSprite: function (sprite, camera) + batchSprite: function () { }, @@ -1193,7 +1194,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Mesh} mesh - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchMesh: function (mesh, camera) + batchMesh: function () { }, @@ -1206,7 +1207,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchBitmapText: function (bitmapText, camera) + batchBitmapText: function () { }, @@ -1219,7 +1220,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchDynamicBitmapText: function (bitmapText, camera) + batchDynamicBitmapText: function () { }, @@ -1232,7 +1233,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Text} text - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchText: function (text, camera) + batchText: function () { }, @@ -1245,7 +1246,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchDynamicTilemapLayer: function (tilemapLayer, camera) + batchDynamicTilemapLayer: function () { }, @@ -1258,7 +1259,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchTileSprite: function (tileSprite, camera) + batchTileSprite: function () { } diff --git a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js index cc4c9883e..8b69f33ff 100644 --- a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js +++ b/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js @@ -7,8 +7,6 @@ var Class = require('../../../utils/Class'); var ShaderSourceFS = require('../shaders/ForwardDiffuse.frag'); var TextureTintPipeline = require('./TextureTintPipeline'); -var Utils = require('../Utils'); -var WebGLPipeline = require('../WebGLPipeline'); var LIGHT_COUNT = 10; @@ -89,8 +87,9 @@ var ForwardDiffuseLightPipeline = new Class({ var cameraMatrix = camera.matrix; var point = {x: 0, y: 0}; var height = renderer.height; + var index; - for (var index = 0; index < LIGHT_COUNT; ++index) + for (index = 0; index < LIGHT_COUNT; ++index) { renderer.setFloat1(program, 'uLights[' + index + '].radius', 0); // reset lights } @@ -100,7 +99,7 @@ var ForwardDiffuseLightPipeline = new Class({ renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom); renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b); - for (var index = 0; index < lightCount; ++index) + for (index = 0; index < lightCount; ++index) { var light = lights[index]; var lightName = 'uLights[' + index + '].'; diff --git a/src/scene/ScenePlugin.js b/src/scene/ScenePlugin.js index 2ff21ba5d..ee3642356 100644 --- a/src/scene/ScenePlugin.js +++ b/src/scene/ScenePlugin.js @@ -111,7 +111,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - start: function (key, data) + start: function (key) { if (key === undefined) { key = this.key; } @@ -162,7 +162,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - launch: function (key, data) + launch: function (key) { if (key && key !== this.key) { diff --git a/src/structs/Map.js b/src/structs/Map.js index ceabf0a98..514599996 100644 --- a/src/structs/Map.js +++ b/src/structs/Map.js @@ -219,7 +219,7 @@ var Map = new Class({ { var entries = this.entries; - // eslint-disable-next-line no-use-before-define + // eslint-disable-next-line no-console console.group('Map'); for (var key in entries) @@ -227,7 +227,7 @@ var Map = new Class({ console.log(key, entries[key]); } - // eslint-disable-next-line no-use-before-define + // eslint-disable-next-line no-console console.groupEnd(); }, diff --git a/src/structs/Set.js b/src/structs/Set.js index ebf826cb8..5e1269798 100644 --- a/src/structs/Set.js +++ b/src/structs/Set.js @@ -129,7 +129,7 @@ var Set = new Class({ */ dump: function () { - // eslint-disable-next-line no-use-before-define + // eslint-disable-next-line no-console console.group('Set'); for (var i = 0; i < this.entries.length; i++) @@ -138,7 +138,7 @@ var Set = new Class({ console.log(entry); } - // eslint-disable-next-line no-use-before-define + // eslint-disable-next-line no-console console.groupEnd(); }, diff --git a/src/time/Clock.js b/src/time/Clock.js index 26faeed56..bcc0e7b54 100644 --- a/src/time/Clock.js +++ b/src/time/Clock.js @@ -206,7 +206,7 @@ var Clock = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time) + preUpdate: function () { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; From 5b4b5de075e4591c062fe7013358a783eb23f883 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 18:54:33 +0000 Subject: [PATCH 024/200] TileSprite was missing a gl reference, causing it to fail during a context loss and restore. --- src/gameobjects/tilesprite/TileSprite.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gameobjects/tilesprite/TileSprite.js b/src/gameobjects/tilesprite/TileSprite.js index 687f16ca5..21b6958cc 100644 --- a/src/gameobjects/tilesprite/TileSprite.js +++ b/src/gameobjects/tilesprite/TileSprite.js @@ -179,6 +179,7 @@ var TileSprite = new Class({ scene.sys.game.renderer.onContextRestored(function (renderer) { + var gl = renderer.gl; this.tileTexture = null; this.dirty = true; this.tileTexture = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.canvasBuffer, this.potWidth, this.potHeight); From d745b70330c690cb1c5130606ed36bd50aa2ee6c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:07:58 +0000 Subject: [PATCH 025/200] The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor. --- src/gameobjects/mesh/MeshFactory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/mesh/MeshFactory.js b/src/gameobjects/mesh/MeshFactory.js index b994b2252..5518dd38d 100644 --- a/src/gameobjects/mesh/MeshFactory.js +++ b/src/gameobjects/mesh/MeshFactory.js @@ -31,7 +31,7 @@ if (WEBGL_RENDERER) { GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame) { - return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, key, frame)); + return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame)); }); } From a57b95891f3066538e23f8de7f43162854ddf9f5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:08:12 +0000 Subject: [PATCH 026/200] Added another exclusion --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index d19e51dd8..2f285db3d 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ src/phaser-arcade-physics.js +src/animations/config.json src/physics/matter-js/lib/ src/physics/matter-js/poly-decomp/ src/polyfills/ From c1b810afefef8a76c365df1fe1c76cbda6d4e48f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:08:23 +0000 Subject: [PATCH 027/200] Added node process global --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index c683cd504..786ae2942 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,6 +10,7 @@ "CANVAS_RENDERER": true, "Phaser": true, "p2": true, + "process": true, "ActiveXObject": true }, "rules": { From 50dac412be291f5c85a5ea30921c4cf3efd5c921 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:08:50 +0000 Subject: [PATCH 028/200] eslint fixes and console removal --- src/display/mask/BitmapMask.js | 4 ++-- src/gameobjects/UpdateList.js | 5 +---- .../bitmaptext/ParseXMLBitmapFont.js | 18 ------------------ .../static/BitmapTextCanvasRenderer.js | 1 - .../blitter/BlitterCanvasRenderer.js | 1 - .../graphics/GraphicsCanvasRenderer.js | 2 +- src/gameobjects/mesh/MeshCanvasRenderer.js | 2 +- src/gameobjects/particles/ParticleEmitter.js | 12 ++++++------ src/gameobjects/particles/zones/EdgeZone.js | 1 - src/input/Pointer.js | 4 ++-- src/input/gamepad/GamepadManager.js | 3 ++- src/input/mouse/index.js | 4 ++-- src/input/touch/index.js | 4 ++-- src/loader/File.js | 2 +- src/loader/filetypes/AudioFile.js | 5 +++-- 15 files changed, 23 insertions(+), 45 deletions(-) diff --git a/src/display/mask/BitmapMask.js b/src/display/mask/BitmapMask.js index de52a8ae7..4997737d7 100644 --- a/src/display/mask/BitmapMask.js +++ b/src/display/mask/BitmapMask.js @@ -186,7 +186,7 @@ var BitmapMask = new Class({ * @param {[type]} mask - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. */ - preRenderCanvas: function (renderer, mask, camera) + preRenderCanvas: function () { // NOOP }, @@ -199,7 +199,7 @@ var BitmapMask = new Class({ * * @param {[type]} renderer - [description] */ - postRenderCanvas: function (renderer) + postRenderCanvas: function () { // NOOP } diff --git a/src/gameobjects/UpdateList.js b/src/gameobjects/UpdateList.js index 2b0d636ff..25f4b56c1 100644 --- a/src/gameobjects/UpdateList.js +++ b/src/gameobjects/UpdateList.js @@ -128,7 +128,7 @@ var UpdateList = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time, delta) + preUpdate: function () { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; @@ -153,9 +153,6 @@ var UpdateList = new Class({ { this._list.splice(index, 1); } - - // Pool them? - // gameObject.destroy(); } // Move pending to active diff --git a/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js b/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js index 233e109aa..fadfc6de6 100644 --- a/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js +++ b/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js @@ -25,10 +25,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) var letters = xml.getElementsByTagName('char'); - var x = 0; - var y = 0; - var cx = 0; - var cy = 0; var adjustForTrim = (frame !== undefined && frame.trimmed); if (adjustForTrim) @@ -37,8 +33,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) var left = frame.width; } - var diff = 0; - for (var i = 0; i < letters.length; i++) { var node = letters[i]; @@ -53,18 +47,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) if (adjustForTrim) { - // if (gx + gw > frame.width) - // { - // diff = frame.width - (gx + gw); - // gw -= diff; - // } - - // if (gy + gh > frame.height) - // { - // diff = frame.height - (gy + gh); - // gh -= diff; - // } - if (gx < left) { left = gx; diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js index be5c6cbba..d08e7f514 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js @@ -62,7 +62,6 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, var textureX = textureFrame.cutX; var textureY = textureFrame.cutY; - var rotation = 0; var scale = (src.fontSize / src.fontData.size); // Blend Mode diff --git a/src/gameobjects/blitter/BlitterCanvasRenderer.js b/src/gameobjects/blitter/BlitterCanvasRenderer.js index 02f20123a..d3c725791 100644 --- a/src/gameobjects/blitter/BlitterCanvasRenderer.js +++ b/src/gameobjects/blitter/BlitterCanvasRenderer.js @@ -31,7 +31,6 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca renderer.setBlendMode(src.blendMode); - var ca = renderer.currentAlpha; var ctx = renderer.gameContext; var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX; var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY; diff --git a/src/gameobjects/graphics/GraphicsCanvasRenderer.js b/src/gameobjects/graphics/GraphicsCanvasRenderer.js index 95eb71afe..ad3e7377c 100644 --- a/src/gameobjects/graphics/GraphicsCanvasRenderer.js +++ b/src/gameobjects/graphics/GraphicsCanvasRenderer.js @@ -249,7 +249,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c break; default: - console.error('Phaser: Invalid Graphics Command ID ' + commandID); + // console.error('Phaser: Invalid Graphics Command ID ' + commandID); break; } } diff --git a/src/gameobjects/mesh/MeshCanvasRenderer.js b/src/gameobjects/mesh/MeshCanvasRenderer.js index 1f6eabce1..5d8842cf1 100644 --- a/src/gameobjects/mesh/MeshCanvasRenderer.js +++ b/src/gameobjects/mesh/MeshCanvasRenderer.js @@ -16,7 +16,7 @@ * @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 (renderer, src, interpolationPercentage, camera) +var MeshCanvasRenderer = function () { }; diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index bbcee2a8c..15f24eb7c 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -12,7 +12,6 @@ var EdgeZone = require('./zones/EdgeZone'); var EmitterOp = require('./EmitterOp'); var GetFastValue = require('../../utils/object/GetFastValue'); var GetRandomElement = require('../../utils/array/GetRandomElement'); -var GetValue = require('../../utils/object/GetValue'); var HasAny = require('../../utils/object/HasAny'); var HasValue = require('../../utils/object/HasValue'); var Particle = require('./Particle'); @@ -986,7 +985,8 @@ var ParticleEmitter = new Class({ else if (t === 'object') { var frameConfig = frames; - var frames = GetFastValue(frameConfig, 'frames', null); + + frames = GetFastValue(frameConfig, 'frames', null); if (frames) { @@ -1068,10 +1068,10 @@ var ParticleEmitter = new Class({ { var obj = x; - var x = obj.x; - var y = obj.y; - var width = (HasValue(obj, 'w')) ? obj.w : obj.width; - var height = (HasValue(obj, 'h')) ? obj.h : obj.height; + x = obj.x; + y = obj.y; + width = (HasValue(obj, 'w')) ? obj.w : obj.width; + height = (HasValue(obj, 'h')) ? obj.h : obj.height; } if (this.bounds) diff --git a/src/gameobjects/particles/zones/EdgeZone.js b/src/gameobjects/particles/zones/EdgeZone.js index 725354667..c1f946fdd 100644 --- a/src/gameobjects/particles/zones/EdgeZone.js +++ b/src/gameobjects/particles/zones/EdgeZone.js @@ -5,7 +5,6 @@ */ var Class = require('../../../utils/Class'); -var Wrap = require('../../../math/Wrap'); /** * @classdesc diff --git a/src/input/Pointer.js b/src/input/Pointer.js index d45ff5ae2..86e9e6d67 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -350,7 +350,7 @@ var Pointer = new Class({ * @param {[type]} event - [description] * @param {[type]} time - [description] */ - touchmove: function (event, time) + touchmove: function (event) { this.event = event; @@ -373,7 +373,7 @@ var Pointer = new Class({ * @param {[type]} event - [description] * @param {[type]} time - [description] */ - move: function (event, time) + move: function (event) { if (event.buttons) { diff --git a/src/input/gamepad/GamepadManager.js b/src/input/gamepad/GamepadManager.js index ded74b7a0..4ca4b0717 100644 --- a/src/input/gamepad/GamepadManager.js +++ b/src/input/gamepad/GamepadManager.js @@ -209,11 +209,12 @@ var GamepadManager = new Class({ * * @method Phaser.Input.Gamepad.GamepadManager#removePad * @since 3.0.0 + * @todo Code this feature * * @param {[type]} index - [description] * @param {[type]} pad - [description] */ - removePad: function (index, pad) + removePad: function () { // TODO }, diff --git a/src/input/mouse/index.js b/src/input/mouse/index.js index 6f4cd14a1..8898beb5a 100644 --- a/src/input/mouse/index.js +++ b/src/input/mouse/index.js @@ -8,10 +8,10 @@ * @namespace Phaser.Input.Mouse */ -/*eslint-disable */ +/* eslint-disable */ module.exports = { MouseManager: require('./MouseManager') }; -/*eslint-enable */ +/* eslint-enable */ diff --git a/src/input/touch/index.js b/src/input/touch/index.js index 3db1ef817..58e512cf1 100644 --- a/src/input/touch/index.js +++ b/src/input/touch/index.js @@ -8,10 +8,10 @@ * @namespace Phaser.Input.Touch */ -/*eslint-disable */ +/* eslint-disable */ module.exports = { TouchManager: require('./TouchManager') }; -/*eslint-enable */ +/* eslint-enable */ diff --git a/src/loader/File.js b/src/loader/File.js index 9b69aedd1..347f4a318 100644 --- a/src/loader/File.js +++ b/src/loader/File.js @@ -311,7 +311,7 @@ var File = new Class({ * * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. */ - onError: function (event) + onError: function () { this.resetXHR(); diff --git a/src/loader/filetypes/AudioFile.js b/src/loader/filetypes/AudioFile.js index fdc914ccf..2fe49ac7b 100644 --- a/src/loader/filetypes/AudioFile.js +++ b/src/loader/filetypes/AudioFile.js @@ -82,6 +82,7 @@ var AudioFile = new Class({ }, function (e) { + // eslint-disable-next-line no-console console.error('Error with decoding audio data for \'' + this.key + '\':', e.message); _this.state = CONST.FILE_ERRORED; @@ -103,7 +104,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData)) { - console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.'); + // console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.'); return null; } @@ -111,7 +112,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) if (!url) { - console.warn('No supported url provided for audio \'' + key + '\'!'); + // console.warn('No supported url provided for audio \'' + key + '\'!'); return null; } From 3c65121cb3e27b1a414eaaf77f4a136fbb6932af Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:17:49 +0000 Subject: [PATCH 029/200] eslint fixes --- src/gameobjects/particles/EmitterOp.js | 3 +-- src/gameobjects/particles/GravityWell.js | 2 +- src/gameobjects/text/static/TextCanvasRenderer.js | 3 ++- src/loader/filetypes/HTML5AudioFile.js | 2 +- src/math/random-data-generator/RandomDataGenerator.js | 1 + src/physics/impact/Body.js | 2 +- src/physics/matter-js/World.js | 3 +++ src/renderer/webgl/pipelines/FlatTintPipeline.js | 7 +++++-- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/gameobjects/particles/EmitterOp.js b/src/gameobjects/particles/EmitterOp.js index d4b88eb34..df8fc9352 100644 --- a/src/gameobjects/particles/EmitterOp.js +++ b/src/gameobjects/particles/EmitterOp.js @@ -538,11 +538,10 @@ var EmitterOp = new Class({ * @param {Phaser.GameObjects.Particles.Particle} particle - [description] * @param {string} key - [description] * @param {float} t - The T value (between 0 and 1) - * @param {number} value - [description] * * @return {number} [description] */ - easeValueUpdate: function (particle, key, t, value) + easeValueUpdate: function (particle, key, t) { var data = particle.data[key]; diff --git a/src/gameobjects/particles/GravityWell.js b/src/gameobjects/particles/GravityWell.js index 80e2f1b21..405955272 100644 --- a/src/gameobjects/particles/GravityWell.js +++ b/src/gameobjects/particles/GravityWell.js @@ -136,7 +136,7 @@ var GravityWell = new Class({ * @param {number} delta - The delta time in ms. * @param {float} step - The delta value divided by 1000. */ - update: function (particle, delta, step) + update: function (particle, delta) { var x = this.x - particle.x; var y = this.y - particle.y; diff --git a/src/gameobjects/text/static/TextCanvasRenderer.js b/src/gameobjects/text/static/TextCanvasRenderer.js index dfa64ee15..6b14b5a0b 100644 --- a/src/gameobjects/text/static/TextCanvasRenderer.js +++ b/src/gameobjects/text/static/TextCanvasRenderer.js @@ -28,7 +28,8 @@ var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camer } var ctx = renderer.currentContext; - var resolution = src.resolution; + + // var resolution = src.resolution; // Blend Mode if (renderer.currentBlendMode !== src.blendMode) diff --git a/src/loader/filetypes/HTML5AudioFile.js b/src/loader/filetypes/HTML5AudioFile.js index f4b14663c..356ffb598 100644 --- a/src/loader/filetypes/HTML5AudioFile.js +++ b/src/loader/filetypes/HTML5AudioFile.js @@ -61,7 +61,7 @@ var HTML5AudioFile = new Class({ this.loader.nextFile(this, true); }, - onError: function (event) + onError: function () { for (var i = 0; i < this.data.length; i++) { diff --git a/src/math/random-data-generator/RandomDataGenerator.js b/src/math/random-data-generator/RandomDataGenerator.js index b720aa7a0..5952d415e 100644 --- a/src/math/random-data-generator/RandomDataGenerator.js +++ b/src/math/random-data-generator/RandomDataGenerator.js @@ -311,6 +311,7 @@ var RandomDataGenerator = new Class({ for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') { + // eslint-disable-next-line no-empty } return b; diff --git a/src/physics/impact/Body.js b/src/physics/impact/Body.js index fe344685f..cf0affa09 100644 --- a/src/physics/impact/Body.js +++ b/src/physics/impact/Body.js @@ -559,7 +559,7 @@ var Body = new Class({ * * @return {boolean} [description] */ - handleMovementTrace: function (res) + handleMovementTrace: function () { return true; }, diff --git a/src/physics/matter-js/World.js b/src/physics/matter-js/World.js index 0384dbfc2..9410b806e 100644 --- a/src/physics/matter-js/World.js +++ b/src/physics/matter-js/World.js @@ -664,6 +664,9 @@ var World = new Class({ { if (points === undefined) { points = []; } + // var pathPattern = /L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig; + + // eslint-disable-next-line no-useless-escape var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig; path.replace(pathPattern, function (match, x, y) diff --git a/src/renderer/webgl/pipelines/FlatTintPipeline.js b/src/renderer/webgl/pipelines/FlatTintPipeline.js index 3fa219b40..9c81e5910 100644 --- a/src/renderer/webgl/pipelines/FlatTintPipeline.js +++ b/src/renderer/webgl/pipelines/FlatTintPipeline.js @@ -818,6 +818,9 @@ var FlatTintPipeline = new Class({ var mvf = sre * cmb + srf * cmd + cmf; var roundPixels = camera.roundPixels; + var pathArrayIndex; + var pathArrayLength; + pathArray.length = 0; for (var cmdIndex = 0, cmdLength = commands.length; cmdIndex < cmdLength; ++cmdIndex) @@ -892,7 +895,7 @@ var FlatTintPipeline = new Class({ break; case Commands.FILL_PATH: - for (var pathArrayIndex = 0, pathArrayLength = pathArray.length; + for (pathArrayIndex = 0, pathArrayLength = pathArray.length; pathArrayIndex < pathArrayLength; ++pathArrayIndex) { @@ -915,7 +918,7 @@ var FlatTintPipeline = new Class({ break; case Commands.STROKE_PATH: - for (var pathArrayIndex = 0, pathArrayLength = pathArray.length; + for (pathArrayIndex = 0, pathArrayLength = pathArray.length; pathArrayIndex < pathArrayLength; ++pathArrayIndex) { From 17e7ea930f8e23a0b3dfe3a8952e3e154c52cda0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:18:03 +0000 Subject: [PATCH 030/200] Updated with 3.1.1 fixes --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a6bbf7d..e4a8e2a98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## Version 3.1.1 - In Development + +### Bug Fixes + +* Math.Fuzzy.Floor had an incorrect method signature. +* Arcade Physics World didn't import GetOverlapX or GetOverlapY, causing `separateCircle` to break. +* TileSprite was missing a gl reference, causing it to fail during a context loss and restore. +* The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor. + + + ## Version 3.1.0 - Onishi - 16th February 2018 ### Updates From 33873fe23d5302b06554c28fa82e90ec4c4b575e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:32:43 +0000 Subject: [PATCH 031/200] eslint fixes and removing type related console errors --- .eslintignore | 1 - src/sound/BaseSound.js | 25 +++++++------------------ src/sound/html5/HTML5AudioSound.js | 5 +++-- src/sound/webaudio/WebAudioSound.js | 3 ++- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.eslintignore b/.eslintignore index 2f285db3d..e1bf90151 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,7 +5,6 @@ src/physics/matter-js/poly-decomp/ src/polyfills/ src/renderer/webgl/shaders/ src/geom/polygon/Earcut.js -src/sound/ src/utils/array/StableSort.js src/utils/object/Extend.js src/structs/RTree.js diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 432ebf043..e13810ccb 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -262,20 +262,14 @@ var BaseSound = new Class({ */ addMarker: function (marker) { - if (!marker) + if (!marker || !marker.name || typeof marker.name !== 'string') { - console.error('addMarker - Marker object has to be provided!'); - return false; - } - - if (!marker.name || typeof marker.name !== 'string') - { - console.error('addMarker - Marker has to have a valid name!'); return false; } if (this.markers[marker.name]) { + // eslint-disable-next-line no-console console.error('addMarker - Marker with name \'' + marker.name + '\' already exists for sound \'' + this.key + '\'!'); return false; } @@ -312,20 +306,14 @@ var BaseSound = new Class({ */ updateMarker: function (marker) { - if (!marker) + if (!marker || !marker.name || typeof marker.name !== 'string') { - console.error('updateMarker - Marker object has to be provided!'); - return false; - } - - if (!marker.name || typeof marker.name !== 'string') - { - console.error('updateMarker - Marker has to have a valid name!'); return false; } if (!this.markers[marker.name]) { + // eslint-disable-next-line no-console console.error('updateMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return false; } @@ -351,7 +339,6 @@ var BaseSound = new Class({ if (!marker) { - console.error('removeMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return null; } @@ -375,7 +362,7 @@ var BaseSound = new Class({ */ play: function (markerName, config) { - if (markerName === void 0) { markerName = ''; } + if (markerName === undefined) { markerName = ''; } if (typeof markerName === 'object') { @@ -385,6 +372,7 @@ var BaseSound = new Class({ if (typeof markerName !== 'string') { + // eslint-disable-next-line no-console console.error('Sound marker name has to be a string!'); return false; } @@ -399,6 +387,7 @@ var BaseSound = new Class({ { if (!this.markers[markerName]) { + // eslint-disable-next-line no-console console.error('No marker with name \'' + markerName + '\' found for sound \'' + this.key + '\'!'); return false; } diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 0d76495a0..dcb023db6 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -46,6 +46,7 @@ var HTML5AudioSound = new Class({ if (!this.tags) { + // eslint-disable-next-line no-console console.error('No audio loaded in cache with key: \'' + key + '\'!'); return; } @@ -373,7 +374,7 @@ var HTML5AudioSound = new Class({ if (playPromise) { - playPromise.catch(function (reason) { }); + playPromise.catch(function () { }); } }, @@ -449,7 +450,7 @@ var HTML5AudioSound = new Class({ * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ - update: function (time, delta) + update: function (time) { if (!this.isPlaying) { diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index a1b991eae..539c8d9be 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -44,6 +44,7 @@ var WebAudioSound = new Class({ if (!this.audioBuffer) { + // eslint-disable-next-line no-console console.error('No audio loaded in cache with key: \'' + key + '\'!'); return; } @@ -448,7 +449,7 @@ var WebAudioSound = new Class({ * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ - update: function (time, delta) + update: function () { if (this.hasEnded) { From 2219858764c0c329e07aead36c096b77d3953993 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 16 Feb 2018 19:35:44 +0000 Subject: [PATCH 032/200] Updated change log. --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a8e2a98..2395213e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Version 3.1.1 - In Development +### Updates + +* The entire codebase now passes our eslint config (which helped highlight a few errors), if you're submitting a PR, please ensure your PR passes the config too. + ### Bug Fixes * Math.Fuzzy.Floor had an incorrect method signature. @@ -9,8 +13,6 @@ * TileSprite was missing a gl reference, causing it to fail during a context loss and restore. * The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor. - - ## Version 3.1.0 - Onishi - 16th February 2018 ### Updates From 80e0d814a2e1bb5d9f29e43a7ad64e8f3047e94d Mon Sep 17 00:00:00 2001 From: samme Date: Sat, 17 Feb 2018 11:55:53 -0800 Subject: [PATCH 033/200] Add CodePen template --- .github/CONTRIBUTING.md | 3 ++- .github/ISSUE_TEMPLATE.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ec4799169..240e8a5e6 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -14,7 +14,7 @@ Before contributing, please read the [code of conduct](https://github.com/photon **3. Create an isolated and reproducible test case.** If you are reporting a bug, make sure you also have a minimal, runnable, code example that reproduces the problem you have. -**4. Include a live example.** After narrowing your code down to only the problem areas, make use of [jsFiddle][1], [jsBin][2], or a link to your live site so that we can view a live example of the problem. +**4. Include a live example.** After narrowing your code down to only the problem areas, make use of [jsFiddle][1], [jsBin][2], [CodePen][5], or a link to your live site so that we can view a live example of the problem. **5. Share as much information as possible.** Include browser version affected, your OS, version of the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed. @@ -74,3 +74,4 @@ Thanks to Chad for creating the original Pixi.js Contributing file which we adap [2]: http://jsbin.com/ [3]: http://nodejs.org [4]: http://www.html5gamedevs.com/forum/14-phaser/ +[5]: https://codepen.io/pen?template=YeEWom "Phaser 3 game template" diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 71070795a..9b5744c4b 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -10,7 +10,7 @@ This Issue is about (delete as applicable) * An error on the web site * A problem with my own code -API errors must include example code showing what happens, and why you don't believe this is the expected behavior. Issues posted without code take _far_ longer to get resolved, _if ever_. Feel free to use a site such as jsbin to demo the problem. If we can run it, and see the error, we can usually fix it. +API errors must include example code showing what happens, and why you don't believe this is the expected behavior. Issues posted without code take _far_ longer to get resolved, _if ever_. Feel free to use a site such as jsBin or [CodePen](https://codepen.io/pen?template=YeEWom) to demo the problem. If we can run it, and see the error, we can usually fix it. If your Issue contains _any_ form of hostility it will be instantly closed. From 9f07ee0af46ba2567d4ec367e0a1d5c340fc52ba Mon Sep 17 00:00:00 2001 From: yp Date: Sun, 18 Feb 2018 12:59:32 +0200 Subject: [PATCH 034/200] Bugfixes in Structs.Set --- src/structs/Set.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/structs/Set.js b/src/structs/Set.js index 5e1269798..1f98668b3 100644 --- a/src/structs/Set.js +++ b/src/structs/Set.js @@ -300,14 +300,14 @@ var Set = new Class({ { var newSet = new Set(); - set.values.forEach(function (value) + set.entries.forEach(function (value) { - newSet.add(value); + newSet.set(value); }); this.entries.forEach(function (value) { - newSet.add(value); + newSet.set(value); }); return newSet; @@ -331,7 +331,7 @@ var Set = new Class({ { if (set.contains(value)) { - newSet.add(value); + newSet.set(value); } }); @@ -356,7 +356,7 @@ var Set = new Class({ { if (!set.contains(value)) { - newSet.add(value); + newSet.set(value); } }); From 8e2cb94c63e3c0b2f63824a3c33e827e0b0e34dc Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:29:33 +0100 Subject: [PATCH 035/200] Added docs for defining SoundConfig custom type --- src/sound/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/sound/index.js b/src/sound/index.js index 8a79cab62..ed684c30b 100644 --- a/src/sound/index.js +++ b/src/sound/index.js @@ -8,6 +8,20 @@ * @namespace Phaser.Sound */ +/** + * Config object containing various sound settings. + * + * @typedef {object} SoundConfig + * + * @property {boolean} [mute=false] - Boolean indicating whether the sound should be muted or not. + * @property {number} [volume=1] - A value between 0 (silence) and 1 (full volume). + * @property {number} [rate=1] - Defines the speed at which the sound should be played. + * @property {number} [detune=0] - Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * @property {number} [seek=0] - Position of playback for this sound, in seconds. + * @property {boolean} [loop=false] - Whether or not the sound or current sound marker should loop. + * @property {number} [delay=0] - Time, in seconds, that should elapse before the sound actually starts its playback. + */ + module.exports = { SoundManagerCreator: require('./SoundManagerCreator'), From 28bf61f846db9ce8ffd63b0ae2343f72076afc2f Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:29:49 +0100 Subject: [PATCH 036/200] Added docs for defining SoundMarker custom type --- src/sound/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sound/index.js b/src/sound/index.js index ed684c30b..3f2ef171d 100644 --- a/src/sound/index.js +++ b/src/sound/index.js @@ -22,6 +22,17 @@ * @property {number} [delay=0] - Time, in seconds, that should elapse before the sound actually starts its playback. */ +/** + * Marked section of a sound represented by name, and optionally start time, duration, and config object. + * + * @typedef {object} SoundMarker + * + * @property {string} name - Unique identifier of a sound marker. + * @property {number} [start=0] - Sound position offset at witch playback should start. + * @property {number} [duration] - Playback duration of this marker. + * @property {SoundConfig} [config] - An optional config object containing default marker settings. + */ + module.exports = { SoundManagerCreator: require('./SoundManagerCreator'), From 99c5053acbed4a4e94dcc6cf967cabe3666eb916 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:50:32 +0100 Subject: [PATCH 037/200] Added BaseSound class description --- src/sound/BaseSound.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index e13810ccb..80bc76cf3 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -11,7 +11,7 @@ var NOOP = require('../utils/NOOP'); /** * @classdesc - * [description] + * Class containing all the shared state and behaviour of a sound object, independent of the implementation. * * @class BaseSound * @extends EventEmitter @@ -410,7 +410,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -431,7 +431,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -452,7 +452,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -503,7 +503,7 @@ var BaseSound = new Class({ * @override * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ From 82119c160144ee1e00e88b38a3e35c165a84a47c Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:51:50 +0100 Subject: [PATCH 038/200] Fixed constructor config param docs --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 80bc76cf3..3b5d37d08 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -22,7 +22,7 @@ var NOOP = require('../utils/NOOP'); * * @param {Phaser.Sound.BaseSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {object} config - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. */ var BaseSound = new Class({ From 1c66d388343bed911d329d695e1dab4f3966a524 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:52:39 +0100 Subject: [PATCH 039/200] Fixed config property docs --- src/sound/BaseSound.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 3b5d37d08..265199074 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -115,7 +115,8 @@ var BaseSound = new Class({ * Default values will be set by properties' setters. * * @name Phaser.Sound.BaseSound#config - * @type {object} + * @type {SoundConfig} + * @private * @since 3.0.0 */ this.config = { From 42fc672174716cfbee10622cd825f1b1b1ff6f05 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:52:57 +0100 Subject: [PATCH 040/200] Fixed currentConfig property docs --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 265199074..8de677d0f 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -131,7 +131,7 @@ var BaseSound = new Class({ * It could be default config or marker config. * * @name Phaser.Sound.BaseSound#currentConfig - * @type {object} + * @type {SoundConfig} * @private * @since 3.0.0 */ From 05a20d6435bf7c811dd45d13df30ca01ee770936 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:53:47 +0100 Subject: [PATCH 041/200] Removed duplicate docs --- src/sound/BaseSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 8de677d0f..567c6a030 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -205,14 +205,6 @@ var BaseSound = new Class({ * @since 3.0.0 */ this.loop = false; - - /** - * [description] - * - * @name Phaser.Sound.BaseSound#config - * @type {object} - * @since 3.0.0 - */ this.config = Extend(this.config, config); /** From 9adce2b40ebc268621593a6cfe58220a747b9100 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:54:16 +0100 Subject: [PATCH 042/200] Fixed markers property docs --- src/sound/BaseSound.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 567c6a030..62b09fd2d 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -208,10 +208,10 @@ var BaseSound = new Class({ this.config = Extend(this.config, config); /** - * Object containing markers definitions (Object.) + * Object containing markers definitions. * * @name Phaser.Sound.BaseSound#markers - * @type {object} + * @type {Object.} * @default {} * @readOnly * @since 3.0.0 From 6a828b3943d35f0cbb9fcda0e6f2d511ce1de634 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:54:36 +0100 Subject: [PATCH 043/200] Fixed currentMarker property docs --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 62b09fd2d..572204c7b 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -223,7 +223,7 @@ var BaseSound = new Class({ * 'null' if whole sound is playing. * * @name Phaser.Sound.BaseSound#currentMarker - * @type {?ISoundMarker} + * @type {SoundMarker} * @default null * @readOnly * @since 3.0.0 From 942fd093978902c0f3c13b64b6690083569d7827 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:55:08 +0100 Subject: [PATCH 044/200] Fixed addMarker method docs --- src/sound/BaseSound.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 572204c7b..c90a84f57 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -249,9 +249,9 @@ var BaseSound = new Class({ * @method Phaser.Sound.BaseSound#addMarker * @since 3.0.0 * - * @param {ISoundMarker} marker - Marker object + * @param {SoundMarker} marker - Marker object. * - * @return {boolean} Whether the marker was added successfully + * @return {boolean} Whether the marker was added successfully. */ addMarker: function (marker) { From af89faa83e2015a9c3548245b0169587da3ba952 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:55:56 +0100 Subject: [PATCH 045/200] Adjusted default marker duration value calculation --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index c90a84f57..b6cbba0c8 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -270,7 +270,7 @@ var BaseSound = new Class({ marker = Extend(true, { name: '', start: 0, - duration: this.totalDuration, + duration: this.totalDuration - (marker.start || 0), config: { mute: false, volume: 1, From 9959d42fbc102fff6e619176ec78acea0ecb3334 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:56:25 +0100 Subject: [PATCH 046/200] Fixed updateMarker method docs --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index b6cbba0c8..e5bfd8153 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -293,7 +293,7 @@ var BaseSound = new Class({ * @method Phaser.Sound.BaseSound#updateMarker * @since 3.0.0 * - * @param {ISoundMarker} marker - Marker object with updated values. + * @param {SoundMarker} marker - Marker object with updated values. * * @return {boolean} Whether the marker was updated successfully. */ From 36475d53816c4cfb861f2068b93360fbac57adc6 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:57:11 +0100 Subject: [PATCH 047/200] Fixed removeMarker method docs --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index e5bfd8153..be121ea18 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -324,7 +324,7 @@ var BaseSound = new Class({ * * @param {string} markerName - The name of the marker to remove. * - * @return {ISoundMarker|null} Removed marker object or 'null' if there was no marker with provided name. + * @return {SoundMarker|null} Removed marker object or 'null' if there was no marker with provided name. */ removeMarker: function (markerName) { From ac95880995497daa4ba56bea2c4de4f3c5255d9a Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:57:48 +0100 Subject: [PATCH 048/200] Fixed play method docs --- src/sound/BaseSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index be121ea18..a29ebbff2 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -349,7 +349,7 @@ var BaseSound = new Class({ * @since 3.0.0 * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. * * @return {boolean} Whether the sound started playing successfully. */ From d352363424a22b493b2ae9b63c81ad5107adcc82 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:58:56 +0100 Subject: [PATCH 049/200] Removed duplicate docs --- src/sound/BaseSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index a29ebbff2..858883139 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -543,14 +543,6 @@ var BaseSound = new Class({ this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate; } }); - -/** - * Playback rate. - * - * @name Phaser.Sound.BaseSound#rate - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSound.prototype, 'rate', { get: function () From d637f04caf8ad9633d129987fc77d12d9765dcf3 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 15:59:43 +0100 Subject: [PATCH 050/200] Removed duplicate docs --- src/sound/BaseSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 858883139..a465fd48c 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -563,14 +563,6 @@ Object.defineProperty(BaseSound.prototype, 'rate', { this.emit('rate', this, value); } }); - -/** - * Detuning of sound. - * - * @name Phaser.Sound.BaseSound#detune - * @property {number} detune - * @since 3.0.0 - */ Object.defineProperty(BaseSound.prototype, 'detune', { get: function () From f8ac9dcabbde10f820457bc64a991577da5c51fc Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 16:06:40 +0100 Subject: [PATCH 051/200] Updated docs --- src/sound/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound/index.js b/src/sound/index.js index 3f2ef171d..0dee8675a 100644 --- a/src/sound/index.js +++ b/src/sound/index.js @@ -6,6 +6,8 @@ /** * @namespace Phaser.Sound + * + * @author Pavle Goloskokovic (http://prunegames.com) */ /** From 472da3dc22d7c3639827e836f1c7291de743da89 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 16:07:06 +0100 Subject: [PATCH 052/200] Updated docs --- src/sound/SoundManagerCreator.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/SoundManagerCreator.js b/src/sound/SoundManagerCreator.js index 84ea68183..4863c0895 100644 --- a/src/sound/SoundManagerCreator.js +++ b/src/sound/SoundManagerCreator.js @@ -12,6 +12,7 @@ var WebAudioSoundManager = require('./webaudio/WebAudioSoundManager'); * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. * * @function Phaser.Sound.SoundManagerCreator + * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. From 3faaf2859626e5fcb57238c5fdd96adda4fa2f67 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:16:19 +0100 Subject: [PATCH 053/200] Fixed sounds property docs --- src/sound/BaseSoundManager.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index f4c82dc97..46e932991 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -48,7 +48,7 @@ var BaseSoundManager = new Class({ * An array containing all added sounds. * * @name Phaser.Sound.BaseSoundManager#sounds - * @type {array} + * @type {Phaser.Sound.BaseSound[]} * @default [] * @private * @since 3.0.0 @@ -183,10 +183,10 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#add * @override * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {ISound} The new sound instance. */ add: NOOP, @@ -196,10 +196,10 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#addAudioSprite * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {IAudioSpriteSound} The new audio sprite sound instance. */ addAudioSprite: function (key, config) @@ -239,10 +239,10 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#play * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {ISoundConfig | ISoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. - * + * * @return {boolean} Whether the sound started playing successfully. */ play: function (key, extra) @@ -275,11 +275,11 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#playAudioSprite * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {string} spriteName - The name of the sound sprite to play. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {boolean} Whether the audio sprite sound started playing successfully. */ playAudioSprite: function (key, spriteName, config) @@ -297,9 +297,9 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#remove * @since 3.0.0 - * + * * @param {ISound} sound - The sound object to remove. - * + * * @return {boolean} True if the sound was removed successfully, otherwise false. */ remove: function (sound) @@ -320,9 +320,9 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#removeByKey * @since 3.0.0 - * + * * @param {string} key - The key to match when removing sound objects. - * + * * @return {number} The number of matching sound objects that were removed. */ removeByKey: function (key) @@ -443,7 +443,7 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ @@ -501,7 +501,7 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#forEachActiveSound * @private * @since 3.0.0 - * + * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void * @param [scope] - Callback context. */ From 8d55a4aeb4cd5cfa77ab7af92e7986b73ef8fde6 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:16:46 +0100 Subject: [PATCH 054/200] Fixed locked property docs --- src/sound/BaseSoundManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 46e932991..5441d3f7b 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -156,6 +156,7 @@ var BaseSoundManager = new Class({ * * @name Phaser.Sound.BaseSoundManager#locked * @type {boolean} + * @readOnly * @since 3.0.0 */ this.locked = this.locked || false; From cb939cc7d89a7a7b36d1146e3b75b06362244f4d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:17:04 +0100 Subject: [PATCH 055/200] Fixed unlocked property docs --- src/sound/BaseSoundManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 5441d3f7b..b866bd647 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -168,6 +168,7 @@ var BaseSoundManager = new Class({ * @name Phaser.Sound.BaseSoundManager#unlocked * @type {boolean} * @default false + * @private * @since 3.0.0 */ this.unlocked = false; From 5e41c48b3da23d558e2f292b6e28bcd4f2357a36 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:18:13 +0100 Subject: [PATCH 056/200] Fixed add method docs --- src/sound/BaseSoundManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index b866bd647..ec6fd8241 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -187,9 +187,9 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. * - * @return {ISound} The new sound instance. + * @return {Phaser.Sound.BaseSound} The new sound instance. */ add: NOOP, From af76f7f9f16e365d7afddc2a57613c045840ecc6 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:18:55 +0100 Subject: [PATCH 057/200] Added docs type definition for audiosprite sound object --- src/sound/BaseSoundManager.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index ec6fd8241..1d9eecf01 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -193,6 +193,14 @@ var BaseSoundManager = new Class({ */ add: NOOP, + /** + * Audio sprite sound type. + * + * @typedef {Phaser.Sound.BaseSound} AudioSpriteSound + * + * @property {object} spritemap - Local reference to 'spritemap' object form json file generated by audiosprite tool. + */ + /** * Adds a new audio sprite sound into the sound manager. * From 24f5de4c5cfc2be083b536e0b084841f3c99ca4f Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:19:24 +0100 Subject: [PATCH 058/200] Fixed addAudioSprite method docs --- src/sound/BaseSoundManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 1d9eecf01..a5e5ff138 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -208,9 +208,9 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. * - * @return {IAudioSpriteSound} The new audio sprite sound instance. + * @return {AudioSpriteSound} The new audio sprite sound instance. */ addAudioSprite: function (key, config) { From 3f201121f8cef450d945bc0e85d4fd056caedb06 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:19:43 +0100 Subject: [PATCH 059/200] Removed unnecessary docs --- src/sound/BaseSoundManager.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index a5e5ff138..e3c7274cf 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -216,11 +216,6 @@ var BaseSoundManager = new Class({ { var sound = this.add(key, config); - /** - * Local reference to 'spritemap' object form json file generated by audiosprite tool. - * - * @property {object} spritemap - */ sound.spritemap = this.game.cache.json.get(key).spritemap; for (var markerName in sound.spritemap) From b03bc3e3afa61338bb4260a592439d1d73b931a7 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:20:09 +0100 Subject: [PATCH 060/200] Fixed play method docs --- src/sound/BaseSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index e3c7274cf..88c3a038b 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -246,7 +246,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig | ISoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. + * @param {SoundConfig|SoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. * * @return {boolean} Whether the sound started playing successfully. */ From 91d40a95317132857212519fbeb5c0a62827a288 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:20:42 +0100 Subject: [PATCH 061/200] Fixed playAudioSprite method docs --- src/sound/BaseSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 88c3a038b..d093df929 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -283,7 +283,7 @@ var BaseSoundManager = new Class({ * * @param {string} key - Asset key for the sound. * @param {string} spriteName - The name of the sound sprite to play. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. * * @return {boolean} Whether the audio sprite sound started playing successfully. */ From 3c9542f5652c44e0cb59a9167835a8559f727500 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:21:11 +0100 Subject: [PATCH 062/200] Fixed remove method docs --- src/sound/BaseSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index d093df929..b41104b03 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -303,7 +303,7 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#remove * @since 3.0.0 * - * @param {ISound} sound - The sound object to remove. + * @param {Phaser.Sound.BaseSound} sound - The sound object to remove. * * @return {boolean} True if the sound was removed successfully, otherwise false. */ From 7939edb8b4637955eabd6b370391d8e3f933aa40 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:21:54 +0100 Subject: [PATCH 063/200] Removed duplicate docs --- src/sound/BaseSoundManager.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index b41104b03..14f001e58 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -524,14 +524,6 @@ var BaseSoundManager = new Class({ } }); - -/** - * Global playback rate. - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSoundManager.prototype, 'rate', { get: function () From 07263863a701ad9582e80b2ee438a844230dfa4f Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 17:22:07 +0100 Subject: [PATCH 064/200] Removed duplicate docs --- src/sound/BaseSoundManager.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 14f001e58..9bb326a8f 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -548,14 +548,6 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', { } }); - -/** - * Global detune. - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSoundManager.prototype, 'detune', { get: function () From 6a241358c40d845f9135a260747814cfbb494864 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:12:04 +0100 Subject: [PATCH 065/200] Reverted type changes --- src/sound/BaseSound.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index a465fd48c..2aaa0ae4b 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -208,10 +208,10 @@ var BaseSound = new Class({ this.config = Extend(this.config, config); /** - * Object containing markers definitions. + * Object containing markers definitions (Object.). * * @name Phaser.Sound.BaseSound#markers - * @type {Object.} + * @type {object} * @default {} * @readOnly * @since 3.0.0 @@ -355,7 +355,7 @@ var BaseSound = new Class({ */ play: function (markerName, config) { - if (markerName === undefined) { markerName = ''; } + if (markerName === void 0) { markerName = ''; } if (typeof markerName === 'object') { From a50f7adb1c2734932d76d58b89da3fda0b24a8b9 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:12:16 +0100 Subject: [PATCH 066/200] Reverted type changes --- src/sound/BaseSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 9bb326a8f..52d121688 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -48,7 +48,7 @@ var BaseSoundManager = new Class({ * An array containing all added sounds. * * @name Phaser.Sound.BaseSoundManager#sounds - * @type {Phaser.Sound.BaseSound[]} + * @type {array} * @default [] * @private * @since 3.0.0 From 5f18bb263b83bd806d288a5f5fead876fec56494 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:28:55 +0100 Subject: [PATCH 067/200] Fixed constructor docs --- src/sound/webaudio/WebAudioSound.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 539c8d9be..57b80cf48 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -20,7 +20,7 @@ var BaseSound = require('../BaseSound'); * * @param {Phaser.Sound.WebAudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var WebAudioSound = new Class({ @@ -186,10 +186,10 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#play * @since 3.0.0 - * + * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. - * + * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) @@ -217,7 +217,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -250,7 +250,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -282,7 +282,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -350,7 +350,7 @@ var WebAudioSound = new Class({ * @method Phaser.Sound.WebAudioSound#createBufferSource * @private * @since 3.0.0 - * + * * @return {AudioBufferSourceNode} */ createBufferSource: function () @@ -445,7 +445,7 @@ var WebAudioSound = new Class({ * @method Phaser.Sound.WebAudioSound#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ From 0137e18d7bdaf2a1a5e36b06a73bbc39d7a12086 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:29:18 +0100 Subject: [PATCH 068/200] Fixed source property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 57b80cf48..d3e59bdf5 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -55,6 +55,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#source * @type {AudioBufferSourceNode} + * @private * @default null * @since 3.0.0 */ From 7db6ac48b35d382ae9e3ebe2dfdfe0414c709980 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:29:36 +0100 Subject: [PATCH 069/200] Fixed loopSource property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index d3e59bdf5..f2724a74d 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -66,6 +66,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#loopSource * @type {AudioBufferSourceNode} + * @private * @default null * @since 3.0.0 */ From a13c6b778e9e14753c29533b20862324bc655b4f Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:29:52 +0100 Subject: [PATCH 070/200] Fixed muteNode property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index f2724a74d..73f499518 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -77,6 +77,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#muteNode * @type {GainNode} + * @private * @since 3.0.0 */ this.muteNode = manager.context.createGain(); From eeeeea71ac2ee62c38abf0db901c4462102b52c5 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:30:10 +0100 Subject: [PATCH 071/200] Fixed volumeNode property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 73f499518..888c1b566 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -87,6 +87,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#volumeNode * @type {GainNode} + * @private * @since 3.0.0 */ this.volumeNode = manager.context.createGain(); From 919ed923eefd175ac5cccd2c439079de97c8500a Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:30:24 +0100 Subject: [PATCH 072/200] Fixed playTime property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 888c1b566..aba99b349 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -98,6 +98,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#playTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ From 7b3f457378bde7cac4f965ae0ab65c44030aff6e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:30:44 +0100 Subject: [PATCH 073/200] Fixed startTime property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index aba99b349..e39752e8a 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -110,6 +110,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#startTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ From a20095389d3dc095e5edf4fd7de2db418770f91d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:31:02 +0100 Subject: [PATCH 074/200] Fixed loopTime property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index e39752e8a..08e378abd 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -122,6 +122,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#loopTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ From baaa92c62d7d276237b411aca03e4ad99a37d2d6 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:31:25 +0100 Subject: [PATCH 075/200] Fixed rateUpdates property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 08e378abd..d1b886e70 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -135,6 +135,7 @@ var WebAudioSound = new Class({ * @name Phaser.Sound.WebAudioSound#rateUpdates * @type {array} * @private + * @default [] * @since 3.0.0 */ this.rateUpdates = []; From 650cc1c395f1f6b8e2a27ecbc613502136b9a900 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:31:41 +0100 Subject: [PATCH 076/200] Fixed hasEnded property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index d1b886e70..64e1b3234 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -146,6 +146,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#hasEnded * @type {boolean} + * @private * @default false * @since 3.0.0 */ From 97b372476209c40dba0b04c2f2805f34f9526c06 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:31:57 +0100 Subject: [PATCH 077/200] Fixed hasLooped property docs --- src/sound/webaudio/WebAudioSound.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 64e1b3234..6533d3fd9 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -158,6 +158,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#hasLooped * @type {boolean} + * @private * @default false * @since 3.0.0 */ From c25345c2d54334d3dc5455ec97076cdf4c9943dc Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:32:41 +0100 Subject: [PATCH 078/200] Removed redundant docs --- src/sound/webaudio/WebAudioSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 6533d3fd9..b5408bf9e 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -165,16 +165,8 @@ var WebAudioSound = new Class({ this.hasLooped = false; this.muteNode.connect(this.volumeNode); - this.volumeNode.connect(manager.destination); - /** - * [description] - * - * @name Phaser.Sound.WebAudioSound#duration - * @type {number} - * @since 3.0.0 - */ this.duration = this.audioBuffer.duration; /** From 0ecda6b08dc871b60e5c5df4734d21cad71c4a71 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:32:57 +0100 Subject: [PATCH 079/200] Removed redundant docs --- src/sound/webaudio/WebAudioSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index b5408bf9e..28b51c429 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -168,14 +168,6 @@ var WebAudioSound = new Class({ this.volumeNode.connect(manager.destination); this.duration = this.audioBuffer.duration; - - /** - * [description] - * - * @name Phaser.Sound.WebAudioSound#totalDuration - * @type {number} - * @since 3.0.0 - */ this.totalDuration = this.audioBuffer.duration; BaseSound.call(this, manager, key, config); From a0098a2994379a3ce75a4fa066d7f0f7aa71ac57 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:33:30 +0100 Subject: [PATCH 080/200] Fixed play method docs --- src/sound/webaudio/WebAudioSound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 28b51c429..d6ea0079c 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -182,7 +182,7 @@ var WebAudioSound = new Class({ * @since 3.0.0 * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. * * @return {boolean} Whether the sound started playing successfully. */ From 124722e27ac046d4cff16032fa91d50b35fc5de7 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:34:13 +0100 Subject: [PATCH 081/200] ESLint fix --- src/sound/webaudio/WebAudioSound.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index d6ea0079c..0fa3bfa78 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -443,7 +443,8 @@ var WebAudioSound = new Class({ * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ - update: function () + // eslint-disable-next-line no-unused-vars + update: function (time, delta) { if (this.hasEnded) { From 2fb6590da38e9dcef83ab3cc35b62e0884e4fdfd Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:34:39 +0100 Subject: [PATCH 082/200] Removed redundant docs --- src/sound/webaudio/WebAudioSound.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 0fa3bfa78..a211dc2cf 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -576,12 +576,6 @@ var WebAudioSound = new Class({ } }); -/** - * Mute setting. - * - * @name Phaser.Sound.WebAudioSound#mute - * @type {boolean} - */ Object.defineProperty(WebAudioSound.prototype, 'mute', { get: function () From 75fb69ff326cced4e661b5bf640b58028093796d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:34:57 +0100 Subject: [PATCH 083/200] Removed redundant docs --- src/sound/webaudio/WebAudioSound.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index a211dc2cf..d3b638a3a 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -598,12 +598,6 @@ Object.defineProperty(WebAudioSound.prototype, 'mute', { }); -/** - * Volume setting. - * - * @name Phaser.Sound.WebAudioSound#volume - * @type {number} - */ Object.defineProperty(WebAudioSound.prototype, 'volume', { get: function () From 8760c39beb0fe07d01e16db3d8f7d1d2a1d24542 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:35:36 +0100 Subject: [PATCH 084/200] Removed redundant docs --- src/sound/webaudio/WebAudioSound.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index d3b638a3a..7cf866fc9 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -620,12 +620,6 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', { }); -/** - * Current position of playing sound. - * - * @name Phaser.Sound.WebAudioSound#seek - * @type {number} - */ Object.defineProperty(WebAudioSound.prototype, 'seek', { get: function () From 18588efcc70adc4f2dde917b7bf81f762ce706b1 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 19:35:53 +0100 Subject: [PATCH 085/200] Removed redundant docs --- src/sound/webaudio/WebAudioSound.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 7cf866fc9..6d58d3ba7 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -669,13 +669,6 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { }); -/** - * Property indicating whether or not - * the sound or current sound marker will loop. - * - * @name Phaser.Sound.WebAudioSound#loop - * @type {boolean} - */ Object.defineProperty(WebAudioSound.prototype, 'loop', { get: function () From 64e5b4394a8842b6b2acb1e02e55c03110ef082d Mon Sep 17 00:00:00 2001 From: samme Date: Sun, 18 Feb 2018 10:38:08 -0800 Subject: [PATCH 086/200] Fix 'static is a reserved word in strict mode' --- src/physics/arcade/World.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 193527f8f..05dc112ad 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -695,7 +695,7 @@ var World = new Class({ var body; var dynamic = this.bodies; - var static = this.staticBodies; + var staticBodies = this.staticBodies; var pending = this.pendingDestroy; var bodies = dynamic.entries; @@ -727,7 +727,7 @@ var World = new Class({ } } - bodies = static.entries; + bodies = staticBodies.entries; len = bodies.length; for (i = 0; i < len; i++) @@ -761,7 +761,7 @@ var World = new Class({ else if (body.physicsType === CONST.STATIC_BODY) { staticTree.remove(body); - static.delete(body); + staticBodies.delete(body); } body.world = undefined; From 89eaea2e8e3237013c38d1515636bc4aeedc5b07 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:01:01 +0100 Subject: [PATCH 087/200] Fixed context property docs --- src/sound/webaudio/WebAudioSoundManager.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 71fc95691..716616b04 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -18,7 +18,7 @@ var WebAudioSound = require('./WebAudioSound'); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. */ var WebAudioSoundManager = new Class({ @@ -34,6 +34,7 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#context * @type {AudioContext} + * @private * @since 3.0.0 */ this.context = this.createAudioContext(game); @@ -91,9 +92,9 @@ var WebAudioSoundManager = new Class({ * @method Phaser.Sound.WebAudioSoundManager#createAudioContext * @private * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. - * + * * @return {AudioContext} The AudioContext instance to be used for playback. */ createAudioContext: function (game) @@ -114,10 +115,10 @@ var WebAudioSoundManager = new Class({ * * @method Phaser.Sound.WebAudioSoundManager#add * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {Phaser.Sound.WebAudioSound} The new sound instance. */ add: function (key, config) From 12efd5da3e655f372eadbd016707df0bd8f3a518 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:01:29 +0100 Subject: [PATCH 088/200] Fixed masterMuteNode property docs --- src/sound/webaudio/WebAudioSoundManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 716616b04..129db6b44 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -44,6 +44,7 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#masterMuteNode * @type {GainNode} + * @private * @since 3.0.0 */ this.masterMuteNode = this.context.createGain(); From 9550d6f9fe5c92a567c9f7a2efc1e304d21ae47e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:01:45 +0100 Subject: [PATCH 089/200] Fixed masterVolumeNode property docs --- src/sound/webaudio/WebAudioSoundManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 129db6b44..39f77e111 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -54,6 +54,7 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#masterVolumeNode * @type {GainNode} + * @private * @since 3.0.0 */ this.masterVolumeNode = this.context.createGain(); From 9ce14d62be0e4c66e58183abfc96b71f791adfd4 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:02:06 +0100 Subject: [PATCH 090/200] Fixed destination property docs --- src/sound/webaudio/WebAudioSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 39f77e111..a5bf1857f 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -60,7 +60,6 @@ var WebAudioSoundManager = new Class({ this.masterVolumeNode = this.context.createGain(); this.masterMuteNode.connect(this.masterVolumeNode); - this.masterVolumeNode.connect(this.context.destination); /** @@ -68,6 +67,7 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#destination * @type {AudioNode} + * @private * @since 3.0.0 */ this.destination = this.masterMuteNode; From e018be1d65309f81e526c0c8f50f2bc2bde05575 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:02:22 +0100 Subject: [PATCH 091/200] Removed redundant docs --- src/sound/webaudio/WebAudioSoundManager.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index a5bf1857f..2743e6b7b 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -72,13 +72,6 @@ var WebAudioSoundManager = new Class({ */ this.destination = this.masterMuteNode; - /** - * Is the Sound Manager touch locked? - * - * @name Phaser.Sound.WebAudioSoundManager#locked - * @type {boolean} - * @since 3.0.0 - */ this.locked = this.context.state === 'suspended' && 'ontouchstart' in window; BaseSoundManager.call(this, game); From 3b6a406e6de9968032fcc1c2d99ac59c18a8a20a Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:02:57 +0100 Subject: [PATCH 092/200] Fixed add method docs --- src/sound/webaudio/WebAudioSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 2743e6b7b..3df7fe03a 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -112,7 +112,7 @@ var WebAudioSoundManager = new Class({ * @since 3.0.0 * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. * * @return {Phaser.Sound.WebAudioSound} The new sound instance. */ From 5131bd657119d1ca40b62a851f4bd6f90db8e358 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:03:21 +0100 Subject: [PATCH 093/200] Removed redundant docs --- src/sound/webaudio/WebAudioSoundManager.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 3df7fe03a..0ed0a9ffe 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -198,12 +198,6 @@ var WebAudioSoundManager = new Class({ } }); -/** - * Global mute setting. - * - * @name Phaser.Sound.WebAudioSoundManager#mute - * @type {boolean} - */ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { get: function () From 87f2d4bf0d36c9e6014154bd243741d1b6ed035b Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:03:37 +0100 Subject: [PATCH 094/200] Removed redundant docs --- src/sound/webaudio/WebAudioSoundManager.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 0ed0a9ffe..105e86c2d 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -219,12 +219,6 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { }); -/** - * Global volume setting. - * - * @name Phaser.Sound.WebAudioSoundManager#volume - * @type {number} - */ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { get: function () From 19384cb914db08ee2298abbfcf1023a694b80474 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:18:41 +0100 Subject: [PATCH 095/200] Fixed class docs --- src/sound/noaudio/NoAudioSound.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 72c29454c..0e739111f 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -19,15 +19,15 @@ var Extend = require('../../utils/object/Extend'); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSound - * @extends EventEmitter + * @extends Phaser.Sound.BaseSound * @memberOf Phaser.Sound * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var NoAudioSound = new Class({ From 6d0ec24aa67bd92f9e57ccfe74680b7d0739adce Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:18:57 +0100 Subject: [PATCH 096/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 0e739111f..4d5b5a2c6 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -38,16 +38,7 @@ var NoAudioSound = new Class({ function NoAudioSound (manager, key, config) { if (config === void 0) { config = {}; } - EventEmitter.call(this); - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#manager - * @type {Phaser.Sound.NoAudioSoundManager} - * @since 3.0.0 - */ this.manager = manager; /** From 7e5b680e3cd9f74da4035426c8656af3eb588976 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:19:31 +0100 Subject: [PATCH 097/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 4d5b5a2c6..a73f9775f 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -40,14 +40,6 @@ var NoAudioSound = new Class({ if (config === void 0) { config = {}; } EventEmitter.call(this); this.manager = manager; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#key - * @type {string} - * @since 3.0.0 - */ this.key = key; /** From 146c998ff704094e26372e39767f59d9c9f953e9 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:19:46 +0100 Subject: [PATCH 098/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index a73f9775f..72ffd5bc4 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -41,15 +41,6 @@ var NoAudioSound = new Class({ EventEmitter.call(this); this.manager = manager; this.key = key; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.isPlaying = false; /** From 455579a42737f80e7f06534dbb26d534669bab35 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:20:11 +0100 Subject: [PATCH 099/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 72ffd5bc4..921307769 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -42,15 +42,6 @@ var NoAudioSound = new Class({ this.manager = manager; this.key = key; this.isPlaying = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#isPaused - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.isPaused = false; /** From cf0732a5995f0271e31999f18405958fb96aca0e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:20:29 +0100 Subject: [PATCH 100/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 921307769..64d050265 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -43,15 +43,6 @@ var NoAudioSound = new Class({ this.key = key; this.isPlaying = false; this.isPaused = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#totalRate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.totalRate = 1; /** From bb4c8404d2a1771e54e088c0a64e72fa239cce40 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:20:45 +0100 Subject: [PATCH 101/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 64d050265..27d4ff2cc 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -44,15 +44,6 @@ var NoAudioSound = new Class({ this.isPlaying = false; this.isPaused = false; this.totalRate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.duration = 0; /** From fe782073cd96ba1706d6dee8fcb972f4f0e1e497 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:20:58 +0100 Subject: [PATCH 102/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 27d4ff2cc..a389f709f 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -45,15 +45,6 @@ var NoAudioSound = new Class({ this.isPaused = false; this.totalRate = 1; this.duration = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#totalDuration - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.totalDuration = 0; /** From 56641fa7ee7d842da8778c831886f57955522a77 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:21:14 +0100 Subject: [PATCH 103/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index a389f709f..0eaad9c3d 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -46,14 +46,6 @@ var NoAudioSound = new Class({ this.totalRate = 1; this.duration = 0; this.totalDuration = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#config - * @type {object} - * @since 3.0.0 - */ this.config = Extend({ mute: false, volume: 1, From 05581a4c49e14a4f963ce8cfedc8337a0af53529 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:21:29 +0100 Subject: [PATCH 104/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 0eaad9c3d..e3692cb6e 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -55,14 +55,6 @@ var NoAudioSound = new Class({ loop: false, delay: 0 }, config); - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#currentConfig - * @type {[type]} - * @since 3.0.0 - */ this.currentConfig = this.config; /** From daeba568b9246a3a9cdef1418db59d1dbd0a1f40 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:21:42 +0100 Subject: [PATCH 105/200] Fixed play method docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index e3692cb6e..135f34b64 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -56,15 +56,6 @@ var NoAudioSound = new Class({ delay: 0 }, config); this.currentConfig = this.config; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#mute - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.mute = false; /** From d9af59c72ecb615e8b17db6f40a9609272b4546b Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:21:57 +0100 Subject: [PATCH 106/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 135f34b64..629f08e78 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -57,15 +57,6 @@ var NoAudioSound = new Class({ }, config); this.currentConfig = this.config; this.mute = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#volume - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.volume = 1; /** From 870f1d95a510ea86c02034fc9c25237be7095fcd Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:22:07 +0100 Subject: [PATCH 107/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 629f08e78..2813f2f7c 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -58,15 +58,6 @@ var NoAudioSound = new Class({ this.currentConfig = this.config; this.mute = false; this.volume = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.rate = 1; /** From 5a34d1ae2c6547a0bb7e2c18f1ea6718c9d795fe Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:22:17 +0100 Subject: [PATCH 108/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 2813f2f7c..9b575a7e1 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -59,15 +59,6 @@ var NoAudioSound = new Class({ this.mute = false; this.volume = 1; this.rate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.detune = 0; /** From bb7909b7f0d48fddb69ff7f84b862a723b12d3d8 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:22:27 +0100 Subject: [PATCH 109/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 9b575a7e1..b4b5f3e01 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -60,15 +60,6 @@ var NoAudioSound = new Class({ this.volume = 1; this.rate = 1; this.detune = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#seek - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.seek = 0; /** From 98fdfde9728dd50379e58f22b3a76f26e386ea05 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:22:39 +0100 Subject: [PATCH 110/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index b4b5f3e01..e3960aae5 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -61,15 +61,6 @@ var NoAudioSound = new Class({ this.rate = 1; this.detune = 0; this.seek = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#loop - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.loop = false; /** From 43eec1c43c61c59104691650b365837bb14f6695 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:22:52 +0100 Subject: [PATCH 111/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index e3960aae5..b67a985be 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -62,15 +62,6 @@ var NoAudioSound = new Class({ this.detune = 0; this.seek = 0; this.loop = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#markers - * @type {object} - * @default {} - * @since 3.0.0 - */ this.markers = {}; /** From 8945fa798ea707152d8587e7d5f481128c7573a7 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:23:02 +0100 Subject: [PATCH 112/200] Fixed play method docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index b67a985be..1df01234a 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -63,15 +63,6 @@ var NoAudioSound = new Class({ this.seek = 0; this.loop = false; this.markers = {}; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#currentMarker - * @type {?[type]} - * @default null - * @since 3.0.0 - */ this.currentMarker = null; /** From 7522e8613fdca8195ad797a2e1165c743d1cb09f Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:23:15 +0100 Subject: [PATCH 113/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 1df01234a..aa2276640 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -64,15 +64,6 @@ var NoAudioSound = new Class({ this.loop = false; this.markers = {}; this.currentMarker = null; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#pendingRemove - * @type {boolean} - * @default null - * @since 3.0.0 - */ this.pendingRemove = false; }, From 3bcf9363473cb0034ad894a5a535018de3e26aaf Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:23:31 +0100 Subject: [PATCH 114/200] Fixed play method docs, eslint fix --- src/sound/noaudio/NoAudioSound.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index aa2276640..2e32eb426 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -66,16 +66,8 @@ var NoAudioSound = new Class({ this.currentMarker = null; this.pendingRemove = false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#addMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - addMarker: function () + // eslint-disable-next-line no-unused-vars + addMarker: function (marker) { return false; }, From 06fba3b6c75f1cd7afee6cdf8a20b25a971b2ab1 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:23:55 +0100 Subject: [PATCH 115/200] Removed redundant docs, eslint fix --- src/sound/noaudio/NoAudioSound.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 2e32eb426..ba4bd32fa 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -71,16 +71,8 @@ var NoAudioSound = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#updateMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - updateMarker: function () + // eslint-disable-next-line no-unused-vars + updateMarker: function (marker) { return false; }, From 8cf45cdc7eae013e7b3185d1e10f4e88c487db0e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:24:05 +0100 Subject: [PATCH 116/200] Removed redundant docs, eslint fix --- src/sound/noaudio/NoAudioSound.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index ba4bd32fa..2fffa9030 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -76,16 +76,8 @@ var NoAudioSound = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#removeMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - removeMarker: function () + // eslint-disable-next-line no-unused-vars + removeMarker: function (markerName) { return null; }, From a733ce8054b341d9faae6e10064c4b801801e58b Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:24:18 +0100 Subject: [PATCH 117/200] Removed redundant docs, eslint fix --- src/sound/noaudio/NoAudioSound.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 2fffa9030..4e543b4c2 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -81,16 +81,8 @@ var NoAudioSound = new Class({ { return null; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#play - * @since 3.0.0 - * - * @return {boolean} False - */ - play: function () + // eslint-disable-next-line no-unused-vars + play: function (markerName, config) { return false; }, From 5c631d8b8ebd452741ea4127b8a20c3a2687ac36 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:24:31 +0100 Subject: [PATCH 118/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 4e543b4c2..6da8c1e7f 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -86,15 +86,6 @@ var NoAudioSound = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#pause - * @since 3.0.0 - * - * @return {boolean} False - */ pause: function () { return false; From 4efd588123582d07483c3f2b9d83c1880fa376e0 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:24:44 +0100 Subject: [PATCH 119/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 6da8c1e7f..aae78fb73 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -90,15 +90,6 @@ var NoAudioSound = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#resume - * @since 3.0.0 - * - * @return {boolean} False - */ resume: function () { return false; From b92f958a4f107de66df6aed353b04168c143a9b5 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:25:00 +0100 Subject: [PATCH 120/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index aae78fb73..2c239e115 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -94,15 +94,6 @@ var NoAudioSound = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#stop - * @since 3.0.0 - * - * @return {boolean} False - */ stop: function () { return false; From d7f25fb36331020825179f9a29278ade0a4197fb Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:25:22 +0100 Subject: [PATCH 121/200] Removed redundant docs --- src/sound/noaudio/NoAudioSound.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 2c239e115..73e693f3b 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -98,13 +98,6 @@ var NoAudioSound = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#destroy - * @since 3.0.0 - */ destroy: function () { this.manager.remove(this); From 67fd912c1fbbbc0f6ab941582b0794f6853cef69 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:34:16 +0100 Subject: [PATCH 122/200] Fixed class docs --- src/sound/noaudio/NoAudioSoundManager.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index e20d9d98a..277c27fe8 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -20,7 +20,7 @@ var NOOP = require('../../utils/NOOP'); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSoundManager - * @extends EventEmitter + * @extends Phaser.Sound.BaseSoundManager * @memberOf Phaser.Sound * @constructor * @author Pavle Goloskokovic (http://prunegames.com) @@ -126,7 +126,7 @@ var NoAudioSoundManager = new Class({ * * @param {string} key - Asset key for the sound. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {ISound} The new sound instance. */ add: function (key, config) @@ -146,7 +146,7 @@ var NoAudioSoundManager = new Class({ * * @param {string} key - Asset key for the sound. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {IAudioSpriteSound} The new audio sprite sound instance. */ addAudioSprite: function (key, config) @@ -189,7 +189,7 @@ var NoAudioSoundManager = new Class({ * @since 3.0.0 * * @param {ISound} sound - The sound object to remove. - * + * * @return {boolean} True if the sound was removed successfully, otherwise false. */ remove: function (sound) @@ -204,7 +204,7 @@ var NoAudioSoundManager = new Class({ * @since 3.0.0 * * @param {string} key - The key to match when removing sound objects. - * + * * @return {number} The number of matching sound objects that were removed. */ removeByKey: function (key) From 0f6aa558594953986f369f18e969c8dfbf277d98 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:34:37 +0100 Subject: [PATCH 123/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 277c27fe8..e0dd65bdf 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -37,14 +37,6 @@ var NoAudioSoundManager = new Class({ function NoAudioSoundManager (game) { EventEmitter.call(this); - - /** - * Reference to the current game instance. - * - * @name Phaser.Sound.NoAudioSoundManager#game - * @type {Phaser.Game} - * @since 3.0.0 - */ this.game = game; /** From e676d264fad55c2ffba8d846c613163298b23407 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:34:49 +0100 Subject: [PATCH 124/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index e0dd65bdf..053358c86 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -38,15 +38,6 @@ var NoAudioSoundManager = new Class({ { EventEmitter.call(this); this.game = game; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#sounds - * @type {array} - * @default [] - * @since 3.0.0 - */ this.sounds = []; /** From 03a659a9e29165728f5a274cf00763a12eb8486d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:35:02 +0100 Subject: [PATCH 125/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 053358c86..89be17b94 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -39,15 +39,6 @@ var NoAudioSoundManager = new Class({ EventEmitter.call(this); this.game = game; this.sounds = []; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#mute - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.mute = false; /** From 8850435ed30f55d6fac6f0b9d50c38b30fd40509 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:35:14 +0100 Subject: [PATCH 126/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 89be17b94..e64b63eb5 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -40,15 +40,6 @@ var NoAudioSoundManager = new Class({ this.game = game; this.sounds = []; this.mute = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#volume - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.volume = 1; /** From 19bec4d8329e5f04cb2dc047c53b588bd21984b1 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:35:35 +0100 Subject: [PATCH 127/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index e64b63eb5..a91219412 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -41,15 +41,6 @@ var NoAudioSoundManager = new Class({ this.sounds = []; this.mute = false; this.volume = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.rate = 1; /** From c5981812e22bd8c3c7d26f837ae2cf9cfaeedd80 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:35:53 +0100 Subject: [PATCH 128/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index a91219412..33ed65292 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -42,15 +42,6 @@ var NoAudioSoundManager = new Class({ this.mute = false; this.volume = 1; this.rate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.detune = 0; /** From 4dbb8a1deedbaf2a0f63017811959228ece95518 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:36:04 +0100 Subject: [PATCH 129/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 33ed65292..10cc86f1d 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -43,15 +43,6 @@ var NoAudioSoundManager = new Class({ this.volume = 1; this.rate = 1; this.detune = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#pauseOnBlur - * @type {boolean} - * @default true - * @since 3.0.0 - */ this.pauseOnBlur = true; /** From 06d8a21d3af1e5d4e85aeeb52f89f213942fed25 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:36:16 +0100 Subject: [PATCH 130/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 10cc86f1d..5dfa03e16 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -44,15 +44,6 @@ var NoAudioSoundManager = new Class({ this.rate = 1; this.detune = 0; this.pauseOnBlur = true; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#locked - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.locked = false; }, From c140e2e40be367ff2111aa63220eba32b7ebbc60 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:36:59 +0100 Subject: [PATCH 131/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 5dfa03e16..3f71a0c14 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -46,18 +46,6 @@ var NoAudioSoundManager = new Class({ this.pauseOnBlur = true; this.locked = false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#add - * @since 3.0.0 - * - * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {ISound} The new sound instance. - */ add: function (key, config) { var sound = new NoAudioSound(this, key, config); From 2ec0f4f5c572802c43e5651157409992e21e783c Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:37:12 +0100 Subject: [PATCH 132/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 3f71a0c14..6fb735281 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -54,18 +54,6 @@ var NoAudioSoundManager = new Class({ return sound; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#addAudioSprite - * @since 3.0.0 - * - * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {IAudioSpriteSound} The new audio sprite sound instance. - */ addAudioSprite: function (key, config) { var sound = this.add(key, config); From dd9d7690612ee911a049e372adea3ff5eb0bb0ac Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:37:27 +0100 Subject: [PATCH 133/200] Removed redundant docs, eslint fix --- src/sound/noaudio/NoAudioSoundManager.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 6fb735281..811e93b5f 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -60,16 +60,8 @@ var NoAudioSoundManager = new Class({ sound.spritemap = {}; return sound; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#play - * @since 3.0.0 - * - * @return {boolean} No Audio methods always return `false`. - */ - play: function () + // eslint-disable-next-line no-unused-vars + play: function (key, extra) { return false; }, From ae2120b36ac5a557bc7b0dcecd216008e4b52a56 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:37:37 +0100 Subject: [PATCH 134/200] Removed redundant docs, eslint fix --- src/sound/noaudio/NoAudioSoundManager.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 811e93b5f..eef6e6b3f 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -65,16 +65,8 @@ var NoAudioSoundManager = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#playAudioSprite - * @since 3.0.0 - * - * @return {boolean} No Audio methods always return `false`. - */ - playAudioSprite: function () + // eslint-disable-next-line no-unused-vars + playAudioSprite: function (key, spriteName, config) { return false; }, From 4969349f231768f1fdbb00f355f81511332fbaf1 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:37:53 +0100 Subject: [PATCH 135/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index eef6e6b3f..6ff8e4899 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -70,17 +70,6 @@ var NoAudioSoundManager = new Class({ { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#remove - * @since 3.0.0 - * - * @param {ISound} sound - The sound object to remove. - * - * @return {boolean} True if the sound was removed successfully, otherwise false. - */ remove: function (sound) { return BaseSoundManager.prototype.remove.call(this, sound); From ec51794197b796e360ed184c073ae22e46ccb15c Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:38:04 +0100 Subject: [PATCH 136/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 6ff8e4899..4cc3c17cc 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -74,17 +74,6 @@ var NoAudioSoundManager = new Class({ { return BaseSoundManager.prototype.remove.call(this, sound); }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#removeByKey - * @since 3.0.0 - * - * @param {string} key - The key to match when removing sound objects. - * - * @return {number} The number of matching sound objects that were removed. - */ removeByKey: function (key) { return BaseSoundManager.prototype.removeByKey.call(this, key); From 41cf6a2584ecba253246526c3c42e0151078f6ac Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:38:38 +0100 Subject: [PATCH 137/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index 4cc3c17cc..a164e61d9 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -78,21 +78,10 @@ var NoAudioSoundManager = new Class({ { return BaseSoundManager.prototype.removeByKey.call(this, key); }, - pauseAll: NOOP, - resumeAll: NOOP, - stopAll: NOOP, - update: NOOP, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#destroy - * @since 3.0.0 - */ destroy: function () { BaseSoundManager.prototype.destroy.call(this); From fcad5b12d21dabe235b10b93ce65b3ed8255b29e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 20:38:57 +0100 Subject: [PATCH 138/200] Removed redundant docs --- src/sound/noaudio/NoAudioSoundManager.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index a164e61d9..c8772f71e 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -86,16 +86,6 @@ var NoAudioSoundManager = new Class({ { BaseSoundManager.prototype.destroy.call(this); }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#forEachActiveSound - * @since 3.0.0 - * - * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param [scope] - Callback context. - */ forEachActiveSound: function (callbackfn, scope) { BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope); From e9ef90da40567f0b90bb27c4f1e4c02e7d894aad Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:09:14 +0100 Subject: [PATCH 139/200] ESLint fix --- src/sound/BaseSound.js | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/src/sound/BaseSound.js b/src/sound/BaseSound.js index 2aaa0ae4b..ca4fbfe3a 100644 --- a/src/sound/BaseSound.js +++ b/src/sound/BaseSound.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = require('../utils/Class'); var EventEmitter = require('eventemitter3'); var Extend = require('../utils/object/Extend'); @@ -25,12 +24,8 @@ var NOOP = require('../utils/NOOP'); * @param {SoundConfig} [config] - An optional config object containing default sound settings. */ var BaseSound = new Class({ - Extends: EventEmitter, - - initialize: - - function BaseSound (manager, key, config) + initialize: function BaseSound (manager, key, config) { EventEmitter.call(this); @@ -259,14 +254,12 @@ var BaseSound = new Class({ { return false; } - if (this.markers[marker.name]) { // eslint-disable-next-line no-console console.error('addMarker - Marker with name \'' + marker.name + '\' already exists for sound \'' + this.key + '\'!'); return false; } - marker = Extend(true, { name: '', start: 0, @@ -281,9 +274,7 @@ var BaseSound = new Class({ delay: 0 } }, marker); - this.markers[marker.name] = marker; - return true; }, @@ -303,16 +294,13 @@ var BaseSound = new Class({ { return false; } - if (!this.markers[marker.name]) { // eslint-disable-next-line no-console console.error('updateMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return false; } - this.markers[marker.name] = Extend(true, this.markers[marker.name], marker); - return true; }, @@ -329,14 +317,11 @@ var BaseSound = new Class({ removeMarker: function (markerName) { var marker = this.markers[markerName]; - if (!marker) { return null; } - this.markers[markerName] = null; - return marker; }, @@ -356,20 +341,17 @@ var BaseSound = new Class({ play: function (markerName, config) { if (markerName === void 0) { markerName = ''; } - if (typeof markerName === 'object') { config = markerName; markerName = ''; } - if (typeof markerName !== 'string') { // eslint-disable-next-line no-console console.error('Sound marker name has to be a string!'); return false; } - if (!markerName) { this.currentMarker = null; @@ -384,17 +366,14 @@ var BaseSound = new Class({ console.error('No marker with name \'' + markerName + '\' found for sound \'' + this.key + '\'!'); return false; } - this.currentMarker = this.markers[markerName]; this.currentConfig = this.currentMarker.config; this.duration = this.currentMarker.duration; } - this.resetConfig(); this.currentConfig = Extend(this.currentConfig, config); this.isPlaying = true; this.isPaused = false; - return true; }, @@ -412,10 +391,8 @@ var BaseSound = new Class({ { return false; } - this.isPlaying = false; this.isPaused = true; - return true; }, @@ -433,10 +410,8 @@ var BaseSound = new Class({ { return false; } - this.isPlaying = true; this.isPaused = false; - return true; }, @@ -514,7 +489,6 @@ var BaseSound = new Class({ { return; } - this.pendingRemove = true; this.manager = null; this.key = ''; @@ -539,17 +513,14 @@ var BaseSound = new Class({ var cent = 1.0005777895065548; // Math.pow(2, 1/1200); var totalDetune = this.currentConfig.detune + this.manager.detune; var detuneRate = Math.pow(cent, totalDetune); - this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate; } }); Object.defineProperty(BaseSound.prototype, 'rate', { - get: function () { return this.currentConfig.rate; }, - set: function (value) { this.currentConfig.rate = value; @@ -564,12 +535,10 @@ Object.defineProperty(BaseSound.prototype, 'rate', { } }); Object.defineProperty(BaseSound.prototype, 'detune', { - get: function () { return this.currentConfig.detune; }, - set: function (value) { this.currentConfig.detune = value; @@ -583,5 +552,4 @@ Object.defineProperty(BaseSound.prototype, 'detune', { this.emit('detune', this, value); } }); - module.exports = BaseSound; From 9af39924ca6bb8afded9008a3929a9d70eeda480 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:10:37 +0100 Subject: [PATCH 140/200] Updated sounds property docs, ESLint fix --- src/sound/BaseSoundManager.js | 36 ++--------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 52d121688..ca0f73d10 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = require('../utils/Class'); var EventEmitter = require('eventemitter3'); var NOOP = require('../utils/NOOP'); @@ -25,12 +24,8 @@ var NOOP = require('../utils/NOOP'); * @param {Phaser.Game} game - Reference to the current game instance. */ var BaseSoundManager = new Class({ - Extends: EventEmitter, - - initialize: - - function BaseSoundManager (game) + initialize: function BaseSoundManager (game) { EventEmitter.call(this); @@ -48,7 +43,7 @@ var BaseSoundManager = new Class({ * An array containing all added sounds. * * @name Phaser.Sound.BaseSoundManager#sounds - * @type {array} + * @type {Phaser.Sound.BaseSound[]} * @default [] * @private * @since 3.0.0 @@ -108,7 +103,6 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.pauseOnBlur = true; - game.events.on('blur', function () { if (this.pauseOnBlur) @@ -116,7 +110,6 @@ var BaseSoundManager = new Class({ this.onBlur(); } }, this); - game.events.on('focus', function () { if (this.pauseOnBlur) @@ -124,7 +117,6 @@ var BaseSoundManager = new Class({ this.onFocus(); } }, this); - game.events.once('destroy', this.destroy, this); /** @@ -172,7 +164,6 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.unlocked = false; - if (this.locked) { this.unlock(); @@ -200,7 +191,6 @@ var BaseSoundManager = new Class({ * * @property {object} spritemap - Local reference to 'spritemap' object form json file generated by audiosprite tool. */ - /** * Adds a new audio sprite sound into the sound manager. * @@ -215,18 +205,14 @@ var BaseSoundManager = new Class({ addAudioSprite: function (key, config) { var sound = this.add(key, config); - sound.spritemap = this.game.cache.json.get(key).spritemap; - for (var markerName in sound.spritemap) { if (!sound.spritemap.hasOwnProperty(markerName)) { continue; } - var marker = sound.spritemap[markerName]; - sound.addMarker({ name: markerName, start: marker.start, @@ -234,7 +220,6 @@ var BaseSoundManager = new Class({ config: config }); } - return sound; }, @@ -253,9 +238,7 @@ var BaseSoundManager = new Class({ play: function (key, extra) { var sound = this.add(key); - sound.once('ended', sound.destroy, sound); - if (extra) { if (extra.name) @@ -290,9 +273,7 @@ var BaseSoundManager = new Class({ playAudioSprite: function (key, spriteName, config) { var sound = this.addAudioSprite(key); - sound.once('ended', sound.destroy, sound); - return sound.play(spriteName, config); }, @@ -465,7 +446,6 @@ var BaseSoundManager = new Class({ */ this.emit('unlocked', this); } - for (var i = this.sounds.length - 1; i >= 0; i--) { if (this.sounds[i].pendingRemove) @@ -473,7 +453,6 @@ var BaseSoundManager = new Class({ this.sounds.splice(i, 1); } } - this.sounds.forEach(function (sound) { sound.update(time, delta); @@ -489,12 +468,10 @@ var BaseSoundManager = new Class({ destroy: function () { this.removeAllListeners(); - this.forEachActiveSound(function (sound) { sound.destroy(); }); - this.sounds.length = 0; this.sounds = null; this.game = null; @@ -513,7 +490,6 @@ var BaseSoundManager = new Class({ forEachActiveSound: function (callbackfn, scope) { var _this = this; - this.sounds.forEach(function (sound, index) { if (!sound.pendingRemove) @@ -522,15 +498,12 @@ var BaseSoundManager = new Class({ } }); } - }); Object.defineProperty(BaseSoundManager.prototype, 'rate', { - get: function () { return this._rate; }, - set: function (value) { this._rate = value; @@ -546,15 +519,12 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', { */ this.emit('rate', this, value); } - }); Object.defineProperty(BaseSoundManager.prototype, 'detune', { - get: function () { return this._detune; }, - set: function (value) { this._detune = value; @@ -570,7 +540,5 @@ Object.defineProperty(BaseSoundManager.prototype, 'detune', { */ this.emit('detune', this, value); } - }); - module.exports = BaseSoundManager; From afbbd7a724c875bb8eed258a9749e7db19c5a289 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:11:56 +0100 Subject: [PATCH 141/200] ESLint fix --- src/sound/webaudio/WebAudioSound.js | 39 +---------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 6d58d3ba7..964ae6681 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = require('../../utils/Class'); var BaseSound = require('../BaseSound'); @@ -23,12 +22,8 @@ var BaseSound = require('../BaseSound'); * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var WebAudioSound = new Class({ - Extends: BaseSound, - - initialize: - - function WebAudioSound (manager, key, config) + initialize: function WebAudioSound (manager, key, config) { if (config === void 0) { config = {}; } @@ -41,7 +36,6 @@ var WebAudioSound = new Class({ * @since 3.0.0 */ this.audioBuffer = manager.game.cache.audio.get(key); - if (!this.audioBuffer) { // eslint-disable-next-line no-console @@ -163,13 +157,10 @@ var WebAudioSound = new Class({ * @since 3.0.0 */ this.hasLooped = false; - this.muteNode.connect(this.volumeNode); this.volumeNode.connect(manager.destination); - this.duration = this.audioBuffer.duration; this.totalDuration = this.audioBuffer.duration; - BaseSound.call(this, manager, key, config); }, @@ -202,7 +193,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('play', this); - return true; }, @@ -220,7 +210,6 @@ var WebAudioSound = new Class({ { return false; } - if (!BaseSound.prototype.pause.call(this)) { return false; @@ -235,7 +224,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('pause', this); - return true; }, @@ -253,7 +241,6 @@ var WebAudioSound = new Class({ { return false; } - if (!BaseSound.prototype.resume.call(this)) { return false; @@ -267,7 +254,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('resume', this); - return true; }, @@ -294,7 +280,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('stop', this); - return true; }, @@ -350,11 +335,9 @@ var WebAudioSound = new Class({ createBufferSource: function () { var _this = this; - var source = this.manager.context.createBufferSource(); source.buffer = this.audioBuffer; source.connect(this.muteNode); - source.onended = function (ev) { if (ev.target === _this.source) @@ -372,7 +355,6 @@ var WebAudioSound = new Class({ // else was stopped }; - return source; }, @@ -391,7 +373,6 @@ var WebAudioSound = new Class({ this.source.disconnect(); this.source = null; } - this.playTime = 0; this.startTime = 0; this.stopAndRemoveLoopBufferSource(); @@ -412,7 +393,6 @@ var WebAudioSound = new Class({ this.loopSource.disconnect(); this.loopSource = null; } - this.loopTime = 0; }, @@ -575,14 +555,11 @@ var WebAudioSound = new Class({ + (this.duration - lastRateUpdateCurrentTime) / lastRateUpdate.rate; } }); - Object.defineProperty(WebAudioSound.prototype, 'mute', { - get: function () { return this.muteNode.gain.value === 0; }, - set: function (value) { this.currentConfig.mute = value; @@ -595,16 +572,12 @@ Object.defineProperty(WebAudioSound.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - Object.defineProperty(WebAudioSound.prototype, 'volume', { - get: function () { return this.volumeNode.gain.value; }, - set: function (value) { this.currentConfig.volume = value; @@ -617,11 +590,8 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - Object.defineProperty(WebAudioSound.prototype, 'seek', { - get: function () { if (this.isPlaying) @@ -641,7 +611,6 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { return 0; } }, - set: function (value) { if (this.manager.context.currentTime < this.startTime) @@ -666,16 +635,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { this.emit('seek', this, value); } } - }); - Object.defineProperty(WebAudioSound.prototype, 'loop', { - get: function () { return this.currentConfig.loop; }, - set: function (value) { this.currentConfig.loop = value; @@ -695,7 +660,5 @@ Object.defineProperty(WebAudioSound.prototype, 'loop', { */ this.emit('loop', this, value); } - }); - module.exports = WebAudioSound; From 1d373cb91ef0815a930d15e392025ab393c5e9ad Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:12:34 +0100 Subject: [PATCH 142/200] ESLint fix --- src/sound/webaudio/WebAudioSoundManager.js | 25 +--------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 105e86c2d..75c8a8a6c 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = require('../../utils/Class'); var BaseSoundManager = require('../BaseSoundManager'); var WebAudioSound = require('./WebAudioSound'); @@ -22,12 +21,8 @@ var WebAudioSound = require('./WebAudioSound'); * @param {Phaser.Game} game - Reference to the current game instance. */ var WebAudioSoundManager = new Class({ - Extends: BaseSoundManager, - - initialize: - - function WebAudioSoundManager (game) + initialize: function WebAudioSoundManager (game) { /** * The AudioContext being used for playback. @@ -58,7 +53,6 @@ var WebAudioSoundManager = new Class({ * @since 3.0.0 */ this.masterVolumeNode = this.context.createGain(); - this.masterMuteNode.connect(this.masterVolumeNode); this.masterVolumeNode.connect(this.context.destination); @@ -71,9 +65,7 @@ var WebAudioSoundManager = new Class({ * @since 3.0.0 */ this.destination = this.masterMuteNode; - this.locked = this.context.state === 'suspended' && 'ontouchstart' in window; - BaseSoundManager.call(this, game); }, @@ -95,13 +87,11 @@ var WebAudioSoundManager = new Class({ createAudioContext: function (game) { var audioConfig = game.config.audio; - if (audioConfig && audioConfig.context) { audioConfig.context.resume(); return audioConfig.context; } - return new AudioContext(); }, @@ -119,9 +109,7 @@ var WebAudioSoundManager = new Class({ add: function (key, config) { var sound = new WebAudioSound(this, key, config); - this.sounds.push(sound); - return sound; }, @@ -137,7 +125,6 @@ var WebAudioSoundManager = new Class({ unlock: function () { var _this = this; - var unlock = function () { _this.context.resume().then(function () @@ -147,7 +134,6 @@ var WebAudioSoundManager = new Class({ _this.unlocked = true; }); }; - document.body.addEventListener('touchstart', unlock, false); document.body.addEventListener('touchend', unlock, false); }, @@ -197,14 +183,11 @@ var WebAudioSoundManager = new Class({ this.context = null; } }); - Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { - get: function () { return this.masterMuteNode.gain.value === 0; }, - set: function (value) { this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0); @@ -216,16 +199,12 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { - get: function () { return this.masterVolumeNode.gain.value; }, - set: function (value) { this.masterVolumeNode.gain.setValueAtTime(value, 0); @@ -237,7 +216,5 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - module.exports = WebAudioSoundManager; From e6616ec484964e4d43c8b1b034bf187216314685 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:13:18 +0100 Subject: [PATCH 143/200] Fixed play method docs --- src/sound/noaudio/NoAudioSound.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/sound/noaudio/NoAudioSound.js b/src/sound/noaudio/NoAudioSound.js index 73e693f3b..345a237ea 100644 --- a/src/sound/noaudio/NoAudioSound.js +++ b/src/sound/noaudio/NoAudioSound.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var BaseSound = require('../BaseSound'); var Class = require('../../utils/Class'); var EventEmitter = require('eventemitter3'); @@ -30,12 +29,8 @@ var Extend = require('../../utils/object/Extend'); * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var NoAudioSound = new Class({ - Extends: EventEmitter, - - initialize: - - function NoAudioSound (manager, key, config) + initialize: function NoAudioSound (manager, key, config) { if (config === void 0) { config = {}; } EventEmitter.call(this); @@ -101,10 +96,7 @@ var NoAudioSound = new Class({ destroy: function () { this.manager.remove(this); - BaseSound.prototype.destroy.call(this); } - }); - module.exports = NoAudioSound; From 735394bc84dc6dec30da182baecd670c2b196023 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:13:55 +0100 Subject: [PATCH 144/200] ESLint fix --- src/sound/noaudio/NoAudioSoundManager.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/sound/noaudio/NoAudioSoundManager.js b/src/sound/noaudio/NoAudioSoundManager.js index c8772f71e..a9bcf0008 100644 --- a/src/sound/noaudio/NoAudioSoundManager.js +++ b/src/sound/noaudio/NoAudioSoundManager.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var BaseSoundManager = require('../BaseSoundManager'); var Class = require('../../utils/Class'); var EventEmitter = require('eventemitter3'); @@ -29,12 +28,8 @@ var NOOP = require('../../utils/NOOP'); * @param {Phaser.Game} game - Reference to the current game instance. */ var NoAudioSoundManager = new Class({ - Extends: EventEmitter, - - initialize: - - function NoAudioSoundManager (game) + initialize: function NoAudioSoundManager (game) { EventEmitter.call(this); this.game = game; @@ -49,9 +44,7 @@ var NoAudioSoundManager = new Class({ add: function (key, config) { var sound = new NoAudioSound(this, key, config); - this.sounds.push(sound); - return sound; }, addAudioSprite: function (key, config) @@ -90,7 +83,5 @@ var NoAudioSoundManager = new Class({ { BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope); } - }); - module.exports = NoAudioSoundManager; From 0d20a413a7b907e5b3fb23fc290e3ab019bd856e Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:18:09 +0100 Subject: [PATCH 145/200] Fixed class docs --- src/sound/html5/HTML5AudioSound.js | 31 +++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index dcb023db6..fd4fa6250 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = require('../../utils/Class'); var BaseSound = require('../BaseSound'); @@ -17,18 +16,14 @@ var BaseSound = require('../BaseSound'); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var HTML5AudioSound = new Class({ - Extends: BaseSound, - - initialize: - - function HTML5AudioSound (manager, key, config) + initialize: function HTML5AudioSound (manager, key, config) { if (config === void 0) { config = {}; } @@ -43,7 +38,6 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 */ this.tags = manager.game.cache.audio.get(key); - if (!this.tags) { // eslint-disable-next-line no-console @@ -86,11 +80,8 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 */ this.previousTime = 0; - this.duration = this.tags[0].duration; - this.totalDuration = this.tags[0].duration; - BaseSound.call(this, manager, key, config); }, @@ -101,10 +92,10 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#play * @since 3.0.0 - * + * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. - * + * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) @@ -139,7 +130,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -178,7 +169,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -218,7 +209,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -251,7 +242,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag * @private * @since 3.0.0 - * + * * @return {boolean} Whether the sound was assigned an audio tag successfully. */ pickAndPlayAudioTag: function () @@ -303,7 +294,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#pickAudioTag * @private * @since 3.0.0 - * + * * @return {boolean} Whether the sound was assigned an audio tag successfully. */ pickAudioTag: function () @@ -446,7 +437,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ From ebd23f9ae295ecddc61d6d652d09659a30ae7c8b Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:18:45 +0100 Subject: [PATCH 146/200] Fixed play method docs --- src/sound/html5/HTML5AudioSound.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index fd4fa6250..5def6ea37 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -94,7 +94,7 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. * * @return {boolean} Whether the sound started playing successfully. */ @@ -104,7 +104,6 @@ var HTML5AudioSound = new Class({ { return false; } - if (!BaseSound.prototype.play.call(this, markerName, config)) { return false; @@ -121,7 +120,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('play', this); - return true; }, From 7fd6ce95c3d7f7a05ccc525dddd15d7a271e7dfc Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:19:16 +0100 Subject: [PATCH 147/200] Fixed pause method docs --- src/sound/html5/HTML5AudioSound.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 5def6ea37..1c2761c00 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -137,12 +137,10 @@ var HTML5AudioSound = new Class({ { return false; } - if (this.startTime > 0) { return false; } - if (!BaseSound.prototype.pause.call(this)) { return false; @@ -158,7 +156,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('pause', this); - return true; }, From 5010755aea83a64353601e42ef572e9b80f20b61 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:19:44 +0100 Subject: [PATCH 148/200] Fixed resume method docs --- src/sound/html5/HTML5AudioSound.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 1c2761c00..891cc6331 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -173,12 +173,10 @@ var HTML5AudioSound = new Class({ { return false; } - if (this.startTime > 0) { return false; } - if (!BaseSound.prototype.resume.call(this)) { return false; @@ -195,7 +193,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('resume', this); - return true; }, From b607251e77609a7740839d90f2557226601c7053 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:20:00 +0100 Subject: [PATCH 149/200] Fixed stop method docs --- src/sound/html5/HTML5AudioSound.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 891cc6331..4876ebcac 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -210,7 +210,6 @@ var HTML5AudioSound = new Class({ { return false; } - if (!BaseSound.prototype.stop.call(this)) { return false; @@ -224,7 +223,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('stop', this); - return true; }, From c745e096ad16025c8a776596d8230510b6925ebb Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:20:21 +0100 Subject: [PATCH 150/200] Fixed pickAndPlayAudioTag method docs --- src/sound/html5/HTML5AudioSound.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 4876ebcac..f0e2d3813 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -242,18 +242,15 @@ var HTML5AudioSound = new Class({ this.reset(); return false; } - var seek = this.currentConfig.seek; var delay = this.currentConfig.delay; var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek; this.previousTime = offset; this.audio.currentTime = offset; this.applyConfig(); - if (delay === 0) { this.startTime = 0; - if (this.audio.paused) { this.playCatchPromise(); @@ -262,15 +259,12 @@ var HTML5AudioSound = new Class({ else { this.startTime = window.performance.now() + delay * 1000; - if (!this.audio.paused) { this.audio.pause(); } } - this.resetConfig(); - return true; }, From 1e08945173bf218199bac701e3894dafad458070 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:20:49 +0100 Subject: [PATCH 151/200] Fixed pickAudioTag method docs --- src/sound/html5/HTML5AudioSound.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index f0e2d3813..3de789e30 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -290,7 +290,6 @@ var HTML5AudioSound = new Class({ for (var i = 0; i < this.tags.length; i++) { var audio = this.tags[i]; - if (audio.dataset.used === 'false') { audio.dataset.used = 'true'; @@ -298,14 +297,11 @@ var HTML5AudioSound = new Class({ return true; } } - if (!this.manager.override) { return false; } - var otherSounds = []; - this.manager.forEachActiveSound(function (sound) { if (sound.key === this.key && sound.audio) @@ -313,7 +309,6 @@ var HTML5AudioSound = new Class({ otherSounds.push(sound); } }, this); - otherSounds.sort(function (a1, a2) { if (a1.loop === a2.loop) @@ -323,15 +318,12 @@ var HTML5AudioSound = new Class({ } return a1.loop ? 1 : -1; }); - var selectedSound = otherSounds[0]; - this.audio = selectedSound.audio; selectedSound.reset(); selectedSound.audio = null; selectedSound.startTime = 0; selectedSound.previousTime = 0; - return true; }, From a08dc5ef647b185fa28459b860fbbed18efd3239 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:21:42 +0100 Subject: [PATCH 152/200] ESLint fix for playCatchPromise method --- src/sound/html5/HTML5AudioSound.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 3de789e30..173b265b0 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -338,10 +338,10 @@ var HTML5AudioSound = new Class({ playCatchPromise: function () { var playPromise = this.audio.play(); - if (playPromise) { - playPromise.catch(function () { }); + // eslint-disable-next-line no-unused-vars + playPromise.catch(function (reason) { }); } }, From 0b377a34d6740cec6e1ed56b58542dde29f18d1c Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:22:49 +0100 Subject: [PATCH 153/200] Fixed update method docs, ESLint fix --- src/sound/html5/HTML5AudioSound.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 173b265b0..f73d31d11 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -417,7 +417,8 @@ var HTML5AudioSound = new Class({ * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ - update: function (time) + // eslint-disable-next-line no-unused-vars + update: function (time, delta) { if (!this.isPlaying) { From 94859c6f9939844d2b82d7c4ed94bad40418100a Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:23:15 +0100 Subject: [PATCH 154/200] Removed redundant docs --- src/sound/html5/HTML5AudioSound.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index f73d31d11..95a3b3d65 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -541,20 +541,11 @@ var HTML5AudioSound = new Class({ } } }); - -/** - * Mute setting. - * - * @name Phaser.Sound.HTML5AudioSound#mute - * @type {boolean} - */ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { - get: function () { return this.currentConfig.mute; }, - set: function (value) { this.currentConfig.mute = value; @@ -571,7 +562,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { */ this.emit('mute', this, value); } - }); /** From ae890eca8a633e4fc2134a57b3155f9c330c1db7 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:23:30 +0100 Subject: [PATCH 155/200] Removed redundant docs --- src/sound/html5/HTML5AudioSound.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 95a3b3d65..3a1171c57 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -563,20 +563,11 @@ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { this.emit('mute', this, value); } }); - -/** - * Volume setting. - * - * @name Phaser.Sound.HTML5AudioSound#volume - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { - get: function () { return this.currentConfig.volume; }, - set: function (value) { this.currentConfig.volume = value; @@ -593,7 +584,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { */ this.emit('volume', this, value); } - }); /** From 81bebfd8c18090e4388fcb7151626f604019661d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:24:05 +0100 Subject: [PATCH 156/200] Removed redundant docs --- src/sound/html5/HTML5AudioSound.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 3a1171c57..1d76294c7 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -585,20 +585,11 @@ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { this.emit('volume', this, value); } }); - -/** - * Playback rate. - * - * @name Phaser.Sound.HTML5AudioSound#rate - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'rate', { - get: function () { return Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').get.call(this); }, - set: function (value) { this.currentConfig.rate = value; @@ -608,22 +599,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'rate', { } Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').set.call(this, value); } - }); - -/** - * Detuning of sound. - * - * @name Phaser.Sound.HTML5AudioSound#detune - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { - get: function () { return Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').get.call(this); }, - set: function (value) { this.currentConfig.detune = value; @@ -633,7 +614,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { } Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').set.call(this, value); } - }); /** From 1046991e660ec11488bbe49b0ff04e9d8c1e9af8 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:24:29 +0100 Subject: [PATCH 157/200] Removed redundant docs --- src/sound/html5/HTML5AudioSound.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 1d76294c7..28248ba0a 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -615,15 +615,7 @@ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').set.call(this, value); } }); - -/** - * Current position of playing sound. - * - * @name Phaser.Sound.HTML5AudioSound#seek - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { - get: function () { if (this.isPlaying) @@ -640,7 +632,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { return 0; } }, - set: function (value) { if (this.manager.isLocked(this, 'seek', value)) From 631e6cdf59c42c95d2009e42390daa5eea3d58b5 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:24:49 +0100 Subject: [PATCH 158/200] Removed redundant docs --- src/sound/html5/HTML5AudioSound.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/sound/html5/HTML5AudioSound.js b/src/sound/html5/HTML5AudioSound.js index 28248ba0a..fd15614ad 100644 --- a/src/sound/html5/HTML5AudioSound.js +++ b/src/sound/html5/HTML5AudioSound.js @@ -664,21 +664,11 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { } } }); - -/** - * Property indicating whether or not - * the sound or current sound marker will loop. - * - * @name Phaser.Sound.HTML5AudioSound#loop - * @type {boolean} - */ Object.defineProperty(HTML5AudioSound.prototype, 'loop', { - get: function () { return this.currentConfig.loop; }, - set: function (value) { this.currentConfig.loop = value; @@ -698,7 +688,5 @@ Object.defineProperty(HTML5AudioSound.prototype, 'loop', { */ this.emit('loop', this, value); } - }); - module.exports = HTML5AudioSound; From c3313ef6e59f24fc7dc16c91846c8e5c2599df40 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:35:39 +0100 Subject: [PATCH 159/200] Fixed class docs --- src/sound/html5/HTML5AudioSoundManager.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/sound/html5/HTML5AudioSoundManager.js b/src/sound/html5/HTML5AudioSoundManager.js index f18e4913b..cb2daffc7 100644 --- a/src/sound/html5/HTML5AudioSoundManager.js +++ b/src/sound/html5/HTML5AudioSoundManager.js @@ -3,7 +3,6 @@ * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = require('../../utils/Class'); var BaseSoundManager = require('../BaseSoundManager'); var HTML5AudioSound = require('./HTML5AudioSound'); @@ -17,16 +16,12 @@ var HTML5AudioSound = require('./HTML5AudioSound'); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. */ var HTML5AudioSoundManager = new Class({ - Extends: BaseSoundManager, - - initialize: - - function HTML5AudioSoundManager (game) + initialize: function HTML5AudioSoundManager (game) { /** * Flag indicating whether if there are no idle instances of HTML5 Audio tag, @@ -130,10 +125,10 @@ var HTML5AudioSoundManager = new Class({ * * @method Phaser.Sound.HTML5AudioSoundManager#add * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * * @return {Phaser.Sound.HTML5AudioSound} The new sound instance. */ add: function (key, config) @@ -272,11 +267,11 @@ var HTML5AudioSoundManager = new Class({ * @method Phaser.Sound.HTML5AudioSoundManager#isLocked * @protected * @since 3.0.0 - * + * * @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action. * @param {string} prop - Name of the method to be called or property to be assigned a value to. * @param {*} [value] - An optional parameter that either holds an array of arguments to be passed to the method call or value to be set to the property. - * + * * @return {boolean} Whether the sound manager is locked. */ isLocked: function (sound, prop, value) From 7b9af8691ad1e8b088ddfd7f17b37dd9c005e639 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:36:39 +0100 Subject: [PATCH 160/200] Fixed add method docs --- src/sound/html5/HTML5AudioSoundManager.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sound/html5/HTML5AudioSoundManager.js b/src/sound/html5/HTML5AudioSoundManager.js index cb2daffc7..55846302a 100644 --- a/src/sound/html5/HTML5AudioSoundManager.js +++ b/src/sound/html5/HTML5AudioSoundManager.js @@ -77,7 +77,6 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 */ this.onBlurPausedSounds = []; - this.locked = 'ontouchstart' in window; /** @@ -116,7 +115,6 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 */ this._volume = 1; - BaseSoundManager.call(this, game); }, @@ -127,7 +125,7 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. * * @return {Phaser.Sound.HTML5AudioSound} The new sound instance. */ From 812cbbff9f43b6afcabf687456faa4f28471a75f Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:37:23 +0100 Subject: [PATCH 161/200] Removed redundant docs --- src/sound/html5/HTML5AudioSoundManager.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/sound/html5/HTML5AudioSoundManager.js b/src/sound/html5/HTML5AudioSoundManager.js index 55846302a..91b8da081 100644 --- a/src/sound/html5/HTML5AudioSoundManager.js +++ b/src/sound/html5/HTML5AudioSoundManager.js @@ -286,21 +286,11 @@ var HTML5AudioSoundManager = new Class({ return false; } }); - -/** - * Global mute setting. - * - * @name Phaser.Sound.HTML5AudioSoundManager#mute - * @type {boolean} - * @since 3.0.0 - */ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { - get: function () { return this._mute; }, - set: function (value) { this._mute = value; @@ -316,7 +306,6 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { */ this.emit('mute', this, value); } - }); /** From ae897506102e73e8ebfc78e56b1a84087d1d7379 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:38:04 +0100 Subject: [PATCH 162/200] Removed redundant docs --- src/sound/html5/HTML5AudioSoundManager.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/sound/html5/HTML5AudioSoundManager.js b/src/sound/html5/HTML5AudioSoundManager.js index 91b8da081..e2038ee2e 100644 --- a/src/sound/html5/HTML5AudioSoundManager.js +++ b/src/sound/html5/HTML5AudioSoundManager.js @@ -307,21 +307,11 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { this.emit('mute', this, value); } }); - -/** - * Global volume setting. - * - * @name Phaser.Sound.HTML5AudioSoundManager#volume - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(HTML5AudioSoundManager.prototype, 'volume', { - get: function () { return this._volume; }, - set: function (value) { this._volume = value; @@ -337,7 +327,5 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - module.exports = HTML5AudioSoundManager; From fe9951216bc76cff09d98c69b48867d4d2253e76 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Sun, 18 Feb 2018 21:52:51 +0100 Subject: [PATCH 163/200] Calling base class destroy method only after cleaning up all Web Audio related stuff --- src/sound/webaudio/WebAudioSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index 75c8a8a6c..a098cdcc1 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -173,7 +173,6 @@ var WebAudioSoundManager = new Class({ */ destroy: function () { - BaseSoundManager.prototype.destroy.call(this); this.destination = null; this.masterVolumeNode.disconnect(); this.masterVolumeNode = null; @@ -181,6 +180,7 @@ var WebAudioSoundManager = new Class({ this.masterMuteNode = null; this.context.suspend(); this.context = null; + BaseSoundManager.prototype.destroy.call(this); } }); Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { From 713de8cda78d61fa9ef1ab88f3683cf06863f381 Mon Sep 17 00:00:00 2001 From: Rafael Barbosa Lopes Date: Mon, 19 Feb 2018 00:31:25 -0300 Subject: [PATCH 164/200] Use webpack-shell-plugin `onBuildExit` event, so bundled files are also copied when using `webpack watch` too. --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 8be3c4bba..17dd8a932 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -39,7 +39,7 @@ module.exports = { }), new WebpackShellPlugin({ - onBuildEnd: 'node copy-to-examples.js' + onBuildExit: 'node copy-to-examples.js' }) ], From 7d64c12e664ece29385007d721a4c0f9014beac5 Mon Sep 17 00:00:00 2001 From: Rafael Barbosa Lopes Date: Mon, 19 Feb 2018 10:00:52 -0300 Subject: [PATCH 165/200] Removed unused queue property in `ScenePlugin`. --- src/scene/ScenePlugin.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/scene/ScenePlugin.js b/src/scene/ScenePlugin.js index ee3642356..f236f7769 100644 --- a/src/scene/ScenePlugin.js +++ b/src/scene/ScenePlugin.js @@ -74,16 +74,6 @@ var ScenePlugin = new Class({ * @since 3.0.0 */ this.manager = scene.sys.game.scene; - - /** - * [description] - * - * @name Phaser.Scenes.ScenePlugin#_queue - * @type {array} - * @private - * @since 3.0.0 - */ - this._queue = []; }, /** From b39f4fcfa173e51d49040d3d0369b46a3f5d7f55 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Mon, 19 Feb 2018 16:17:06 +0100 Subject: [PATCH 166/200] Fixes #3238 --- src/sound/webaudio/WebAudioSoundManager.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sound/webaudio/WebAudioSoundManager.js b/src/sound/webaudio/WebAudioSoundManager.js index a098cdcc1..95c97e7d3 100644 --- a/src/sound/webaudio/WebAudioSoundManager.js +++ b/src/sound/webaudio/WebAudioSoundManager.js @@ -178,7 +178,14 @@ var WebAudioSoundManager = new Class({ this.masterVolumeNode = null; this.masterMuteNode.disconnect(); this.masterMuteNode = null; - this.context.suspend(); + if (this.game.config.audio && this.game.config.audio.context) + { + this.context.suspend(); + } + else + { + this.context.close(); + } this.context = null; BaseSoundManager.prototype.destroy.call(this); } From cdc4359fd7d10a69aa476ebc73762cf854655273 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 19 Feb 2018 17:06:08 -0300 Subject: [PATCH 167/200] Fixed issue with tint being set on the incorrect vertex --- .../webgl/pipelines/TextureTintPipeline.js | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 4305b49f3..449555274 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -724,10 +724,10 @@ var TextureTintPipeline = new Class({ var ty2 = xw * mvb + yh * mvd + mvf; var tx3 = xw * mva + y * mvc + mve; var ty3 = xw * mvb + y * mvd + mvf; - var tint0 = getTint(tintTL, alphaTL); - var tint1 = getTint(tintTR, alphaTR); - var tint2 = getTint(tintBL, alphaBL); - var tint3 = getTint(tintBR, alphaBR); + var vTintTL = getTint(tintTL, alphaTL); + var vTintTR = getTint(tintTR, alphaTR); + var vTintBL = getTint(tintBL, alphaBL); + var vTintBR = getTint(tintBR, alphaBR); var vertexOffset = 0; this.setTexture2D(texture, 0); @@ -750,32 +750,32 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; vertexViewF32[vertexOffset + 3] = uvs.y0; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = uvs.x1; vertexViewF32[vertexOffset + 8] = uvs.y1; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = uvs.x2; vertexViewF32[vertexOffset + 13] = uvs.y2; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = uvs.x0; vertexViewF32[vertexOffset + 18] = uvs.y0; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = uvs.x2; vertexViewF32[vertexOffset + 23] = uvs.y2; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = uvs.x3; vertexViewF32[vertexOffset + 28] = uvs.y3; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; }, @@ -911,10 +911,10 @@ var TextureTintPipeline = new Class({ var scale = (bitmapText.fontSize / fontData.size); var chars = fontData.chars; var alpha = bitmapText.alpha; - var tint0 = getTint(bitmapText._tintTL, alpha); - var tint1 = getTint(bitmapText._tintTR, alpha); - var tint2 = getTint(bitmapText._tintBL, alpha); - var tint3 = getTint(bitmapText._tintBR, alpha); + var vTintTL = getTint(bitmapText._tintTL, alpha); + var vTintTR = getTint(bitmapText._tintTR, alpha); + var vTintBL = getTint(bitmapText._tintBL, alpha); + var vTintBR = getTint(bitmapText._tintBR, alpha); var srcX = bitmapText.x; var srcY = bitmapText.y; var textureX = frame.cutX; @@ -1073,32 +1073,32 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; vertexViewF32[vertexOffset + 3] = vmin; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = umin; vertexViewF32[vertexOffset + 8] = vmax; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = umax; vertexViewF32[vertexOffset + 13] = vmax; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = umin; vertexViewF32[vertexOffset + 18] = vmin; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = umax; vertexViewF32[vertexOffset + 23] = vmax; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = umax; vertexViewF32[vertexOffset + 28] = vmin; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; } @@ -1143,10 +1143,10 @@ var TextureTintPipeline = new Class({ var scale = (bitmapText.fontSize / fontData.size); var chars = fontData.chars; var alpha = bitmapText.alpha; - var tint0 = getTint(bitmapText._tintTL, alpha); - var tint1 = getTint(bitmapText._tintTR, alpha); - var tint2 = getTint(bitmapText._tintBL, alpha); - var tint3 = getTint(bitmapText._tintBR, alpha); + var vTintTL = getTint(bitmapText._tintTL, alpha); + var vTintTR = getTint(bitmapText._tintTR, alpha); + var vTintBL = getTint(bitmapText._tintBL, alpha); + var vTintBR = getTint(bitmapText._tintBR, alpha); var srcX = bitmapText.x; var srcY = bitmapText.y; var textureX = frame.cutX; @@ -1276,10 +1276,10 @@ var TextureTintPipeline = new Class({ var output = displayCallback({ color: 0, tint: { - topLeft: tint0, - topRight: tint1, - bottomLeft: tint2, - bottomRight: tint3 + topLeft: vTintTL, + topRight: vTintTR, + bottomLeft: vTintBL, + bottomRight: vTintBR }, index: index, charCode: charCode, @@ -1297,23 +1297,23 @@ var TextureTintPipeline = new Class({ if (output.color) { - tint0 = output.color; - tint1 = output.color; - tint2 = output.color; - tint3 = output.color; + vTintTL = output.color; + vTintTR = output.color; + vTintBL = output.color; + vTintBR = output.color; } else { - tint0 = output.tint.topLeft; - tint1 = output.tint.topRight; - tint2 = output.tint.bottomLeft; - tint3 = output.tint.bottomRight; + vTintTL = output.tint.topLeft; + vTintTR = output.tint.topRight; + vTintBL = output.tint.bottomLeft; + vTintBR = output.tint.bottomRight; } - tint0 = getTint(tint0, alpha); - tint1 = getTint(tint1, alpha); - tint2 = getTint(tint2, alpha); - tint3 = getTint(tint3, alpha); + vTintTL = getTint(vTintTL, alpha); + vTintTR = getTint(vTintTR, alpha); + vTintBL = getTint(vTintBL, alpha); + vTintBR = getTint(vTintBR, alpha); } x *= scale; @@ -1376,32 +1376,32 @@ var TextureTintPipeline = new Class({ vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; vertexViewF32[vertexOffset + 3] = vmin; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = umin; vertexViewF32[vertexOffset + 8] = vmax; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = umax; vertexViewF32[vertexOffset + 13] = vmax; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = umin; vertexViewF32[vertexOffset + 18] = vmin; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = umax; vertexViewF32[vertexOffset + 23] = vmax; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = umax; vertexViewF32[vertexOffset + 28] = vmin; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; } From 50c79c14af5ba3124058e59ef23831a977341f86 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 19 Feb 2018 17:38:40 -0300 Subject: [PATCH 168/200] Removed double rounding to pixel on rendering routines. Fixed rounding pixel issue when camera is shaking --- src/cameras/2d/Camera.js | 6 ++ .../webgl/pipelines/FlatTintPipeline.js | 84 +++---------------- .../webgl/pipelines/TextureTintPipeline.js | 81 ------------------ 3 files changed, 19 insertions(+), 152 deletions(-) diff --git a/src/cameras/2d/Camera.js b/src/cameras/2d/Camera.js index f27fcd08d..d131321fa 100644 --- a/src/cameras/2d/Camera.js +++ b/src/cameras/2d/Camera.js @@ -1323,6 +1323,12 @@ var Camera = new Class({ { this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; + + if (this.roundPixels) + { + this._shakeOffsetX |= 0; + this._shakeOffsetY |= 0; + } } } }, diff --git a/src/renderer/webgl/pipelines/FlatTintPipeline.js b/src/renderer/webgl/pipelines/FlatTintPipeline.js index 9c81e5910..c398746df 100644 --- a/src/renderer/webgl/pipelines/FlatTintPipeline.js +++ b/src/renderer/webgl/pipelines/FlatTintPipeline.js @@ -196,9 +196,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -236,18 +235,6 @@ var FlatTintPipeline = new Class({ var ty3 = xw * b + y * d + f; var tint = Utils.getTintAppendFloatAlphaAndSwap(fillColor, fillAlpha); - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -296,9 +283,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -332,16 +318,6 @@ var FlatTintPipeline = new Class({ var ty2 = x2 * b + y2 * d + f; var tint = Utils.getTintAppendFloatAlphaAndSwap(fillColor, fillAlpha); - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -382,9 +358,8 @@ var FlatTintPipeline = new Class({ * @param {float} e - [description] * @param {float} f - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchStrokeTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, currentMatrix, roundPixels) + batchStrokeTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, currentMatrix) { var tempTriangle = this.tempTriangle; @@ -414,8 +389,7 @@ var FlatTintPipeline = new Class({ tempTriangle, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, false, - currentMatrix, - roundPixels + currentMatrix ); }, @@ -440,9 +414,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillPath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillPath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -508,16 +481,6 @@ var FlatTintPipeline = new Class({ tx2 = x2 * a + y2 * c + e; ty2 = x2 * b + y2 * d + f; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -557,9 +520,8 @@ var FlatTintPipeline = new Class({ * @param {float} f - [description] * @param {boolean} isLastPath - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchStrokePath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, isLastPath, currentMatrix, roundPixels) + batchStrokePath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, isLastPath, currentMatrix) { this.renderer.setPipeline(this); @@ -585,8 +547,7 @@ var FlatTintPipeline = new Class({ point0.width / 2, point1.width / 2, point0.rgb, point1.rgb, lineAlpha, a, b, c, d, e, f, - currentMatrix, - roundPixels + currentMatrix ); polylines.push(line); @@ -656,9 +617,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -711,18 +671,6 @@ var FlatTintPipeline = new Class({ var bTint = getTint(bLineColor, lineAlpha); var vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - x0 = ((x0 * resolution)|0) / resolution; - y0 = ((y0 * resolution)|0) / resolution; - x1 = ((x1 * resolution)|0) / resolution; - y1 = ((y1 * resolution)|0) / resolution; - x2 = ((x2 * resolution)|0) / resolution; - y2 = ((y2 * resolution)|0) / resolution; - x3 = ((x3 * resolution)|0) / resolution; - y3 = ((y3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = x0; vertexViewF32[vertexOffset + 1] = y0; vertexViewU32[vertexOffset + 2] = bTint; @@ -816,7 +764,6 @@ var FlatTintPipeline = new Class({ var mvd = src * cmb + srd * cmd; var mve = sre * cma + srf * cmc + cme; var mvf = sre * cmb + srf * cmd + cmf; - var roundPixels = camera.roundPixels; var pathArrayIndex; var pathArrayLength; @@ -911,8 +858,7 @@ var FlatTintPipeline = new Class({ /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); } break; @@ -937,8 +883,7 @@ var FlatTintPipeline = new Class({ /* Transform */ mva, mvb, mvc, mvd, mve, mvf, path === this._lastPath, - currentMatrix, - roundPixels + currentMatrix ); } break; @@ -959,8 +904,7 @@ var FlatTintPipeline = new Class({ /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 4; @@ -984,8 +928,7 @@ var FlatTintPipeline = new Class({ /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 6; @@ -1010,8 +953,7 @@ var FlatTintPipeline = new Class({ /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 6; diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 449555274..9be0a20ca 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -378,7 +378,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; @@ -465,18 +464,6 @@ var TextureTintPipeline = new Class({ var ty3 = xw * mvb + y * mvd + mvf; var vertexOffset = this.vertexCount * vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; @@ -540,7 +527,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var list = blitter.getRenderList(); var length = list.length; @@ -581,14 +567,6 @@ var TextureTintPipeline = new Class({ var ty0 = x * b + y * d + f; var tx1 = xw * a + yh * c + e; var ty1 = xw * b + yh * d + f; - - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - } // Bind Texture if texture wasn't bound. // This needs to be here because of multiple @@ -668,7 +646,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; @@ -734,18 +711,6 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; @@ -809,7 +774,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; @@ -852,12 +816,6 @@ var TextureTintPipeline = new Class({ var tx = x * mva + y * mvc + mve; var ty = x * mvb + y * mvd + mvf; - if (roundPixels) - { - tx = ((tx * resolution)|0) / resolution; - tx = ((tx * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx; vertexViewF32[vertexOffset + 1] = ty; vertexViewF32[vertexOffset + 2] = uvs[index + 0]; @@ -895,7 +853,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; @@ -1057,18 +1014,6 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; @@ -1129,7 +1074,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; @@ -1360,18 +1304,6 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; @@ -1601,7 +1533,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; var resolution = renderer.config.resolution; var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); @@ -1650,18 +1581,6 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = u0; From abfe7536e93bf9440c18dc52ab333dec30444546 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 19 Feb 2018 17:49:17 -0300 Subject: [PATCH 169/200] Removed the read of constant values from the WebGLRenderingContext object. Now they are read from an instance of webgl context. --- src/renderer/webgl/Utils.js | 5 +++-- src/renderer/webgl/WebGLPipeline.js | 2 +- src/renderer/webgl/WebGLRenderer.js | 18 +++++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/renderer/webgl/Utils.js b/src/renderer/webgl/Utils.js index b22697121..6e5d8e0f1 100644 --- a/src/renderer/webgl/Utils.js +++ b/src/renderer/webgl/Utils.js @@ -97,10 +97,11 @@ module.exports = { * @since 3.0.0 * * @param {number} attributes - [description] + * @param {WebGLRenderingContext} glContext - [description] * * @return {number} [description] */ - getComponentCount: function (attributes) + getComponentCount: function (attributes, glContext) { var count = 0; @@ -108,7 +109,7 @@ module.exports = { { var element = attributes[index]; - if (element.type === WebGLRenderingContext.FLOAT) + if (element.type === glContext.FLOAT) { count += element.size; } diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index d90841158..9c3153d23 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -185,7 +185,7 @@ var WebGLPipeline = new Class({ * @type {integer} * @since 3.0.0 */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes); + this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); /** * Indicates if the current pipeline is flushing the contents to the GPU. diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 3705f4bb4..89aaf871f 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -179,15 +179,6 @@ var WebGLRenderer = new Class({ encoder: null }; - for (var i = 0; i <= 16; i++) - { - this.blendModes.push({ func: [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ], equation: WebGLRenderingContext.FUNC_ADD }); - } - - this.blendModes[1].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.DST_ALPHA ]; - this.blendModes[2].func = [ WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ]; - this.blendModes[3].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_COLOR ]; - // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) /** @@ -389,6 +380,15 @@ var WebGLRenderer = new Class({ this.gl = gl; + for (var i = 0; i <= 16; i++) + { + this.blendModes.push({ func: [ gl.ONE, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_ADD }); + } + + this.blendModes[1].func = [ gl.ONE, gl.DST_ALPHA ]; + this.blendModes[2].func = [ gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA ]; + this.blendModes[3].func = [ gl.ONE, gl.ONE_MINUS_SRC_COLOR ]; + // Load supported extensions this.supportedExtensions = gl.getSupportedExtensions(); From feee7da66804ea5259eff7c8322257a2c521cbb7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 19 Feb 2018 21:00:18 +0000 Subject: [PATCH 170/200] Added `root true` to help with running eslint locally --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index 786ae2942..9134240d4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "env": { "browser": true, "es6": true, From eb6b6e1382d76d7be759d1da279b0dfa5bea7f30 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 19 Feb 2018 21:01:39 +0000 Subject: [PATCH 171/200] Updated change log. --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2395213e8..034ab5cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Updates * The entire codebase now passes our eslint config (which helped highlight a few errors), if you're submitting a PR, please ensure your PR passes the config too. +* The Web Audio Context is now suspended instead of closed to allow for prevention of 'Failed to construct AudioContext: maximum number of hardware contexts reached' errors from Chrome in a hot reload environment. We still strongly recommend reusing the same context in a production environment. See [this example](http://labs.phaser.io/view.html?src=src%5Caudio%5CWeb%20Audio%5CReuse%20AudioContext.js) for details. Fixes #3238 (thanks @z0y1 @Ziao) +* The Webpack shell plugin now fires on `onBuildExit`, meaning it'll update the examples if you use `webpack watch` (thanks @rblopes) +* Added `root: true` flag to the eslint config to stop it scanning further-up the filesystem. ### Bug Fixes @@ -12,6 +15,10 @@ * Arcade Physics World didn't import GetOverlapX or GetOverlapY, causing `separateCircle` to break. * TileSprite was missing a gl reference, causing it to fail during a context loss and restore. * The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor. +* Removed unused `_queue` property from `ScenePlugin` class (thanks @rblopes) +* The variable `static` is no longer used in Arcade Physics, fixing the 'static is a reserved word' in strict mode error (thanks @samme) +* Fixed `Set.union`, `Set.intersect` and `Set.difference` (thanks @yupaul) + ## Version 3.1.0 - Onishi - 16th February 2018 From 41bcaba43aa453c09ce60804af7caab844341745 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 19 Feb 2018 18:16:57 -0300 Subject: [PATCH 172/200] Dynamic BitmapText now uses origin component to render the text. --- src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js | 1 + src/renderer/webgl/pipelines/TextureTintPipeline.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js index d08e7f514..3623b69f7 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js @@ -87,6 +87,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, ctx.save(); ctx.translate((src.x - cameraScrollX) + src.frame.x, (src.y - cameraScrollY) + src.frame.y); ctx.rotate(src.rotation); + ctx.translate(-src.displayOriginX, -src.displayOriginY); ctx.scale(src.scaleX, src.scaleY); // ctx.fillStyle = 'rgba(255,0,255,0.5)'; diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 9be0a20ca..a1a56fcf8 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -983,6 +983,9 @@ var TextureTintPipeline = new Class({ continue; } + x -= bitmapText.displayOriginX; + y -= bitmapText.displayOriginY; + xw = x + glyphW * scale; yh = y + glyphH * scale; tx0 = x * mva + y * mvc + mve; From 4b9b4c91a36ef6f0e4836e4a2a6aa64d98c3f62c Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Mon, 19 Feb 2018 18:20:30 -0300 Subject: [PATCH 173/200] Dynamic BitmapText's origin is used on rendering the text --- .../bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js | 1 + src/renderer/webgl/pipelines/TextureTintPipeline.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js index 9ff36d23f..e63592a61 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js @@ -90,6 +90,7 @@ var DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPerc ctx.save(); ctx.translate(src.x, src.y); ctx.rotate(src.rotation); + ctx.translate(-src.displayOriginX, -src.displayOriginY); ctx.scale(src.scaleX, src.scaleY); if (src.cropWidth > 0 && src.cropHeight > 0) diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index a1a56fcf8..50f547d46 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -1263,6 +1263,8 @@ var TextureTintPipeline = new Class({ vTintBR = getTint(vTintBR, alpha); } + x -= bitmapText.displayOriginX; + y -= bitmapText.displayOriginY; x *= scale; y *= scale; x -= cameraScrollX; From e20352016ae0cd2c16a64e6965ea74ac5fd54cf8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 19 Feb 2018 23:06:59 +0000 Subject: [PATCH 174/200] Change log updated --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 034ab5cdf..a6e88fc98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,11 @@ * Removed unused `_queue` property from `ScenePlugin` class (thanks @rblopes) * The variable `static` is no longer used in Arcade Physics, fixing the 'static is a reserved word' in strict mode error (thanks @samme) * Fixed `Set.union`, `Set.intersect` and `Set.difference` (thanks @yupaul) - +* The corner tints were being applied in the wrong order. Fixes #3252 (thanks @Rybar) +* BitmapText objects would ignore calls to setOrigin. Fixes #3249 (thanks @amkazan) +* Fixed a 1px camera jitter and bleeding issue in the renderer. Fixes #3245 (thanks @bradharms) +* Fixed the error `WebGL: INVALID_ENUM: blendEquation: invalid mode.` that would arise on iOS. Fixes #3244 (thanks @Ziao) +* The `drawBlitter` function would crash if `roundPixels` was true. Fixes #3243 (thanks @Jerenaux and @vulcanoidlogic) ## Version 3.1.0 - Onishi - 16th February 2018 From 73da8608e09fbbe4992621974ad976f552ee856d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 19 Feb 2018 23:14:57 +0000 Subject: [PATCH 175/200] Fixed lint errors --- src/renderer/webgl/pipelines/FlatTintPipeline.js | 8 ++++---- .../webgl/pipelines/TextureTintPipeline.js | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/renderer/webgl/pipelines/FlatTintPipeline.js b/src/renderer/webgl/pipelines/FlatTintPipeline.js index c398746df..a6627fa78 100644 --- a/src/renderer/webgl/pipelines/FlatTintPipeline.js +++ b/src/renderer/webgl/pipelines/FlatTintPipeline.js @@ -207,7 +207,7 @@ var FlatTintPipeline = new Class({ } var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -294,7 +294,7 @@ var FlatTintPipeline = new Class({ } var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -420,7 +420,7 @@ var FlatTintPipeline = new Class({ this.renderer.setPipeline(this); var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var length = path.length; var polygonCache = this.polygonCache; var polygonIndexArray; @@ -628,7 +628,7 @@ var FlatTintPipeline = new Class({ } var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var a0 = currentMatrix[0]; var b0 = currentMatrix[1]; var c0 = currentMatrix[2]; diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 50f547d46..c0355ebfa 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -378,7 +378,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; var cameraScrollY = camera.scrollY; @@ -527,7 +527,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var list = blitter.getRenderList(); var length = list.length; var cameraMatrix = camera.matrix.matrix; @@ -646,7 +646,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; var texture = frame.texture.source[frame.sourceIndex].glTexture; @@ -774,7 +774,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; @@ -853,7 +853,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; var cameraHeight = camera.height + 50; @@ -1077,7 +1077,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; var textureSource = bitmapText.texture.source[frame.sourceIndex]; @@ -1538,7 +1538,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); var height = srcHeight * (flipY ? -1.0 : 1.0); From 193ac6bfed6b6efcb6681dbe6460e6ca430d7c5d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 20 Feb 2018 14:23:21 +0000 Subject: [PATCH 176/200] Updated for 3.1.1 Release. --- CHANGELOG.md | 2 +- README.md | 49 +- dist/phaser-arcade-physics.js | 6120 ++++++++++++---------------- dist/phaser-arcade-physics.min.js | 2 +- dist/phaser.js | 6324 +++++++++++++---------------- dist/phaser.min.js | 2 +- package.json | 4 +- src/const.js | 2 +- 8 files changed, 5466 insertions(+), 7039 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6e88fc98..eb47c00a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Version 3.1.1 - In Development +## Version 3.1.1 - 20th February 2018 ### Updates diff --git a/README.md b/README.md index bbef50522..aa1308a60 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Grab the source and join in the fun!
-> 16th February 2018 +> 20th February 2018 -**Updated:** Thank you for the amazing response to the 3.0.0 release! We've been hard at work and have now prepared 3.1.0 for you, which is available today. This fixes a few issues that crept in and further speeds up the WebGL rendering. Check out the [Change Log](#changelog) for more details. +**Updated:** Thank you for the amazing response to the 3.0.0 release! We've been hard at work and have now prepared 3.1.1 for you, which is available today. Check out the [Change Log](#changelog) for more details. After 1.5 years in the making, tens of thousands of lines of code, hundreds of examples and countless hours of relentless work: Phaser 3 is finally out. It has been a real labor of love and then some! @@ -94,13 +94,13 @@ npm install phaser [Phaser is on jsDelivr](http://www.jsdelivr.com/projects/phaser), a "super-fast CDN for developers". Include the following in your html: ```html - + ``` or the minified version: ```html - + ``` ### License @@ -233,36 +233,31 @@ You can then run `webpack` to perform a dev build to the `build` folder, includi ![Change Log](https://phaser.io/images/github/div-change-log.png "Change Log") -## Version 3.1.0 - Onishi - 16th February 2018 +## Version 3.1.1 - 20th February 2018 ### Updates -* Vertex resource handling code updated, further optimizing the WebGL batching. You should now see less gl ops per frame across all batches. -* The `Blitter` game object has been updated to use the `List` structure instead of `DisplayList`. -* Arcade Physics World `disableBody` has been renamed `disableGameObjectBody` to more accurately reflect what it does. -* Lots of un-used properties were removed from the Arcade Physics Static Body object. -* Arcade Physics Static Body can now refresh itself from its parent via `refreshBody`. +* The entire codebase now passes our eslint config (which helped highlight a few errors), if you're submitting a PR, please ensure your PR passes the config too. +* The Web Audio Context is now suspended instead of closed to allow for prevention of 'Failed to construct AudioContext: maximum number of hardware contexts reached' errors from Chrome in a hot reload environment. We still strongly recommend reusing the same context in a production environment. See [this example](http://labs.phaser.io/view.html?src=src%5Caudio%5CWeb%20Audio%5CReuse%20AudioContext.js) for details. Fixes #3238 (thanks @z0y1 @Ziao) +* The Webpack shell plugin now fires on `onBuildExit`, meaning it'll update the examples if you use `webpack watch` (thanks @rblopes) +* Added `root: true` flag to the eslint config to stop it scanning further-up the filesystem. ### Bug Fixes -* A couple of accidental uses of `let` existed, which broke Image loading in Safari # (thanks Yat Hin Wong) -* Added the static property `Graphics.TargetCamera` was added back in which fixed `Graphics.generateTexture`. -* The SetHitArea Action now calls `setInteractive`, fixing `Group.createMultiple` when a hitArea has been set. -* Removed rogue Tween emit calls. Fix #3222 (thanks @ZaDarkSide) -* Fixed incorrect call to TweenManager.makeActive. Fix #3219 (thanks @ZaDarkSide) -* The Depth component was missing from the Zone Game Object. Fix #3213 (thanks @Twilrom) -* Fixed issue with `Blitter` overwriting previous objects vertex data. -* The `Tile` game object tinting was fixed, so tiles now honor alpha values correctly. -* The `BitmapMask` would sometimes incorrectly bind its resources. -* Fixed the wrong Extend target in MergeXHRSettings (thanks @samme) +* Math.Fuzzy.Floor had an incorrect method signature. +* Arcade Physics World didn't import GetOverlapX or GetOverlapY, causing `separateCircle` to break. +* TileSprite was missing a gl reference, causing it to fail during a context loss and restore. +* The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor. +* Removed unused `_queue` property from `ScenePlugin` class (thanks @rblopes) +* The variable `static` is no longer used in Arcade Physics, fixing the 'static is a reserved word' in strict mode error (thanks @samme) +* Fixed `Set.union`, `Set.intersect` and `Set.difference` (thanks @yupaul) +* The corner tints were being applied in the wrong order. Fixes #3252 (thanks @Rybar) +* BitmapText objects would ignore calls to setOrigin. Fixes #3249 (thanks @amkazan) +* Fixed a 1px camera jitter and bleeding issue in the renderer. Fixes #3245 (thanks @bradharms) +* Fixed the error `WebGL: INVALID_ENUM: blendEquation: invalid mode.` that would arise on iOS. Fixes #3244 (thanks @Ziao) +* The `drawBlitter` function would crash if `roundPixels` was true. Fixes #3243 (thanks @Jerenaux and @vulcanoidlogic) -### New Features - -* Destroying a Game Object will now call destroy on its physics body, if it has one set. -* Arcade Physics Colliders have a new `name` property and corresponding `setName` method. -* Matter.js bodies now have an inlined destroy method that removes them from the World. -* Impact bodies now remove themselves from the World when destroyed. -* Added Vector2.ZERO static property. +Please see the complete [Change Log]((https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md)) for previous releases. Looking for a v2 change? Check out the [Phaser CE Change Log](https://github.com/photonstorm/phaser-ce/blob/master/CHANGELOG.md) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 4f9d338f3..f7c84671a 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -1517,9 +1517,9 @@ module.exports = FileTypesManager; var Class = __webpack_require__(0); var Contains = __webpack_require__(33); -var GetPoint = __webpack_require__(107); +var GetPoint = __webpack_require__(106); var GetPoints = __webpack_require__(182); -var Random = __webpack_require__(108); +var Random = __webpack_require__(107); /** * @classdesc @@ -2410,24 +2410,24 @@ module.exports = PluginManager; module.exports = { - Alpha: __webpack_require__(378), - Animation: __webpack_require__(361), - BlendMode: __webpack_require__(379), - ComputedSize: __webpack_require__(380), - Depth: __webpack_require__(381), - Flip: __webpack_require__(382), - GetBounds: __webpack_require__(383), - Origin: __webpack_require__(384), + Alpha: __webpack_require__(380), + Animation: __webpack_require__(363), + BlendMode: __webpack_require__(381), + ComputedSize: __webpack_require__(382), + Depth: __webpack_require__(383), + Flip: __webpack_require__(384), + GetBounds: __webpack_require__(385), + Origin: __webpack_require__(386), Pipeline: __webpack_require__(184), - ScaleMode: __webpack_require__(385), - ScrollFactor: __webpack_require__(386), - Size: __webpack_require__(387), - Texture: __webpack_require__(388), - Tint: __webpack_require__(389), - ToJSON: __webpack_require__(390), - Transform: __webpack_require__(391), + ScaleMode: __webpack_require__(387), + ScrollFactor: __webpack_require__(388), + Size: __webpack_require__(389), + Texture: __webpack_require__(390), + Tint: __webpack_require__(391), + ToJSON: __webpack_require__(392), + Transform: __webpack_require__(393), TransformMatrix: __webpack_require__(185), - Visible: __webpack_require__(392) + Visible: __webpack_require__(394) }; @@ -3013,7 +3013,7 @@ module.exports = GetTilesWithin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RND = __webpack_require__(377); +var RND = __webpack_require__(379); var MATH_CONST = { @@ -3271,7 +3271,7 @@ var GetFastValue = __webpack_require__(1); var GetURL = __webpack_require__(147); var MergeXHRSettings = __webpack_require__(148); var XHRLoader = __webpack_require__(313); -var XHRSettings = __webpack_require__(91); +var XHRSettings = __webpack_require__(90); /** * @classdesc @@ -3572,7 +3572,7 @@ var File = new Class({ * * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error. */ - onError: function (event) + onError: function () { this.resetXHR(); @@ -3767,7 +3767,7 @@ module.exports = { */ var CONST = __webpack_require__(22); -var Smoothing = __webpack_require__(121); +var Smoothing = __webpack_require__(120); // The pool into which the canvas elements are placed. var pool = []; @@ -4011,7 +4011,7 @@ module.exports = CanvasPool(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); var GetAdvancedValue = __webpack_require__(10); var ScaleModes = __webpack_require__(62); @@ -4153,9 +4153,9 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.1.0', + VERSION: '3.1.1', - BlendModes: __webpack_require__(46), + BlendModes: __webpack_require__(45), ScaleModes: __webpack_require__(62), @@ -4668,136 +4668,6 @@ module.exports = Contains; /***/ }), /* 34 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Renderer.WebGL.Utils - * @since 3.0.0 - */ -module.exports = { - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats - * @since 3.0.0 - * - * @param {number} r - [description] - * @param {number} g - [description] - * @param {number} b - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintFromFloats: function (r, g, b, a) - { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlpha: function (rgb, a) - { - var ua = ((a * 255.0)|0) & 0xFF; - return ((ua << 24) | rgb) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlphaAndSwap: function (rgb, a) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB - * @since 3.0.0 - * - * @param {number} rgb - [description] - * - * @return {number} [description] - */ - getFloatsFromUintRGB: function (rgb) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getComponentCount - * @since 3.0.0 - * - * @param {number} attributes - [description] - * - * @return {number} [description] - */ - getComponentCount: function (attributes) - { - var count = 0; - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - - if (element.type === WebGLRenderingContext.FLOAT) - { - count += element.size; - } - else - { - count += 1; // We'll force any other type to be 32 bit. for now - } - } - - return count; - } - -}; - - -/***/ }), -/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4806,7 +4676,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(98); +var GetTileAt = __webpack_require__(97); var GetTilesWithin = __webpack_require__(15); /** @@ -4862,7 +4732,7 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 36 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4892,7 +4762,7 @@ module.exports = DegToRad; /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4902,7 +4772,7 @@ module.exports = DegToRad; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(117); +var GetColor = __webpack_require__(116); var GetColor32 = __webpack_require__(199); /** @@ -5406,7 +5276,7 @@ module.exports = Color; /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5418,7 +5288,7 @@ module.exports = Color; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var SpriteRender = __webpack_require__(443); +var SpriteRender = __webpack_require__(445); /** * @classdesc @@ -5560,8 +5430,8 @@ module.exports = Sprite; /***/ }), -/* 39 */, -/* 40 */ +/* 38 */, +/* 39 */ /***/ (function(module, exports) { /** @@ -5612,7 +5482,7 @@ module.exports = WorldToTileX; /***/ }), -/* 41 */ +/* 40 */ /***/ (function(module, exports) { /** @@ -5663,39 +5533,7 @@ module.exports = WorldToTileY; /***/ }), -/* 42 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Math.Wrap - * @since 3.0.0 - * - * @param {number} value - [description] - * @param {number} min - [description] - * @param {number} max - [description] - * - * @return {number} [description] - */ -var Wrap = function (value, min, max) -{ - var range = max - min; - - return (min + ((((value - min) % range) + range) % range)); -}; - -module.exports = Wrap; - - -/***/ }), -/* 43 */ +/* 41 */ /***/ (function(module, exports) { /** @@ -5729,7 +5567,138 @@ module.exports = DistanceBetween; /***/ }), -/* 44 */ +/* 42 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Renderer.WebGL.Utils + * @since 3.0.0 + */ +module.exports = { + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats + * @since 3.0.0 + * + * @param {number} r - [description] + * @param {number} g - [description] + * @param {number} b - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintFromFloats: function (r, g, b, a) + { + var ur = ((r * 255.0)|0) & 0xFF; + var ug = ((g * 255.0)|0) & 0xFF; + var ub = ((b * 255.0)|0) & 0xFF; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlpha: function (rgb, a) + { + var ua = ((a * 255.0)|0) & 0xFF; + return ((ua << 24) | rgb) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlphaAndSwap: function (rgb, a) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB + * @since 3.0.0 + * + * @param {number} rgb - [description] + * + * @return {number} [description] + */ + getFloatsFromUintRGB: function (rgb) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getComponentCount + * @since 3.0.0 + * + * @param {number} attributes - [description] + * @param {WebGLRenderingContext} glContext - [description] + * + * @return {number} [description] + */ + getComponentCount: function (attributes, glContext) + { + var count = 0; + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + + if (element.type === glContext.FLOAT) + { + count += element.size; + } + else + { + count += 1; // We'll force any other type to be 32 bit. for now + } + } + + return count; + } + +}; + + +/***/ }), +/* 43 */ /***/ (function(module, exports) { /** @@ -5764,7 +5733,7 @@ module.exports = SetTileCollision; /***/ }), -/* 45 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6586,7 +6555,7 @@ module.exports = Tile; /***/ }), -/* 46 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -6767,7 +6736,7 @@ module.exports = { /***/ }), -/* 47 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -6795,7 +6764,7 @@ module.exports = GetCenterX; /***/ }), -/* 48 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -6828,7 +6797,7 @@ module.exports = SetCenterX; /***/ }), -/* 49 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -6861,7 +6830,7 @@ module.exports = SetCenterY; /***/ }), -/* 50 */ +/* 49 */ /***/ (function(module, exports) { /** @@ -6888,6 +6857,38 @@ var GetCenterY = function (gameObject) module.exports = GetCenterY; +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - [description] + * @param {number} min - [description] + * @param {number} max - [description] + * + * @return {number} [description] + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { @@ -7809,7 +7810,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(53); var GetPoint = __webpack_require__(307); var GetPoints = __webpack_require__(308); -var Random = __webpack_require__(112); +var Random = __webpack_require__(111); /** * @classdesc @@ -8749,6 +8750,7 @@ var Set = new Class({ */ dump: function () { + // eslint-disable-next-line no-console console.group('Set'); for (var i = 0; i < this.entries.length; i++) @@ -8757,6 +8759,7 @@ var Set = new Class({ console.log(entry); } + // eslint-disable-next-line no-console console.groupEnd(); }, @@ -8918,14 +8921,14 @@ var Set = new Class({ { var newSet = new Set(); - set.values.forEach(function (value) + set.entries.forEach(function (value) { - newSet.add(value); + newSet.set(value); }); this.entries.forEach(function (value) { - newSet.add(value); + newSet.set(value); }); return newSet; @@ -8949,7 +8952,7 @@ var Set = new Class({ { if (set.contains(value)) { - newSet.add(value); + newSet.set(value); } }); @@ -8974,7 +8977,7 @@ var Set = new Class({ { if (!set.contains(value)) { - newSet.add(value); + newSet.set(value); } }); @@ -9067,7 +9070,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(32); var GetPoint = __webpack_require__(179); var GetPoints = __webpack_require__(180); -var Random = __webpack_require__(106); +var Random = __webpack_require__(105); /** * @classdesc @@ -9483,7 +9486,7 @@ module.exports = Length; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(122); +var FromPoints = __webpack_require__(121); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -10222,7 +10225,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(492))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(494))) /***/ }), /* 68 */ @@ -10282,7 +10285,7 @@ var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(4); var Range = __webpack_require__(272); var Set = __webpack_require__(61); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * @classdesc @@ -11116,7 +11119,7 @@ module.exports = Group; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var ImageRender = __webpack_require__(565); +var ImageRender = __webpack_require__(567); /** * @classdesc @@ -11204,7 +11207,7 @@ module.exports = Image; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(573); +var EaseMap = __webpack_require__(575); /** * [description] @@ -11788,7 +11791,7 @@ module.exports = MapData; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); @@ -12576,9 +12579,9 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GameObject = __webpack_require__(2); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); var Vector2 = __webpack_require__(6); -var Vector4 = __webpack_require__(120); +var Vector4 = __webpack_require__(119); /** * @classdesc @@ -12943,401 +12946,6 @@ module.exports = init(); /***/ }), /* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var Utils = __webpack_require__(34); - -/** - * @classdesc - * [description] - * - * @class WebGLPipeline - * @memberOf Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - [description] - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = config.game.config.resolution; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = config.game.config.width * this.resolution; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = config.game.config.height * this.resolution; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {int} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {int} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {int} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} [description] - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} resolution - [description] - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - bind: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onRender: function (scene, camera) - { - // called for each camera - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - flush: function () - { - if (this.flushLocked) return this; - this.flushLocked = true; - - var gl = this.gl; - var vertexCount = this.vertexCount; - var vertexBuffer = this.vertexBuffer; - var vertexData = this.vertexData; - var topology = this.topology; - var vertexSize = this.vertexSize; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 84 */ /***/ (function(module, exports) { /** @@ -13443,7 +13051,7 @@ module.exports = { /***/ }), -/* 85 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13451,7 +13059,6 @@ module.exports = { * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var NOOP = __webpack_require__(3); @@ -13473,12 +13080,8 @@ var NOOP = __webpack_require__(3); * @param {Phaser.Game} game - Reference to the current game instance. */ var BaseSoundManager = new Class({ - Extends: EventEmitter, - - initialize: - - function BaseSoundManager (game) + initialize: function BaseSoundManager (game) { EventEmitter.call(this); @@ -13496,7 +13099,7 @@ var BaseSoundManager = new Class({ * An array containing all added sounds. * * @name Phaser.Sound.BaseSoundManager#sounds - * @type {array} + * @type {Phaser.Sound.BaseSound[]} * @default [] * @private * @since 3.0.0 @@ -13556,7 +13159,6 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.pauseOnBlur = true; - game.events.on('blur', function () { if (this.pauseOnBlur) @@ -13564,7 +13166,6 @@ var BaseSoundManager = new Class({ this.onBlur(); } }, this); - game.events.on('focus', function () { if (this.pauseOnBlur) @@ -13572,7 +13173,6 @@ var BaseSoundManager = new Class({ this.onFocus(); } }, this); - game.events.once('destroy', this.destroy, this); /** @@ -13604,6 +13204,7 @@ var BaseSoundManager = new Class({ * * @name Phaser.Sound.BaseSoundManager#locked * @type {boolean} + * @readOnly * @since 3.0.0 */ this.locked = this.locked || false; @@ -13615,10 +13216,10 @@ var BaseSoundManager = new Class({ * @name Phaser.Sound.BaseSoundManager#unlocked * @type {boolean} * @default false + * @private * @since 3.0.0 */ this.unlocked = false; - if (this.locked) { this.unlock(); @@ -13631,45 +13232,43 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#add * @override * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {ISound} The new sound instance. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * + * @return {Phaser.Sound.BaseSound} The new sound instance. */ add: NOOP, + /** + * Audio sprite sound type. + * + * @typedef {Phaser.Sound.BaseSound} AudioSpriteSound + * + * @property {object} spritemap - Local reference to 'spritemap' object form json file generated by audiosprite tool. + */ /** * Adds a new audio sprite sound into the sound manager. * * @method Phaser.Sound.BaseSoundManager#addAudioSprite * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {IAudioSpriteSound} The new audio sprite sound instance. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * + * @return {AudioSpriteSound} The new audio sprite sound instance. */ addAudioSprite: function (key, config) { var sound = this.add(key, config); - - /** - * Local reference to 'spritemap' object form json file generated by audiosprite tool. - * - * @property {object} spritemap - */ sound.spritemap = this.game.cache.json.get(key).spritemap; - for (var markerName in sound.spritemap) { if (!sound.spritemap.hasOwnProperty(markerName)) { continue; } - var marker = sound.spritemap[markerName]; - sound.addMarker({ name: markerName, start: marker.start, @@ -13677,7 +13276,6 @@ var BaseSoundManager = new Class({ config: config }); } - return sound; }, @@ -13687,18 +13285,16 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#play * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig | ISoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. - * + * @param {SoundConfig|SoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. + * * @return {boolean} Whether the sound started playing successfully. */ play: function (key, extra) { var sound = this.add(key); - sound.once('ended', sound.destroy, sound); - if (extra) { if (extra.name) @@ -13723,19 +13319,17 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#playAudioSprite * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {string} spriteName - The name of the sound sprite to play. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * * @return {boolean} Whether the audio sprite sound started playing successfully. */ playAudioSprite: function (key, spriteName, config) { var sound = this.addAudioSprite(key); - sound.once('ended', sound.destroy, sound); - return sound.play(spriteName, config); }, @@ -13745,9 +13339,9 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#remove * @since 3.0.0 - * - * @param {ISound} sound - The sound object to remove. - * + * + * @param {Phaser.Sound.BaseSound} sound - The sound object to remove. + * * @return {boolean} True if the sound was removed successfully, otherwise false. */ remove: function (sound) @@ -13768,9 +13362,9 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#removeByKey * @since 3.0.0 - * + * * @param {string} key - The key to match when removing sound objects. - * + * * @return {number} The number of matching sound objects that were removed. */ removeByKey: function (key) @@ -13891,7 +13485,7 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ @@ -13908,7 +13502,6 @@ var BaseSoundManager = new Class({ */ this.emit('unlocked', this); } - for (var i = this.sounds.length - 1; i >= 0; i--) { if (this.sounds[i].pendingRemove) @@ -13916,7 +13509,6 @@ var BaseSoundManager = new Class({ this.sounds.splice(i, 1); } } - this.sounds.forEach(function (sound) { sound.update(time, delta); @@ -13932,12 +13524,10 @@ var BaseSoundManager = new Class({ destroy: function () { this.removeAllListeners(); - this.forEachActiveSound(function (sound) { sound.destroy(); }); - this.sounds.length = 0; this.sounds = null; this.game = null; @@ -13949,14 +13539,13 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#forEachActiveSound * @private * @since 3.0.0 - * + * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void * @param [scope] - Callback context. */ forEachActiveSound: function (callbackfn, scope) { var _this = this; - this.sounds.forEach(function (sound, index) { if (!sound.pendingRemove) @@ -13965,23 +13554,12 @@ var BaseSoundManager = new Class({ } }); } - }); - -/** - * Global playback rate. - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSoundManager.prototype, 'rate', { - get: function () { return this._rate; }, - set: function (value) { this._rate = value; @@ -13997,23 +13575,12 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', { */ this.emit('rate', this, value); } - }); - -/** - * Global detune. - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSoundManager.prototype, 'detune', { - get: function () { return this._detune; }, - set: function (value) { this._detune = value; @@ -14029,14 +13596,12 @@ Object.defineProperty(BaseSoundManager.prototype, 'detune', { */ this.emit('detune', this, value); } - }); - module.exports = BaseSoundManager; /***/ }), -/* 86 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14044,7 +13609,6 @@ module.exports = BaseSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var Extend = __webpack_require__(23); @@ -14052,7 +13616,7 @@ var NOOP = __webpack_require__(3); /** * @classdesc - * [description] + * Class containing all the shared state and behaviour of a sound object, independent of the implementation. * * @class BaseSound * @extends EventEmitter @@ -14063,15 +13627,11 @@ var NOOP = __webpack_require__(3); * * @param {Phaser.Sound.BaseSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {object} config - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. */ var BaseSound = new Class({ - Extends: EventEmitter, - - initialize: - - function BaseSound (manager, key, config) + initialize: function BaseSound (manager, key, config) { EventEmitter.call(this); @@ -14156,7 +13716,8 @@ var BaseSound = new Class({ * Default values will be set by properties' setters. * * @name Phaser.Sound.BaseSound#config - * @type {object} + * @type {SoundConfig} + * @private * @since 3.0.0 */ this.config = { @@ -14171,7 +13732,7 @@ var BaseSound = new Class({ * It could be default config or marker config. * * @name Phaser.Sound.BaseSound#currentConfig - * @type {object} + * @type {SoundConfig} * @private * @since 3.0.0 */ @@ -14245,18 +13806,10 @@ var BaseSound = new Class({ * @since 3.0.0 */ this.loop = false; - - /** - * [description] - * - * @name Phaser.Sound.BaseSound#config - * @type {object} - * @since 3.0.0 - */ this.config = Extend(this.config, config); /** - * Object containing markers definitions (Object.) + * Object containing markers definitions (Object.). * * @name Phaser.Sound.BaseSound#markers * @type {object} @@ -14271,7 +13824,7 @@ var BaseSound = new Class({ * 'null' if whole sound is playing. * * @name Phaser.Sound.BaseSound#currentMarker - * @type {?ISoundMarker} + * @type {SoundMarker} * @default null * @readOnly * @since 3.0.0 @@ -14297,34 +13850,26 @@ var BaseSound = new Class({ * @method Phaser.Sound.BaseSound#addMarker * @since 3.0.0 * - * @param {ISoundMarker} marker - Marker object + * @param {SoundMarker} marker - Marker object. * - * @return {boolean} Whether the marker was added successfully + * @return {boolean} Whether the marker was added successfully. */ addMarker: function (marker) { - if (!marker) + if (!marker || !marker.name || typeof marker.name !== 'string') { - console.error('addMarker - Marker object has to be provided!'); return false; } - - if (!marker.name || typeof marker.name !== 'string') - { - console.error('addMarker - Marker has to have a valid name!'); - return false; - } - if (this.markers[marker.name]) { + // eslint-disable-next-line no-console console.error('addMarker - Marker with name \'' + marker.name + '\' already exists for sound \'' + this.key + '\'!'); return false; } - marker = Extend(true, { name: '', start: 0, - duration: this.totalDuration, + duration: this.totalDuration - (marker.start || 0), config: { mute: false, volume: 1, @@ -14335,9 +13880,7 @@ var BaseSound = new Class({ delay: 0 } }, marker); - this.markers[marker.name] = marker; - return true; }, @@ -14347,32 +13890,23 @@ var BaseSound = new Class({ * @method Phaser.Sound.BaseSound#updateMarker * @since 3.0.0 * - * @param {ISoundMarker} marker - Marker object with updated values. + * @param {SoundMarker} marker - Marker object with updated values. * * @return {boolean} Whether the marker was updated successfully. */ updateMarker: function (marker) { - if (!marker) + if (!marker || !marker.name || typeof marker.name !== 'string') { - console.error('updateMarker - Marker object has to be provided!'); return false; } - - if (!marker.name || typeof marker.name !== 'string') - { - console.error('updateMarker - Marker has to have a valid name!'); - return false; - } - if (!this.markers[marker.name]) { + // eslint-disable-next-line no-console console.error('updateMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return false; } - this.markers[marker.name] = Extend(true, this.markers[marker.name], marker); - return true; }, @@ -14384,20 +13918,16 @@ var BaseSound = new Class({ * * @param {string} markerName - The name of the marker to remove. * - * @return {ISoundMarker|null} Removed marker object or 'null' if there was no marker with provided name. + * @return {SoundMarker|null} Removed marker object or 'null' if there was no marker with provided name. */ removeMarker: function (markerName) { var marker = this.markers[markerName]; - if (!marker) { - console.error('removeMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return null; } - this.markers[markerName] = null; - return marker; }, @@ -14410,26 +13940,24 @@ var BaseSound = new Class({ * @since 3.0.0 * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) { if (markerName === void 0) { markerName = ''; } - if (typeof markerName === 'object') { config = markerName; markerName = ''; } - if (typeof markerName !== 'string') { + // eslint-disable-next-line no-console console.error('Sound marker name has to be a string!'); return false; } - if (!markerName) { this.currentMarker = null; @@ -14440,20 +13968,18 @@ var BaseSound = new Class({ { if (!this.markers[markerName]) { + // eslint-disable-next-line no-console console.error('No marker with name \'' + markerName + '\' found for sound \'' + this.key + '\'!'); return false; } - this.currentMarker = this.markers[markerName]; this.currentConfig = this.currentMarker.config; this.duration = this.currentMarker.duration; } - this.resetConfig(); this.currentConfig = Extend(this.currentConfig, config); this.isPlaying = true; this.isPaused = false; - return true; }, @@ -14462,7 +13988,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -14471,10 +13997,8 @@ var BaseSound = new Class({ { return false; } - this.isPlaying = false; this.isPaused = true; - return true; }, @@ -14483,7 +14007,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -14492,10 +14016,8 @@ var BaseSound = new Class({ { return false; } - this.isPlaying = true; this.isPaused = false; - return true; }, @@ -14504,7 +14026,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -14555,7 +14077,7 @@ var BaseSound = new Class({ * @override * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ @@ -14573,7 +14095,6 @@ var BaseSound = new Class({ { return; } - this.pendingRemove = true; this.manager = null; this.key = ''; @@ -14598,25 +14119,14 @@ var BaseSound = new Class({ var cent = 1.0005777895065548; // Math.pow(2, 1/1200); var totalDetune = this.currentConfig.detune + this.manager.detune; var detuneRate = Math.pow(cent, totalDetune); - this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate; } }); - -/** - * Playback rate. - * - * @name Phaser.Sound.BaseSound#rate - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSound.prototype, 'rate', { - get: function () { return this.currentConfig.rate; }, - set: function (value) { this.currentConfig.rate = value; @@ -14630,21 +14140,11 @@ Object.defineProperty(BaseSound.prototype, 'rate', { this.emit('rate', this, value); } }); - -/** - * Detuning of sound. - * - * @name Phaser.Sound.BaseSound#detune - * @property {number} detune - * @since 3.0.0 - */ Object.defineProperty(BaseSound.prototype, 'detune', { - get: function () { return this.currentConfig.detune; }, - set: function (value) { this.currentConfig.detune = value; @@ -14658,12 +14158,11 @@ Object.defineProperty(BaseSound.prototype, 'detune', { this.emit('detune', this, value); } }); - module.exports = BaseSound; /***/ }), -/* 87 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15578,7 +15077,7 @@ module.exports = List; /***/ }), -/* 88 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -15750,7 +15249,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 89 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15762,7 +15261,7 @@ module.exports = TWEEN_CONST; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var MeshRender = __webpack_require__(645); +var MeshRender = __webpack_require__(647); /** * @classdesc @@ -15910,7 +15409,7 @@ module.exports = Mesh; /***/ }), -/* 90 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15986,7 +15485,7 @@ module.exports = LineToLine; /***/ }), -/* 91 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -16049,7 +15548,7 @@ module.exports = XHRSettings; /***/ }), -/* 92 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16060,7 +15559,7 @@ module.exports = XHRSettings; var Class = __webpack_require__(0); var Components = __webpack_require__(326); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * @classdesc @@ -16146,11 +15645,11 @@ module.exports = ArcadeSprite; /***/ }), +/* 92 */, /* 93 */, /* 94 */, /* 95 */, -/* 96 */, -/* 97 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16166,7 +15665,7 @@ module.exports = ArcadeSprite; module.exports = { CalculateFacesAt: __webpack_require__(150), - CalculateFacesWithin: __webpack_require__(35), + CalculateFacesWithin: __webpack_require__(34), Copy: __webpack_require__(863), CreateFromTiles: __webpack_require__(864), CullTiles: __webpack_require__(865), @@ -16175,22 +15674,22 @@ module.exports = { FindByIndex: __webpack_require__(868), FindTile: __webpack_require__(869), ForEachTile: __webpack_require__(870), - GetTileAt: __webpack_require__(98), + GetTileAt: __webpack_require__(97), GetTileAtWorldXY: __webpack_require__(871), GetTilesWithin: __webpack_require__(15), GetTilesWithinShape: __webpack_require__(872), GetTilesWithinWorldXY: __webpack_require__(873), - HasTileAt: __webpack_require__(341), + HasTileAt: __webpack_require__(343), HasTileAtWorldXY: __webpack_require__(874), IsInLayerBounds: __webpack_require__(74), PutTileAt: __webpack_require__(151), PutTileAtWorldXY: __webpack_require__(875), PutTilesAt: __webpack_require__(876), Randomize: __webpack_require__(877), - RemoveTileAt: __webpack_require__(342), + RemoveTileAt: __webpack_require__(344), RemoveTileAtWorldXY: __webpack_require__(878), RenderDebug: __webpack_require__(879), - ReplaceByIndex: __webpack_require__(340), + ReplaceByIndex: __webpack_require__(342), SetCollision: __webpack_require__(880), SetCollisionBetween: __webpack_require__(881), SetCollisionByExclusion: __webpack_require__(882), @@ -16200,19 +15699,19 @@ module.exports = { SetTileLocationCallback: __webpack_require__(886), Shuffle: __webpack_require__(887), SwapByIndex: __webpack_require__(888), - TileToWorldX: __webpack_require__(99), + TileToWorldX: __webpack_require__(98), TileToWorldXY: __webpack_require__(889), - TileToWorldY: __webpack_require__(100), + TileToWorldY: __webpack_require__(99), WeightedRandomize: __webpack_require__(890), - WorldToTileX: __webpack_require__(40), + WorldToTileX: __webpack_require__(39), WorldToTileXY: __webpack_require__(891), - WorldToTileY: __webpack_require__(41) + WorldToTileY: __webpack_require__(40) }; /***/ }), -/* 98 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16268,7 +15767,7 @@ module.exports = GetTileAt; /***/ }), -/* 99 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -16312,7 +15811,7 @@ module.exports = TileToWorldX; /***/ }), -/* 100 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -16356,7 +15855,7 @@ module.exports = TileToWorldY; /***/ }), -/* 101 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16748,7 +16247,7 @@ module.exports = Tileset; /***/ }), -/* 102 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -16811,7 +16310,7 @@ module.exports = GetNewValue; /***/ }), -/* 103 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16824,8 +16323,8 @@ var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(102); -var GetProps = __webpack_require__(355); +var GetNewValue = __webpack_require__(101); +var GetProps = __webpack_require__(357); var GetTargets = __webpack_require__(155); var GetValue = __webpack_require__(4); var GetValueOp = __webpack_require__(156); @@ -16942,7 +16441,7 @@ module.exports = TweenBuilder; /***/ }), -/* 104 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16984,7 +16483,7 @@ module.exports = Merge; /***/ }), -/* 105 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17021,7 +16520,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 106 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17063,7 +16562,7 @@ module.exports = Random; /***/ }), -/* 107 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17138,7 +16637,7 @@ module.exports = GetPoint; /***/ }), -/* 108 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17174,7 +16673,7 @@ module.exports = Random; /***/ }), -/* 109 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17232,7 +16731,7 @@ module.exports = GetPoints; /***/ }), -/* 110 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17271,7 +16770,7 @@ module.exports = Random; /***/ }), -/* 111 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17309,7 +16808,7 @@ module.exports = Random; /***/ }), -/* 112 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17363,7 +16862,7 @@ module.exports = Random; /***/ }), -/* 113 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -17400,7 +16899,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 114 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17624,6 +17123,7 @@ var Map = new Class({ { var entries = this.entries; + // eslint-disable-next-line no-console console.group('Map'); for (var key in entries) @@ -17631,6 +17131,7 @@ var Map = new Class({ console.log(key, entries[key]); } + // eslint-disable-next-line no-console console.groupEnd(); }, @@ -17725,7 +17226,7 @@ module.exports = Map; /***/ }), -/* 115 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17735,10 +17236,10 @@ module.exports = Map; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); var Rectangle = __webpack_require__(8); var TransformMatrix = __webpack_require__(185); -var ValueToColor = __webpack_require__(116); +var ValueToColor = __webpack_require__(115); var Vector2 = __webpack_require__(6); /** @@ -19053,6 +18554,12 @@ var Camera = new Class({ { this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; + + if (this.roundPixels) + { + this._shakeOffsetX |= 0; + this._shakeOffsetY |= 0; + } } } }, @@ -19077,7 +18584,7 @@ module.exports = Camera; /***/ }), -/* 116 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19133,7 +18640,7 @@ module.exports = ValueToColor; /***/ }), -/* 117 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -19163,7 +18670,7 @@ module.exports = GetColor; /***/ }), -/* 118 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19173,7 +18680,7 @@ module.exports = GetColor; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(119); +var Matrix4 = __webpack_require__(118); var RandomXYZ = __webpack_require__(204); var RandomXYZW = __webpack_require__(205); var RotateVec3 = __webpack_require__(206); @@ -19181,7 +18688,7 @@ var Set = __webpack_require__(61); var Sprite3D = __webpack_require__(81); var Vector2 = __webpack_require__(6); var Vector3 = __webpack_require__(51); -var Vector4 = __webpack_require__(120); +var Vector4 = __webpack_require__(119); // Local cache vars var tmpVec3 = new Vector3(); @@ -20060,8 +19567,8 @@ var Camera = new Class({ { if (out === undefined) { out = new Vector2(); } - //TODO: optimize this with a simple distance calculation: - //https://developer.valvesoftware.com/wiki/Field_of_View + // TODO: optimize this with a simple distance calculation: + // https://developer.valvesoftware.com/wiki/Field_of_View if (this.billboardMatrixDirty) { @@ -20231,7 +19738,7 @@ module.exports = Camera; /***/ }), -/* 119 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21672,7 +21179,7 @@ module.exports = Matrix4; /***/ }), -/* 120 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22200,7 +21707,7 @@ module.exports = Vector4; /***/ }), -/* 121 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -22332,7 +21839,7 @@ module.exports = Smoothing(); /***/ }), -/* 122 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22415,7 +21922,7 @@ module.exports = FromPoints; /***/ }), -/* 123 */ +/* 122 */ /***/ (function(module, exports) { /** @@ -22452,7 +21959,7 @@ module.exports = CatmullRom; /***/ }), -/* 124 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -22514,7 +22021,7 @@ module.exports = AddToDOM; /***/ }), -/* 125 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22715,7 +22222,7 @@ module.exports = init(); /***/ }), -/* 126 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -22744,6 +22251,401 @@ var IsSizePowerOfTwo = function (width, height) module.exports = IsSizePowerOfTwo; +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Utils = __webpack_require__(42); + +/** + * @classdesc + * [description] + * + * @class WebGLPipeline + * @memberOf Phaser.Renderer.WebGL + * @constructor + * @since 3.0.0 + * + * @param {object} config - [description] + */ +var WebGLPipeline = new Class({ + + initialize: + + function WebGLPipeline (config) + { + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = 'WebGLPipeline'; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = config.game; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = config.game.canvas; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = config.game.config.resolution; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = config.game.config.width * this.resolution; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = config.game.config.height * this.resolution; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = config.gl; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = config.vertexCapacity; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = config.renderer; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {object} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = config.vertexSize; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {integer} + * @since 3.0.0 + */ + this.topology = config.topology; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} [description] + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - [description] + * @param {number} height - [description] + * @param {number} resolution - [description] + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + bind: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else + { + gl.disableVertexAttribArray(location); + } + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + flush: function () + { + if (this.flushLocked) { return this; } + + this.flushLocked = true; + + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + } + +}); + +module.exports = WebGLPipeline; + + /***/ }), /* 127 */ /***/ (function(module, exports) { @@ -23369,9 +23271,9 @@ module.exports = { */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(84); -var GetPhysicsPlugins = __webpack_require__(525); -var GetScenePlugins = __webpack_require__(526); +var CONST = __webpack_require__(83); +var GetPhysicsPlugins = __webpack_require__(527); +var GetScenePlugins = __webpack_require__(528); var Plugins = __webpack_require__(231); var Settings = __webpack_require__(252); @@ -24509,9 +24411,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GetBitmapTextSize = __webpack_require__(265); -var ParseFromAtlas = __webpack_require__(542); -var ParseRetroFont = __webpack_require__(543); -var Render = __webpack_require__(544); +var ParseFromAtlas = __webpack_require__(544); +var ParseRetroFont = __webpack_require__(545); +var Render = __webpack_require__(546); /** * @classdesc @@ -24774,13 +24676,13 @@ module.exports = BitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(547); -var Bob = __webpack_require__(550); +var BlitterRender = __webpack_require__(549); +var Bob = __webpack_require__(552); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(130); var GameObject = __webpack_require__(2); -var List = __webpack_require__(87); +var List = __webpack_require__(86); /** * @classdesc @@ -25036,7 +24938,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GetBitmapTextSize = __webpack_require__(265); -var Render = __webpack_require__(551); +var Render = __webpack_require__(553); /** * @classdesc @@ -25413,7 +25315,7 @@ module.exports = DynamicBitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(115); +var Camera = __webpack_require__(114); var Class = __webpack_require__(0); var Commands = __webpack_require__(127); var Components = __webpack_require__(12); @@ -25421,7 +25323,7 @@ var Ellipse = __webpack_require__(267); var GameObject = __webpack_require__(2); var GetValue = __webpack_require__(4); var MATH_CONST = __webpack_require__(16); -var Render = __webpack_require__(563); +var Render = __webpack_require__(565); /** * @classdesc @@ -26550,7 +26452,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(68); var GetPoint = __webpack_require__(268); var GetPoints = __webpack_require__(269); -var Random = __webpack_require__(110); +var Random = __webpack_require__(109); /** * @classdesc @@ -26953,10 +26855,10 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GravityWell = __webpack_require__(568); -var List = __webpack_require__(87); -var ParticleEmitter = __webpack_require__(569); -var Render = __webpack_require__(608); +var GravityWell = __webpack_require__(570); +var List = __webpack_require__(86); +var ParticleEmitter = __webpack_require__(571); +var Render = __webpack_require__(610); /** * @classdesc @@ -27408,16 +27310,16 @@ module.exports = GetRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(123); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetTextSize = __webpack_require__(611); +var GetTextSize = __webpack_require__(613); var GetValue = __webpack_require__(4); var RemoveFromDOM = __webpack_require__(229); -var TextRender = __webpack_require__(612); -var TextStyle = __webpack_require__(615); +var TextRender = __webpack_require__(614); +var TextStyle = __webpack_require__(617); /** * @classdesc @@ -28363,7 +28265,8 @@ var Text = new Class({ } context.save(); - //context.scale(resolution, resolution); + + // context.scale(resolution, resolution); if (style.backgroundColor) { @@ -28514,7 +28417,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GetPowerOfTwo = __webpack_require__(288); -var TileSpriteRender = __webpack_require__(617); +var TileSpriteRender = __webpack_require__(619); /** * @classdesc @@ -28682,7 +28585,9 @@ var TileSprite = new Class({ this.updateTileTexture(); - scene.sys.game.renderer.onContextRestored(function (renderer) { + scene.sys.game.renderer.onContextRestored(function (renderer) + { + var gl = renderer.gl; this.tileTexture = null; this.dirty = true; this.tileTexture = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.canvasBuffer, this.potWidth, this.potHeight); @@ -28761,7 +28666,7 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(89); +var Mesh = __webpack_require__(88); /** * @classdesc @@ -28802,37 +28707,37 @@ var Quad = new Class({ // | \ // 1----2 - var vertices = [ + var vertices = [ 0, 0, // tl 0, 0, // bl 0, 0, // br 0, 0, // tl 0, 0, // br - 0, 0 // tr + 0, 0 // tr ]; - var uv = [ + var uv = [ 0, 0, // tl 0, 1, // bl 1, 1, // br 0, 0, // tl 1, 1, // br - 1, 0 // tr + 1, 0 // tr ]; - var colors = [ + var colors = [ 0xffffff, // tl 0xffffff, // bl 0xffffff, // br 0xffffff, // tl 0xffffff, // br - 0xffffff // tr + 0xffffff // tr ]; - var alphas = [ + var alphas = [ 1, // tl 1, // bl 1, // br 1, // tl 1, // br - 1 // tr + 1 // tr ]; Mesh.call(this, scene, x, y, vertices, uv, colors, alphas, texture, frame); @@ -29662,7 +29567,7 @@ module.exports = GetURL; */ var Extend = __webpack_require__(23); -var XHRSettings = __webpack_require__(91); +var XHRSettings = __webpack_require__(90); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -29710,7 +29615,7 @@ module.exports = MergeXHRSettings; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(98); +var GetTileAt = __webpack_require__(97); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -29785,10 +29690,10 @@ module.exports = CalculateFacesAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); var CalculateFacesAt = __webpack_require__(150); -var SetTileCollision = __webpack_require__(44); +var SetTileCollision = __webpack_require__(43); /** * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index @@ -29905,7 +29810,7 @@ module.exports = SetLayerCollisionIndex; var Formats = __webpack_require__(19); var LayerData = __webpack_require__(75); var MapData = __webpack_require__(76); -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); /** * Parses a 2D array of tile indexes into a new MapData object with a single layer. @@ -29996,8 +29901,8 @@ module.exports = Parse2DArray; var Formats = __webpack_require__(19); var MapData = __webpack_require__(76); -var Parse = __webpack_require__(343); -var Tilemap = __webpack_require__(351); +var Parse = __webpack_require__(345); +var Tilemap = __webpack_require__(353); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -30345,7 +30250,7 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); -var TWEEN_CONST = __webpack_require__(88); +var TWEEN_CONST = __webpack_require__(87); /** * @classdesc @@ -31112,7 +31017,7 @@ var Tween = new Class({ ms -= tweenData.delay; ms -= tweenData.t1; - var repeats = Math.floor(ms / tweenData.t2); + // var repeats = Math.floor(ms / tweenData.t2); // remainder ms = ((ms / tweenData.t2) % 1) * tweenData.t2; @@ -31131,7 +31036,12 @@ var Tween = new Class({ tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); - // console.log(tweenData.key, 'Seek', tweenData.target[tweenData.key], 'to', tweenData.current, 'pro', tweenData.progress, 'marker', marker, progress); + // console.log(tweenData.key, 'Seek', tweenData.target[tweenData.key], 'to', tweenData.current, 'pro', tweenData.progress, 'marker', toPosition, progress); + + // if (tweenData.current === 0) + // { + // console.log('zero', tweenData.start, tweenData.end, v, 'progress', progress); + // } tweenData.target[tweenData.key] = tweenData.current; } @@ -31772,7 +31682,7 @@ module.exports = TweenData; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathWrap = __webpack_require__(42); +var MathWrap = __webpack_require__(50); /** * [description] @@ -31802,7 +31712,7 @@ module.exports = Wrap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); /** * [description] @@ -31923,51 +31833,51 @@ module.exports = IsPlainObject; module.exports = { - Angle: __webpack_require__(373), - Call: __webpack_require__(374), - GetFirst: __webpack_require__(375), - GridAlign: __webpack_require__(376), - IncAlpha: __webpack_require__(393), - IncX: __webpack_require__(394), - IncXY: __webpack_require__(395), - IncY: __webpack_require__(396), - PlaceOnCircle: __webpack_require__(397), - PlaceOnEllipse: __webpack_require__(398), - PlaceOnLine: __webpack_require__(399), - PlaceOnRectangle: __webpack_require__(400), - PlaceOnTriangle: __webpack_require__(401), - PlayAnimation: __webpack_require__(402), - RandomCircle: __webpack_require__(403), - RandomEllipse: __webpack_require__(404), - RandomLine: __webpack_require__(405), - RandomRectangle: __webpack_require__(406), - RandomTriangle: __webpack_require__(407), - Rotate: __webpack_require__(408), - RotateAround: __webpack_require__(409), - RotateAroundDistance: __webpack_require__(410), - ScaleX: __webpack_require__(411), - ScaleXY: __webpack_require__(412), - ScaleY: __webpack_require__(413), - SetAlpha: __webpack_require__(414), - SetBlendMode: __webpack_require__(415), - SetDepth: __webpack_require__(416), - SetHitArea: __webpack_require__(417), - SetOrigin: __webpack_require__(418), - SetRotation: __webpack_require__(419), - SetScale: __webpack_require__(420), - SetScaleX: __webpack_require__(421), - SetScaleY: __webpack_require__(422), - SetTint: __webpack_require__(423), - SetVisible: __webpack_require__(424), - SetX: __webpack_require__(425), - SetXY: __webpack_require__(426), - SetY: __webpack_require__(427), - ShiftPosition: __webpack_require__(428), - Shuffle: __webpack_require__(429), - SmootherStep: __webpack_require__(430), - SmoothStep: __webpack_require__(431), - Spread: __webpack_require__(432), - ToggleVisible: __webpack_require__(433) + Angle: __webpack_require__(375), + Call: __webpack_require__(376), + GetFirst: __webpack_require__(377), + GridAlign: __webpack_require__(378), + IncAlpha: __webpack_require__(395), + IncX: __webpack_require__(396), + IncXY: __webpack_require__(397), + IncY: __webpack_require__(398), + PlaceOnCircle: __webpack_require__(399), + PlaceOnEllipse: __webpack_require__(400), + PlaceOnLine: __webpack_require__(401), + PlaceOnRectangle: __webpack_require__(402), + PlaceOnTriangle: __webpack_require__(403), + PlayAnimation: __webpack_require__(404), + RandomCircle: __webpack_require__(405), + RandomEllipse: __webpack_require__(406), + RandomLine: __webpack_require__(407), + RandomRectangle: __webpack_require__(408), + RandomTriangle: __webpack_require__(409), + Rotate: __webpack_require__(410), + RotateAround: __webpack_require__(411), + RotateAroundDistance: __webpack_require__(412), + ScaleX: __webpack_require__(413), + ScaleXY: __webpack_require__(414), + ScaleY: __webpack_require__(415), + SetAlpha: __webpack_require__(416), + SetBlendMode: __webpack_require__(417), + SetDepth: __webpack_require__(418), + SetHitArea: __webpack_require__(419), + SetOrigin: __webpack_require__(420), + SetRotation: __webpack_require__(421), + SetScale: __webpack_require__(422), + SetScaleX: __webpack_require__(423), + SetScaleY: __webpack_require__(424), + SetTint: __webpack_require__(425), + SetVisible: __webpack_require__(426), + SetX: __webpack_require__(427), + SetXY: __webpack_require__(428), + SetY: __webpack_require__(429), + ShiftPosition: __webpack_require__(430), + Shuffle: __webpack_require__(431), + SmootherStep: __webpack_require__(432), + SmoothStep: __webpack_require__(433), + Spread: __webpack_require__(434), + ToggleVisible: __webpack_require__(435) }; @@ -32164,9 +32074,9 @@ module.exports = ALIGN_CONST; */ var GetBottom = __webpack_require__(24); -var GetCenterX = __webpack_require__(47); +var GetCenterX = __webpack_require__(46); var SetBottom = __webpack_require__(25); -var SetCenterX = __webpack_require__(48); +var SetCenterX = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -32290,8 +32200,8 @@ module.exports = BottomRight; */ var CenterOn = __webpack_require__(173); -var GetCenterX = __webpack_require__(47); -var GetCenterY = __webpack_require__(50); +var GetCenterX = __webpack_require__(46); +var GetCenterY = __webpack_require__(49); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -32329,8 +32239,8 @@ module.exports = Center; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetCenterX = __webpack_require__(48); -var SetCenterY = __webpack_require__(49); +var SetCenterX = __webpack_require__(47); +var SetCenterY = __webpack_require__(48); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -32364,9 +32274,9 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetLeft = __webpack_require__(26); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetLeft = __webpack_require__(27); /** @@ -32406,9 +32316,9 @@ module.exports = LeftCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetRight = __webpack_require__(28); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetRight = __webpack_require__(29); /** @@ -32448,9 +32358,9 @@ module.exports = RightCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(47); +var GetCenterX = __webpack_require__(46); var GetTop = __webpack_require__(30); -var SetCenterX = __webpack_require__(48); +var SetCenterX = __webpack_require__(47); var SetTop = __webpack_require__(31); /** @@ -32574,7 +32484,7 @@ module.exports = TopRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(105); +var CircumferencePoint = __webpack_require__(104); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -32616,7 +32526,7 @@ module.exports = GetPoint; */ var Circumference = __webpack_require__(181); -var CircumferencePoint = __webpack_require__(105); +var CircumferencePoint = __webpack_require__(104); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -32695,7 +32605,7 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoint = __webpack_require__(107); +var GetPoint = __webpack_require__(106); var Perimeter = __webpack_require__(78); // Return an array of points from the perimeter of the rectangle @@ -33358,6 +33268,7 @@ var MarchingAnts = function (rect, step, quantity, out) switch (face) { + // Top face case 0: x += step; @@ -34730,7 +34641,7 @@ module.exports = AnimationFrame; var Animation = __webpack_require__(192); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(114); +var CustomMap = __webpack_require__(113); var EventEmitter = __webpack_require__(13); var GetValue = __webpack_require__(4); var Pad = __webpack_require__(195); @@ -35402,7 +35313,7 @@ module.exports = Pad; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(114); +var CustomMap = __webpack_require__(113); var EventEmitter = __webpack_require__(13); /** @@ -35802,7 +35713,7 @@ module.exports = CacheManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Converts a hex string into a Phaser Color object. @@ -35886,7 +35797,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); var IntegerToRGB = __webpack_require__(201); /** @@ -35967,7 +35878,7 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -35997,7 +35908,7 @@ module.exports = ObjectToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -36121,7 +36032,7 @@ module.exports = RandomXYZW; */ var Vector3 = __webpack_require__(51); -var Matrix4 = __webpack_require__(119); +var Matrix4 = __webpack_require__(118); var Quaternion = __webpack_require__(207); var tmpMat4 = new Matrix4(); @@ -37526,7 +37437,7 @@ module.exports = Matrix3; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(118); +var Camera = __webpack_require__(117); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -37713,7 +37624,7 @@ module.exports = OrthographicCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(118); +var Camera = __webpack_require__(117); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -38279,7 +38190,7 @@ module.exports = CubicBezierInterpolation; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(4); var RadToDeg = __webpack_require__(216); var Vector2 = __webpack_require__(6); @@ -38896,7 +38807,7 @@ module.exports = RadToDeg; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var FromPoints = __webpack_require__(122); +var FromPoints = __webpack_require__(121); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -39120,7 +39031,7 @@ module.exports = LineCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(123); +var CatmullRom = __webpack_require__(122); var Class = __webpack_require__(0); var Curve = __webpack_require__(66); var Vector2 = __webpack_require__(6); @@ -39396,26 +39307,26 @@ module.exports = CanvasInterpolation; * @namespace Phaser.Display.Color */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); -Color.ColorToRGBA = __webpack_require__(480); +Color.ColorToRGBA = __webpack_require__(482); Color.ComponentToHex = __webpack_require__(221); -Color.GetColor = __webpack_require__(117); +Color.GetColor = __webpack_require__(116); Color.GetColor32 = __webpack_require__(199); Color.HexStringToColor = __webpack_require__(198); -Color.HSLToColor = __webpack_require__(481); -Color.HSVColorWheel = __webpack_require__(483); +Color.HSLToColor = __webpack_require__(483); +Color.HSVColorWheel = __webpack_require__(485); Color.HSVToRGB = __webpack_require__(223); Color.HueToComponent = __webpack_require__(222); Color.IntegerToColor = __webpack_require__(200); Color.IntegerToRGB = __webpack_require__(201); -Color.Interpolate = __webpack_require__(484); +Color.Interpolate = __webpack_require__(486); Color.ObjectToColor = __webpack_require__(202); -Color.RandomRGB = __webpack_require__(485); +Color.RandomRGB = __webpack_require__(487); Color.RGBStringToColor = __webpack_require__(203); -Color.RGBToHSV = __webpack_require__(486); -Color.RGBToString = __webpack_require__(487); -Color.ValueToColor = __webpack_require__(116); +Color.RGBToHSV = __webpack_require__(488); +Color.RGBToString = __webpack_require__(489); +Color.ValueToColor = __webpack_require__(115); module.exports = Color; @@ -39505,7 +39416,7 @@ var HueToComponent = function (p, q, t) module.export = HueToComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(482)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(484)(module))) /***/ }), /* 223 */ @@ -39517,7 +39428,7 @@ module.export = HueToComponent; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetColor = __webpack_require__(117); +var GetColor = __webpack_require__(116); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -41296,16 +41207,16 @@ var ModelViewProjection = { vm[2] = 0.0; vm[3] = 0.0; vm[4] = matrix2D[2]; - vm[5] = matrix2D[3]; - vm[6] = 0.0; + vm[5] = matrix2D[3]; + vm[6] = 0.0; vm[7] = 0.0; vm[8] = matrix2D[4]; - vm[9] = matrix2D[5]; - vm[10] = 1.0; + vm[9] = matrix2D[5]; + vm[10] = 1.0; vm[11] = 0.0; - vm[12] = 0.0; - vm[13] = 0.0; - vm[14] = 0.0; + vm[12] = 0.0; + vm[13] = 0.0; + vm[14] = 0.0; vm[15] = 1.0; this.viewMatrixDirty = true; @@ -41435,10 +41346,8 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(510); +var ShaderSourceFS = __webpack_require__(512); var TextureTintPipeline = __webpack_require__(236); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); var LIGHT_COUNT = 10; @@ -41519,18 +41428,19 @@ var ForwardDiffuseLightPipeline = new Class({ var cameraMatrix = camera.matrix; var point = {x: 0, y: 0}; var height = renderer.height; + var index; - for (var index = 0; index < LIGHT_COUNT; ++index) + for (index = 0; index < LIGHT_COUNT; ++index) { renderer.setFloat1(program, 'uLights[' + index + '].radius', 0); // reset lights } - if (lightCount <= 0) return this; + if (lightCount <= 0) { return this; } renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom); renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b); - for (var index = 0; index < lightCount; ++index) + for (index = 0; index < lightCount; ++index) { var light = lights[index]; var lightName = 'uLights[' + index + '].'; @@ -41834,10 +41744,10 @@ module.exports = ForwardDiffuseLightPipeline; var Class = __webpack_require__(0); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(511); -var ShaderSourceVS = __webpack_require__(512); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); +var ShaderSourceFS = __webpack_require__(513); +var ShaderSourceVS = __webpack_require__(514); +var Utils = __webpack_require__(42); +var WebGLPipeline = __webpack_require__(126); /** * @classdesc @@ -41875,9 +41785,9 @@ var TextureTintPipeline = new Class({ fragShader: (overrideFragmentShader ? overrideFragmentShader : ShaderSourceFS), vertexCapacity: 6 * 2000, - vertexSize: - Float32Array.BYTES_PER_ELEMENT * 2 + - Float32Array.BYTES_PER_ELEMENT * 2 + + vertexSize: + Float32Array.BYTES_PER_ELEMENT * 2 + + Float32Array.BYTES_PER_ELEMENT * 2 + Uint8Array.BYTES_PER_ELEMENT * 4, attributes: [ @@ -41952,13 +41862,16 @@ var TextureTintPipeline = new Class({ * @since 3.1.0 * * @param {WebGLTexture} texture - [description] - * @param {int} textureUnit - [description] + * @param {integer} textureUnit - [description] * * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] */ setTexture2D: function (texture, unit) { - if (!texture) return this; + if (!texture) + { + return this; + } var batches = this.batches; @@ -42018,27 +41931,32 @@ var TextureTintPipeline = new Class({ */ flush: function () { - if (this.flushLocked) return this; + if (this.flushLocked) + { + return this; + } + this.flushLocked = true; var gl = this.gl; var renderer = this.renderer; var vertexCount = this.vertexCount; - var vertexBuffer = this.vertexBuffer; - var vertexData = this.vertexData; var topology = this.topology; var vertexSize = this.vertexSize; var batches = this.batches; var batchCount = batches.length; var batchVertexCount = 0; var batch = null; - var nextBatch = null; + var batchNext; + var textureIndex; + var nTexture; - if (batchCount === 0 || vertexCount === 0) + if (batchCount === 0 || vertexCount === 0) { this.flushLocked = false; return this; } + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); for (var index = 0; index < batches.length - 1; ++index) @@ -42048,20 +41966,22 @@ var TextureTintPipeline = new Class({ if (batch.textures.length > 0) { - for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) { - var nTexture = batch.textures[textureIndex]; + nTexture = batch.textures[textureIndex]; + if (nTexture) { renderer.setTexture2D(nTexture, 1 + textureIndex); } } + gl.activeTexture(gl.TEXTURE0); } batchVertexCount = batchNext.first - batch.first; - if (batch.texture === null || batchVertexCount <= 0) continue; + if (batch.texture === null || batchVertexCount <= 0) { continue; } renderer.setTexture2D(batch.texture, 0); gl.drawArrays(topology, batch.first, batchVertexCount); @@ -42072,14 +41992,16 @@ var TextureTintPipeline = new Class({ if (batch.textures.length > 0) { - for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) { - var nTexture = batch.textures[textureIndex]; + nTexture = batch.textures[textureIndex]; + if (nTexture) { renderer.setTexture2D(nTexture, 1 + textureIndex); } } + gl.activeTexture(gl.TEXTURE0); } @@ -42147,7 +42069,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function (tilemap) { if (tilemap.vertexCount > 0) { @@ -42191,12 +42113,10 @@ var TextureTintPipeline = new Class({ var emitters = emitterManager.emitters.list; var emitterCount = emitters.length; - var getTint = Utils.getTintAppendFloatAlpha; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; var cameraScrollY = camera.scrollY; @@ -42282,18 +42202,6 @@ var TextureTintPipeline = new Class({ var ty3 = xw * mvb + y * mvd + mvf; var vertexOffset = this.vertexCount * vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; @@ -42357,8 +42265,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var list = blitter.getRenderList(); var length = list.length; var cameraMatrix = camera.matrix.matrix; @@ -42384,39 +42291,27 @@ var TextureTintPipeline = new Class({ var bob = list[batchOffset + index]; var frame = bob.frame; var alpha = bob.alpha; - var tint = getTint(0xffffff, bob.alpha); + var tint = getTint(0xffffff, alpha); var uvs = frame.uvs; var flipX = bob.flipX; var flipY = bob.flipY; - var width = frame.width * (flipX ? -1.0 : 1.0); + var width = frame.width * (flipX ? -1.0 : 1.0); var height = frame.height * (flipY ? -1.0 : 1.0); var x = blitterX + bob.x + frame.x + (frame.width * ((flipX) ? 1.0 : 0.0)); var y = blitterY + bob.y + frame.y + (frame.height * ((flipY) ? 1.0 : 0.0)); - var xw = x + width; + var xw = x + width; var yh = y + height; var tx0 = x * a + y * c + e; var ty0 = x * b + y * d + f; var tx1 = xw * a + yh * c + e; var ty1 = xw * b + yh * d + f; - - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } // Bind Texture if texture wasn't bound. // This needs to be here because of multiple // texture atlas. this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); - var vertexOffset = this.vertexCount * this.vertexComponentCount; + var vertexOffset = this.vertexCount * this.vertexComponentCount; vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -42489,8 +42384,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; var texture = frame.texture.source[frame.sourceIndex].glTexture; @@ -42545,58 +42439,46 @@ var TextureTintPipeline = new Class({ var ty2 = xw * mvb + yh * mvd + mvf; var tx3 = xw * mva + y * mvc + mve; var ty3 = xw * mvb + y * mvd + mvf; - var tint0 = getTint(tintTL, alphaTL); - var tint1 = getTint(tintTR, alphaTR); - var tint2 = getTint(tintBL, alphaBL); - var tint3 = getTint(tintBR, alphaBR); + var vTintTL = getTint(tintTL, alphaTL); + var vTintTR = getTint(tintTR, alphaTR); + var vTintBL = getTint(tintBL, alphaBL); + var vTintBR = getTint(tintBR, alphaBR); var vertexOffset = 0; this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; vertexViewF32[vertexOffset + 3] = uvs.y0; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = uvs.x1; vertexViewF32[vertexOffset + 8] = uvs.y1; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = uvs.x2; vertexViewF32[vertexOffset + 13] = uvs.y2; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = uvs.x0; vertexViewF32[vertexOffset + 18] = uvs.y0; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = uvs.x2; vertexViewF32[vertexOffset + 23] = uvs.y2; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = uvs.x3; vertexViewF32[vertexOffset + 28] = uvs.y3; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; }, @@ -42630,15 +42512,8 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; - var a = cameraMatrix[0]; - var b = cameraMatrix[1]; - var c = cameraMatrix[2]; - var d = cameraMatrix[3]; - var e = cameraMatrix[4]; - var f = cameraMatrix[5]; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; var translateX = mesh.x - camera.scrollX * mesh.scrollFactorX; @@ -42679,12 +42554,6 @@ var TextureTintPipeline = new Class({ var tx = x * mva + y * mvc + mve; var ty = x * mvb + y * mvd + mvf; - if (roundPixels) - { - tx = ((tx * resolution)|0) / resolution; - tx = ((tx * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx; vertexViewF32[vertexOffset + 1] = ty; vertexViewF32[vertexOffset + 2] = uvs[index + 0]; @@ -42722,8 +42591,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; var cameraHeight = camera.height + 50; @@ -42738,10 +42606,10 @@ var TextureTintPipeline = new Class({ var scale = (bitmapText.fontSize / fontData.size); var chars = fontData.chars; var alpha = bitmapText.alpha; - var tint0 = getTint(bitmapText._tintTL, alpha); - var tint1 = getTint(bitmapText._tintTR, alpha); - var tint2 = getTint(bitmapText._tintBL, alpha); - var tint3 = getTint(bitmapText._tintBR, alpha); + var vTintTL = getTint(bitmapText._tintTL, alpha); + var vTintTR = getTint(bitmapText._tintTR, alpha); + var vTintBL = getTint(bitmapText._tintBL, alpha); + var vTintBR = getTint(bitmapText._tintBR, alpha); var srcX = bitmapText.x; var srcY = bitmapText.y; var textureX = frame.cutX; @@ -42762,6 +42630,16 @@ var TextureTintPipeline = new Class({ var y = 0; var xw = 0; var yh = 0; + + var tx0; + var ty0; + var tx1; + var ty1; + var tx2; + var ty2; + var tx3; + var ty3; + var umin = 0; var umax = 0; var vmin = 0; @@ -42830,7 +42708,7 @@ var TextureTintPipeline = new Class({ { var kerningOffset = glyph.kerning[lastCharCode]; x += (kerningOffset !== undefined) ? kerningOffset : 0; - } + } xAdvance += glyph.xAdvance; indexCount += 1; @@ -42843,6 +42721,9 @@ var TextureTintPipeline = new Class({ continue; } + x -= bitmapText.displayOriginX; + y -= bitmapText.displayOriginY; + xw = x + glyphW * scale; yh = y + glyphH * scale; tx0 = x * mva + y * mvc + mve; @@ -42874,48 +42755,36 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; vertexViewF32[vertexOffset + 3] = vmin; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = umin; vertexViewF32[vertexOffset + 8] = vmax; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = umax; vertexViewF32[vertexOffset + 13] = vmax; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = umin; vertexViewF32[vertexOffset + 18] = vmin; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = umax; vertexViewF32[vertexOffset + 23] = vmax; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = umax; vertexViewF32[vertexOffset + 28] = vmin; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; } @@ -42946,8 +42815,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; var textureSource = bitmapText.texture.source[frame.sourceIndex]; @@ -42960,10 +42828,10 @@ var TextureTintPipeline = new Class({ var scale = (bitmapText.fontSize / fontData.size); var chars = fontData.chars; var alpha = bitmapText.alpha; - var tint0 = getTint(bitmapText._tintTL, alpha); - var tint1 = getTint(bitmapText._tintTR, alpha); - var tint2 = getTint(bitmapText._tintBL, alpha); - var tint3 = getTint(bitmapText._tintBR, alpha); + var vTintTL = getTint(bitmapText._tintTL, alpha); + var vTintTR = getTint(bitmapText._tintTR, alpha); + var vTintBL = getTint(bitmapText._tintBL, alpha); + var vTintBR = getTint(bitmapText._tintBR, alpha); var srcX = bitmapText.x; var srcY = bitmapText.y; var textureX = frame.cutX; @@ -42983,6 +42851,14 @@ var TextureTintPipeline = new Class({ var x = 0; var y = 0; var xw = 0; + var tx0; + var ty0; + var tx1; + var ty1; + var tx2; + var ty2; + var tx3; + var ty3; var yh = 0; var umin = 0; var umax = 0; @@ -43024,12 +42900,12 @@ var TextureTintPipeline = new Class({ if (crop) { renderer.pushScissor( - bitmapText.x, - bitmapText.y, - bitmapText.cropWidth * bitmapText.scaleX, + bitmapText.x, + bitmapText.y, + bitmapText.cropWidth * bitmapText.scaleX, bitmapText.cropHeight * bitmapText.scaleY ); - } + } for (var index = 0; index < textLength; ++index) { @@ -43082,21 +42958,21 @@ var TextureTintPipeline = new Class({ if (displayCallback) { - var output = displayCallback({ - color: 0, - tint: { - topLeft: tint0, - topRight: tint1, - bottomLeft: tint2, - bottomRight: tint3 - }, - index: index, - charCode: charCode, - x: x, - y: y, - scale: scale, - rotation: 0, - data: glyph.data + var output = displayCallback({ + color: 0, + tint: { + topLeft: vTintTL, + topRight: vTintTR, + bottomLeft: vTintBL, + bottomRight: vTintBR + }, + index: index, + charCode: charCode, + x: x, + y: y, + scale: scale, + rotation: 0, + data: glyph.data }); x = output.x; @@ -43106,25 +42982,27 @@ var TextureTintPipeline = new Class({ if (output.color) { - tint0 = output.color; - tint1 = output.color; - tint2 = output.color; - tint3 = output.color; + vTintTL = output.color; + vTintTR = output.color; + vTintBL = output.color; + vTintBR = output.color; } else { - tint0 = output.tint.topLeft; - tint1 = output.tint.topRight; - tint2 = output.tint.bottomLeft; - tint3 = output.tint.bottomRight; + vTintTL = output.tint.topLeft; + vTintTR = output.tint.topRight; + vTintBL = output.tint.bottomLeft; + vTintBR = output.tint.bottomRight; } - tint0 = getTint(tint0, alpha); - tint1 = getTint(tint1, alpha); - tint2 = getTint(tint2, alpha); - tint3 = getTint(tint3, alpha); + vTintTL = getTint(vTintTL, alpha); + vTintTR = getTint(vTintTR, alpha); + vTintBL = getTint(vTintBL, alpha); + vTintBR = getTint(vTintBR, alpha); } + x -= bitmapText.displayOriginX; + y -= bitmapText.displayOriginY; x *= scale; y *= scale; x -= cameraScrollX; @@ -43169,48 +43047,36 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; vertexViewF32[vertexOffset + 3] = vmin; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = umin; vertexViewF32[vertexOffset + 8] = vmax; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = umax; vertexViewF32[vertexOffset + 13] = vmax; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = umin; vertexViewF32[vertexOffset + 18] = vmin; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = umax; vertexViewF32[vertexOffset + 23] = vmax; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = umax; vertexViewF32[vertexOffset + 28] = vmin; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; } @@ -43246,9 +43112,9 @@ var TextureTintPipeline = new Class({ text.scrollFactorX, text.scrollFactorY, text.displayOriginX, text.displayOriginY, 0, 0, text.canvasTexture.width, text.canvasTexture.height, - getTint(text._tintTL, text._alphaTL), - getTint(text._tintTR, text._alphaTR), - getTint(text._tintBL, text._alphaBL), + getTint(text._tintTL, text._alphaTL), + getTint(text._tintTR, text._alphaTR), + getTint(text._tintBL, text._alphaBL), getTint(text._tintBR, text._alphaBR), 0, 0, camera @@ -43308,7 +43174,7 @@ var TextureTintPipeline = new Class({ 0, 0, camera ); - } + } }, /** @@ -43327,7 +43193,7 @@ var TextureTintPipeline = new Class({ this.batchTexture( tileSprite, tileSprite.tileTexture, - tileSprite.frame.width, tileSprite.frame.height, + tileSprite.frame.width, tileSprite.frame.height, tileSprite.x, tileSprite.y, tileSprite.width, tileSprite.height, tileSprite.scaleX, tileSprite.scaleY, @@ -43336,11 +43202,11 @@ var TextureTintPipeline = new Class({ tileSprite.scrollFactorX, tileSprite.scrollFactorY, tileSprite.originX * tileSprite.width, tileSprite.originY * tileSprite.height, 0, 0, tileSprite.width, tileSprite.height, - getTint(tileSprite._tintTL, tileSprite._alphaTL), - getTint(tileSprite._tintTR, tileSprite._alphaTR), - getTint(tileSprite._tintBL, tileSprite._alphaBL), + getTint(tileSprite._tintTL, tileSprite._alphaTL), + getTint(tileSprite._tintTR, tileSprite._alphaTR), + getTint(tileSprite._tintBL, tileSprite._alphaBL), getTint(tileSprite._tintBR, tileSprite._alphaBR), - tileSprite.tilePositionX / tileSprite.frame.width, + tileSprite.tilePositionX / tileSprite.frame.width, tileSprite.tilePositionY / tileSprite.frame.height, camera ); @@ -43354,8 +43220,8 @@ var TextureTintPipeline = new Class({ * * @param {Phaser.GameObjects.GameObject} gameObject - [description] * @param {WebGLTexture} texture - [description] - * @param {int} textureWidth - [description] - * @param {int} textureHeight - [description] + * @param {integer} textureWidth - [description] + * @param {integer} textureHeight - [description] * @param {float} srcX - [description] * @param {float} srcY - [description] * @param {float} srcWidth - [description] @@ -43373,10 +43239,10 @@ var TextureTintPipeline = new Class({ * @param {float} frameY - [description] * @param {float} frameWidth - [description] * @param {float} frameHeight - [description] - * @param {int} tintTL - [description] - * @param {int} tintTR - [description] - * @param {int} tintBL - [description] - * @param {int} tintBR - [description] + * @param {integer} tintTL - [description] + * @param {integer} tintTR - [description] + * @param {integer} tintBL - [description] + * @param {integer} tintBR - [description] * @param {float} uOffset - [description] * @param {float} vOffset - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] @@ -43407,12 +43273,10 @@ var TextureTintPipeline = new Class({ flipY = flipY ^ (texture.isRenderTexture ? 1 : 0); rotation = -rotation; - var getTint = Utils.getTintAppendFloatAlpha; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); var height = srcHeight * (flipY ? -1.0 : 1.0); @@ -43460,18 +43324,6 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = u0; @@ -43515,7 +43367,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.GameObjects.Graphics} graphics - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchGraphics: function (graphics, camera) + batchGraphics: function () { // Stub } @@ -44299,11 +44151,12 @@ var GamepadManager = new Class({ * * @method Phaser.Input.Gamepad.GamepadManager#removePad * @since 3.0.0 + * @todo Code this feature * * @param {[type]} index - [description] * @param {[type]} pad - [description] */ - removePad: function (index, pad) + removePad: function () { // TODO }, @@ -44878,9 +44731,9 @@ var EventEmitter = __webpack_require__(13); var Key = __webpack_require__(243); var KeyCodes = __webpack_require__(128); var KeyCombo = __webpack_require__(244); -var KeyMap = __webpack_require__(522); -var ProcessKeyDown = __webpack_require__(523); -var ProcessKeyUp = __webpack_require__(524); +var KeyMap = __webpack_require__(524); +var ProcessKeyDown = __webpack_require__(525); +var ProcessKeyUp = __webpack_require__(526); /** * @classdesc @@ -45505,8 +45358,8 @@ module.exports = Key; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(519); -var ResetKeyCombo = __webpack_require__(521); +var ProcessKeyCombo = __webpack_require__(521); +var ResetKeyCombo = __webpack_require__(523); /** * @classdesc @@ -45774,7 +45627,7 @@ module.exports = KeyCombo; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(125); +var Features = __webpack_require__(124); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -46425,7 +46278,7 @@ var Pointer = new Class({ * @param {[type]} event - [description] * @param {[type]} time - [description] */ - touchmove: function (event, time) + touchmove: function (event) { this.event = event; @@ -46448,7 +46301,7 @@ var Pointer = new Class({ * @param {[type]} event - [description] * @param {[type]} time - [description] */ - move: function (event, time) + move: function (event) { if (event.buttons) { @@ -46982,7 +46835,7 @@ module.exports = TransformXY; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(84); +var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Scene = __webpack_require__(250); @@ -48224,9 +48077,9 @@ module.exports = UppercaseFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(84); +var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); -var InjectionMap = __webpack_require__(527); +var InjectionMap = __webpack_require__(529); /** * Takes a Scene configuration object and returns a fully formed Systems object. @@ -48314,6 +48167,7 @@ var WebAudioSoundManager = __webpack_require__(258); * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. * * @function Phaser.Sound.SoundManagerCreator + * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. @@ -48352,9 +48206,8 @@ module.exports = SoundManagerCreator; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSoundManager = __webpack_require__(85); +var BaseSoundManager = __webpack_require__(84); var HTML5AudioSound = __webpack_require__(255); /** @@ -48366,16 +48219,12 @@ var HTML5AudioSound = __webpack_require__(255); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. */ var HTML5AudioSoundManager = new Class({ - Extends: BaseSoundManager, - - initialize: - - function HTML5AudioSoundManager (game) + initialize: function HTML5AudioSoundManager (game) { /** * Flag indicating whether if there are no idle instances of HTML5 Audio tag, @@ -48431,7 +48280,6 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 */ this.onBlurPausedSounds = []; - this.locked = 'ontouchstart' in window; /** @@ -48470,7 +48318,6 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 */ this._volume = 1; - BaseSoundManager.call(this, game); }, @@ -48479,10 +48326,10 @@ var HTML5AudioSoundManager = new Class({ * * @method Phaser.Sound.HTML5AudioSoundManager#add * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * * @return {Phaser.Sound.HTML5AudioSound} The new sound instance. */ add: function (key, config) @@ -48621,11 +48468,11 @@ var HTML5AudioSoundManager = new Class({ * @method Phaser.Sound.HTML5AudioSoundManager#isLocked * @protected * @since 3.0.0 - * + * * @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action. * @param {string} prop - Name of the method to be called or property to be assigned a value to. * @param {*} [value] - An optional parameter that either holds an array of arguments to be passed to the method call or value to be set to the property. - * + * * @return {boolean} Whether the sound manager is locked. */ isLocked: function (sound, prop, value) @@ -48642,21 +48489,11 @@ var HTML5AudioSoundManager = new Class({ return false; } }); - -/** - * Global mute setting. - * - * @name Phaser.Sound.HTML5AudioSoundManager#mute - * @type {boolean} - * @since 3.0.0 - */ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { - get: function () { return this._mute; }, - set: function (value) { this._mute = value; @@ -48672,23 +48509,12 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Global volume setting. - * - * @name Phaser.Sound.HTML5AudioSoundManager#volume - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(HTML5AudioSoundManager.prototype, 'volume', { - get: function () { return this._volume; }, - set: function (value) { this._volume = value; @@ -48704,9 +48530,7 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - module.exports = HTML5AudioSoundManager; @@ -48719,9 +48543,8 @@ module.exports = HTML5AudioSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSound = __webpack_require__(86); +var BaseSound = __webpack_require__(85); /** * @classdesc @@ -48733,18 +48556,14 @@ var BaseSound = __webpack_require__(86); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var HTML5AudioSound = new Class({ - Extends: BaseSound, - - initialize: - - function HTML5AudioSound (manager, key, config) + initialize: function HTML5AudioSound (manager, key, config) { if (config === void 0) { config = {}; } @@ -48759,9 +48578,9 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 */ this.tags = manager.game.cache.audio.get(key); - if (!this.tags) { + // eslint-disable-next-line no-console console.error('No audio loaded in cache with key: \'' + key + '\'!'); return; } @@ -48801,11 +48620,8 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 */ this.previousTime = 0; - this.duration = this.tags[0].duration; - this.totalDuration = this.tags[0].duration; - BaseSound.call(this, manager, key, config); }, @@ -48816,10 +48632,10 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#play * @since 3.0.0 - * + * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. - * + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) @@ -48828,7 +48644,6 @@ var HTML5AudioSound = new Class({ { return false; } - if (!BaseSound.prototype.play.call(this, markerName, config)) { return false; @@ -48845,7 +48660,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('play', this); - return true; }, @@ -48854,7 +48668,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -48863,12 +48677,10 @@ var HTML5AudioSound = new Class({ { return false; } - if (this.startTime > 0) { return false; } - if (!BaseSound.prototype.pause.call(this)) { return false; @@ -48884,7 +48696,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('pause', this); - return true; }, @@ -48893,7 +48704,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -48902,12 +48713,10 @@ var HTML5AudioSound = new Class({ { return false; } - if (this.startTime > 0) { return false; } - if (!BaseSound.prototype.resume.call(this)) { return false; @@ -48924,7 +48733,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('resume', this); - return true; }, @@ -48933,7 +48741,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -48942,7 +48750,6 @@ var HTML5AudioSound = new Class({ { return false; } - if (!BaseSound.prototype.stop.call(this)) { return false; @@ -48956,7 +48763,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('stop', this); - return true; }, @@ -48966,7 +48772,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag * @private * @since 3.0.0 - * + * * @return {boolean} Whether the sound was assigned an audio tag successfully. */ pickAndPlayAudioTag: function () @@ -48976,18 +48782,15 @@ var HTML5AudioSound = new Class({ this.reset(); return false; } - var seek = this.currentConfig.seek; var delay = this.currentConfig.delay; var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek; this.previousTime = offset; this.audio.currentTime = offset; this.applyConfig(); - if (delay === 0) { this.startTime = 0; - if (this.audio.paused) { this.playCatchPromise(); @@ -48996,15 +48799,12 @@ var HTML5AudioSound = new Class({ else { this.startTime = window.performance.now() + delay * 1000; - if (!this.audio.paused) { this.audio.pause(); } } - this.resetConfig(); - return true; }, @@ -49018,7 +48818,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#pickAudioTag * @private * @since 3.0.0 - * + * * @return {boolean} Whether the sound was assigned an audio tag successfully. */ pickAudioTag: function () @@ -49030,7 +48830,6 @@ var HTML5AudioSound = new Class({ for (var i = 0; i < this.tags.length; i++) { var audio = this.tags[i]; - if (audio.dataset.used === 'false') { audio.dataset.used = 'true'; @@ -49038,14 +48837,11 @@ var HTML5AudioSound = new Class({ return true; } } - if (!this.manager.override) { return false; } - var otherSounds = []; - this.manager.forEachActiveSound(function (sound) { if (sound.key === this.key && sound.audio) @@ -49053,7 +48849,6 @@ var HTML5AudioSound = new Class({ otherSounds.push(sound); } }, this); - otherSounds.sort(function (a1, a2) { if (a1.loop === a2.loop) @@ -49063,15 +48858,12 @@ var HTML5AudioSound = new Class({ } return a1.loop ? 1 : -1; }); - var selectedSound = otherSounds[0]; - this.audio = selectedSound.audio; selectedSound.reset(); selectedSound.audio = null; selectedSound.startTime = 0; selectedSound.previousTime = 0; - return true; }, @@ -49086,9 +48878,9 @@ var HTML5AudioSound = new Class({ playCatchPromise: function () { var playPromise = this.audio.play(); - if (playPromise) { + // eslint-disable-next-line no-unused-vars playPromise.catch(function (reason) { }); } }, @@ -49161,10 +48953,11 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ + // eslint-disable-next-line no-unused-vars update: function (time, delta) { if (!this.isPlaying) @@ -49288,20 +49081,11 @@ var HTML5AudioSound = new Class({ } } }); - -/** - * Mute setting. - * - * @name Phaser.Sound.HTML5AudioSound#mute - * @type {boolean} - */ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { - get: function () { return this.currentConfig.mute; }, - set: function (value) { this.currentConfig.mute = value; @@ -49318,22 +49102,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Volume setting. - * - * @name Phaser.Sound.HTML5AudioSound#volume - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { - get: function () { return this.currentConfig.volume; }, - set: function (value) { this.currentConfig.volume = value; @@ -49350,22 +49124,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - -/** - * Playback rate. - * - * @name Phaser.Sound.HTML5AudioSound#rate - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'rate', { - get: function () { return Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').get.call(this); }, - set: function (value) { this.currentConfig.rate = value; @@ -49375,22 +49139,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'rate', { } Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').set.call(this, value); } - }); - -/** - * Detuning of sound. - * - * @name Phaser.Sound.HTML5AudioSound#detune - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { - get: function () { return Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').get.call(this); }, - set: function (value) { this.currentConfig.detune = value; @@ -49400,17 +49154,8 @@ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { } Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').set.call(this, value); } - }); - -/** - * Current position of playing sound. - * - * @name Phaser.Sound.HTML5AudioSound#seek - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { - get: function () { if (this.isPlaying) @@ -49427,7 +49172,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { return 0; } }, - set: function (value) { if (this.manager.isLocked(this, 'seek', value)) @@ -49460,21 +49204,11 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { } } }); - -/** - * Property indicating whether or not - * the sound or current sound marker will loop. - * - * @name Phaser.Sound.HTML5AudioSound#loop - * @type {boolean} - */ Object.defineProperty(HTML5AudioSound.prototype, 'loop', { - get: function () { return this.currentConfig.loop; }, - set: function (value) { this.currentConfig.loop = value; @@ -49494,9 +49228,7 @@ Object.defineProperty(HTML5AudioSound.prototype, 'loop', { */ this.emit('loop', this, value); } - }); - module.exports = HTML5AudioSound; @@ -49509,8 +49241,7 @@ module.exports = HTML5AudioSound; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - -var BaseSoundManager = __webpack_require__(85); +var BaseSoundManager = __webpack_require__(84); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var NoAudioSound = __webpack_require__(257); @@ -49526,7 +49257,7 @@ var NOOP = __webpack_require__(3); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSoundManager - * @extends EventEmitter + * @extends Phaser.Sound.BaseSoundManager * @memberOf Phaser.Sound * @constructor * @author Pavle Goloskokovic (http://prunegames.com) @@ -49535,224 +49266,62 @@ var NOOP = __webpack_require__(3); * @param {Phaser.Game} game - Reference to the current game instance. */ var NoAudioSoundManager = new Class({ - Extends: EventEmitter, - - initialize: - - function NoAudioSoundManager (game) + initialize: function NoAudioSoundManager (game) { EventEmitter.call(this); - - /** - * Reference to the current game instance. - * - * @name Phaser.Sound.NoAudioSoundManager#game - * @type {Phaser.Game} - * @since 3.0.0 - */ this.game = game; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#sounds - * @type {array} - * @default [] - * @since 3.0.0 - */ this.sounds = []; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#mute - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.mute = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#volume - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.volume = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.rate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.detune = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#pauseOnBlur - * @type {boolean} - * @default true - * @since 3.0.0 - */ this.pauseOnBlur = true; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#locked - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.locked = false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#add - * @since 3.0.0 - * - * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {ISound} The new sound instance. - */ add: function (key, config) { var sound = new NoAudioSound(this, key, config); - this.sounds.push(sound); - return sound; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#addAudioSprite - * @since 3.0.0 - * - * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {IAudioSpriteSound} The new audio sprite sound instance. - */ addAudioSprite: function (key, config) { var sound = this.add(key, config); sound.spritemap = {}; return sound; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#play - * @since 3.0.0 - * - * @return {boolean} No Audio methods always return `false`. - */ - play: function () + // eslint-disable-next-line no-unused-vars + play: function (key, extra) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#playAudioSprite - * @since 3.0.0 - * - * @return {boolean} No Audio methods always return `false`. - */ - playAudioSprite: function () + // eslint-disable-next-line no-unused-vars + playAudioSprite: function (key, spriteName, config) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#remove - * @since 3.0.0 - * - * @param {ISound} sound - The sound object to remove. - * - * @return {boolean} True if the sound was removed successfully, otherwise false. - */ remove: function (sound) { return BaseSoundManager.prototype.remove.call(this, sound); }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#removeByKey - * @since 3.0.0 - * - * @param {string} key - The key to match when removing sound objects. - * - * @return {number} The number of matching sound objects that were removed. - */ removeByKey: function (key) { return BaseSoundManager.prototype.removeByKey.call(this, key); }, - pauseAll: NOOP, - resumeAll: NOOP, - stopAll: NOOP, - update: NOOP, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#destroy - * @since 3.0.0 - */ destroy: function () { BaseSoundManager.prototype.destroy.call(this); }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#forEachActiveSound - * @since 3.0.0 - * - * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param [scope] - Callback context. - */ forEachActiveSound: function (callbackfn, scope) { BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope); } - }); - module.exports = NoAudioSoundManager; @@ -49765,8 +49334,7 @@ module.exports = NoAudioSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - -var BaseSound = __webpack_require__(86); +var BaseSound = __webpack_require__(85); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var Extend = __webpack_require__(23); @@ -49781,103 +49349,29 @@ var Extend = __webpack_require__(23); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSound - * @extends EventEmitter + * @extends Phaser.Sound.BaseSound * @memberOf Phaser.Sound * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var NoAudioSound = new Class({ - Extends: EventEmitter, - - initialize: - - function NoAudioSound (manager, key, config) + initialize: function NoAudioSound (manager, key, config) { if (config === void 0) { config = {}; } - EventEmitter.call(this); - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#manager - * @type {Phaser.Sound.NoAudioSoundManager} - * @since 3.0.0 - */ this.manager = manager; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#key - * @type {string} - * @since 3.0.0 - */ this.key = key; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.isPlaying = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#isPaused - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.isPaused = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#totalRate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.totalRate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.duration = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#totalDuration - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.totalDuration = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#config - * @type {object} - * @since 3.0.0 - */ this.config = Extend({ mute: false, volume: 1, @@ -49887,213 +49381,55 @@ var NoAudioSound = new Class({ loop: false, delay: 0 }, config); - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#currentConfig - * @type {[type]} - * @since 3.0.0 - */ this.currentConfig = this.config; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#mute - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.mute = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#volume - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.volume = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.rate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.detune = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#seek - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.seek = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#loop - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.loop = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#markers - * @type {object} - * @default {} - * @since 3.0.0 - */ this.markers = {}; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#currentMarker - * @type {?[type]} - * @default null - * @since 3.0.0 - */ this.currentMarker = null; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#pendingRemove - * @type {boolean} - * @default null - * @since 3.0.0 - */ this.pendingRemove = false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#addMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - addMarker: function () + // eslint-disable-next-line no-unused-vars + addMarker: function (marker) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#updateMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - updateMarker: function () + // eslint-disable-next-line no-unused-vars + updateMarker: function (marker) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#removeMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - removeMarker: function () + // eslint-disable-next-line no-unused-vars + removeMarker: function (markerName) { return null; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#play - * @since 3.0.0 - * - * @return {boolean} False - */ - play: function () + // eslint-disable-next-line no-unused-vars + play: function (markerName, config) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#pause - * @since 3.0.0 - * - * @return {boolean} False - */ pause: function () { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#resume - * @since 3.0.0 - * - * @return {boolean} False - */ resume: function () { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#stop - * @since 3.0.0 - * - * @return {boolean} False - */ stop: function () { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#destroy - * @since 3.0.0 - */ destroy: function () { this.manager.remove(this); - BaseSound.prototype.destroy.call(this); } - }); - module.exports = NoAudioSound; @@ -50106,9 +49442,8 @@ module.exports = NoAudioSound; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSoundManager = __webpack_require__(85); +var BaseSoundManager = __webpack_require__(84); var WebAudioSound = __webpack_require__(259); /** @@ -50121,22 +49456,19 @@ var WebAudioSound = __webpack_require__(259); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. */ var WebAudioSoundManager = new Class({ - Extends: BaseSoundManager, - - initialize: - - function WebAudioSoundManager (game) + initialize: function WebAudioSoundManager (game) { /** * The AudioContext being used for playback. * * @name Phaser.Sound.WebAudioSoundManager#context * @type {AudioContext} + * @private * @since 3.0.0 */ this.context = this.createAudioContext(game); @@ -50146,6 +49478,7 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#masterMuteNode * @type {GainNode} + * @private * @since 3.0.0 */ this.masterMuteNode = this.context.createGain(); @@ -50155,12 +49488,11 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#masterVolumeNode * @type {GainNode} + * @private * @since 3.0.0 */ this.masterVolumeNode = this.context.createGain(); - this.masterMuteNode.connect(this.masterVolumeNode); - this.masterVolumeNode.connect(this.context.destination); /** @@ -50168,19 +49500,11 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#destination * @type {AudioNode} + * @private * @since 3.0.0 */ this.destination = this.masterMuteNode; - - /** - * Is the Sound Manager touch locked? - * - * @name Phaser.Sound.WebAudioSoundManager#locked - * @type {boolean} - * @since 3.0.0 - */ this.locked = this.context.state === 'suspended' && 'ontouchstart' in window; - BaseSoundManager.call(this, game); }, @@ -50194,21 +49518,19 @@ var WebAudioSoundManager = new Class({ * @method Phaser.Sound.WebAudioSoundManager#createAudioContext * @private * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. - * + * * @return {AudioContext} The AudioContext instance to be used for playback. */ createAudioContext: function (game) { var audioConfig = game.config.audio; - if (audioConfig && audioConfig.context) { audioConfig.context.resume(); return audioConfig.context; } - return new AudioContext(); }, @@ -50217,18 +49539,16 @@ var WebAudioSoundManager = new Class({ * * @method Phaser.Sound.WebAudioSoundManager#add * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * * @return {Phaser.Sound.WebAudioSound} The new sound instance. */ add: function (key, config) { var sound = new WebAudioSound(this, key, config); - this.sounds.push(sound); - return sound; }, @@ -50244,7 +49564,6 @@ var WebAudioSoundManager = new Class({ unlock: function () { var _this = this; - var unlock = function () { _this.context.resume().then(function () @@ -50254,7 +49573,6 @@ var WebAudioSoundManager = new Class({ _this.unlocked = true; }); }; - document.body.addEventListener('touchstart', unlock, false); document.body.addEventListener('touchend', unlock, false); }, @@ -50294,30 +49612,28 @@ var WebAudioSoundManager = new Class({ */ destroy: function () { - BaseSoundManager.prototype.destroy.call(this); this.destination = null; this.masterVolumeNode.disconnect(); this.masterVolumeNode = null; this.masterMuteNode.disconnect(); this.masterMuteNode = null; - this.context.suspend(); + if (this.game.config.audio && this.game.config.audio.context) + { + this.context.suspend(); + } + else + { + this.context.close(); + } this.context = null; + BaseSoundManager.prototype.destroy.call(this); } }); - -/** - * Global mute setting. - * - * @name Phaser.Sound.WebAudioSoundManager#mute - * @type {boolean} - */ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { - get: function () { return this.masterMuteNode.gain.value === 0; }, - set: function (value) { this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0); @@ -50329,22 +49645,12 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Global volume setting. - * - * @name Phaser.Sound.WebAudioSoundManager#volume - * @type {number} - */ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { - get: function () { return this.masterVolumeNode.gain.value; }, - set: function (value) { this.masterVolumeNode.gain.setValueAtTime(value, 0); @@ -50356,9 +49662,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - module.exports = WebAudioSoundManager; @@ -50371,9 +49675,8 @@ module.exports = WebAudioSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSound = __webpack_require__(86); +var BaseSound = __webpack_require__(85); /** * @classdesc @@ -50388,15 +49691,11 @@ var BaseSound = __webpack_require__(86); * * @param {Phaser.Sound.WebAudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var WebAudioSound = new Class({ - Extends: BaseSound, - - initialize: - - function WebAudioSound (manager, key, config) + initialize: function WebAudioSound (manager, key, config) { if (config === void 0) { config = {}; } @@ -50409,9 +49708,9 @@ var WebAudioSound = new Class({ * @since 3.0.0 */ this.audioBuffer = manager.game.cache.audio.get(key); - if (!this.audioBuffer) { + // eslint-disable-next-line no-console console.error('No audio loaded in cache with key: \'' + key + '\'!'); return; } @@ -50422,6 +49721,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#source * @type {AudioBufferSourceNode} + * @private * @default null * @since 3.0.0 */ @@ -50432,6 +49732,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#loopSource * @type {AudioBufferSourceNode} + * @private * @default null * @since 3.0.0 */ @@ -50442,6 +49743,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#muteNode * @type {GainNode} + * @private * @since 3.0.0 */ this.muteNode = manager.context.createGain(); @@ -50451,6 +49753,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#volumeNode * @type {GainNode} + * @private * @since 3.0.0 */ this.volumeNode = manager.context.createGain(); @@ -50461,6 +49764,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#playTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ @@ -50472,6 +49776,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#startTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ @@ -50483,6 +49788,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#loopTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ @@ -50495,6 +49801,7 @@ var WebAudioSound = new Class({ * @name Phaser.Sound.WebAudioSound#rateUpdates * @type {array} * @private + * @default [] * @since 3.0.0 */ this.rateUpdates = []; @@ -50505,6 +49812,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#hasEnded * @type {boolean} + * @private * @default false * @since 3.0.0 */ @@ -50516,33 +49824,15 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#hasLooped * @type {boolean} + * @private * @default false * @since 3.0.0 */ this.hasLooped = false; - this.muteNode.connect(this.volumeNode); - this.volumeNode.connect(manager.destination); - - /** - * [description] - * - * @name Phaser.Sound.WebAudioSound#duration - * @type {number} - * @since 3.0.0 - */ this.duration = this.audioBuffer.duration; - - /** - * [description] - * - * @name Phaser.Sound.WebAudioSound#totalDuration - * @type {number} - * @since 3.0.0 - */ this.totalDuration = this.audioBuffer.duration; - BaseSound.call(this, manager, key, config); }, @@ -50553,10 +49843,10 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#play * @since 3.0.0 - * + * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. - * + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) @@ -50575,7 +49865,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('play', this); - return true; }, @@ -50584,7 +49873,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -50593,7 +49882,6 @@ var WebAudioSound = new Class({ { return false; } - if (!BaseSound.prototype.pause.call(this)) { return false; @@ -50608,7 +49896,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('pause', this); - return true; }, @@ -50617,7 +49904,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -50626,7 +49913,6 @@ var WebAudioSound = new Class({ { return false; } - if (!BaseSound.prototype.resume.call(this)) { return false; @@ -50640,7 +49926,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('resume', this); - return true; }, @@ -50649,7 +49934,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -50667,7 +49952,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('stop', this); - return true; }, @@ -50717,17 +50001,15 @@ var WebAudioSound = new Class({ * @method Phaser.Sound.WebAudioSound#createBufferSource * @private * @since 3.0.0 - * + * * @return {AudioBufferSourceNode} */ createBufferSource: function () { var _this = this; - var source = this.manager.context.createBufferSource(); source.buffer = this.audioBuffer; source.connect(this.muteNode); - source.onended = function (ev) { if (ev.target === _this.source) @@ -50745,7 +50027,6 @@ var WebAudioSound = new Class({ // else was stopped }; - return source; }, @@ -50764,7 +50045,6 @@ var WebAudioSound = new Class({ this.source.disconnect(); this.source = null; } - this.playTime = 0; this.startTime = 0; this.stopAndRemoveLoopBufferSource(); @@ -50785,7 +50065,6 @@ var WebAudioSound = new Class({ this.loopSource.disconnect(); this.loopSource = null; } - this.loopTime = 0; }, @@ -50812,10 +50091,11 @@ var WebAudioSound = new Class({ * @method Phaser.Sound.WebAudioSound#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ + // eslint-disable-next-line no-unused-vars update: function (time, delta) { if (this.hasEnded) @@ -50947,20 +50227,11 @@ var WebAudioSound = new Class({ + (this.duration - lastRateUpdateCurrentTime) / lastRateUpdate.rate; } }); - -/** - * Mute setting. - * - * @name Phaser.Sound.WebAudioSound#mute - * @type {boolean} - */ Object.defineProperty(WebAudioSound.prototype, 'mute', { - get: function () { return this.muteNode.gain.value === 0; }, - set: function (value) { this.currentConfig.mute = value; @@ -50973,22 +50244,12 @@ Object.defineProperty(WebAudioSound.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Volume setting. - * - * @name Phaser.Sound.WebAudioSound#volume - * @type {number} - */ Object.defineProperty(WebAudioSound.prototype, 'volume', { - get: function () { return this.volumeNode.gain.value; }, - set: function (value) { this.currentConfig.volume = value; @@ -51001,17 +50262,8 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - -/** - * Current position of playing sound. - * - * @name Phaser.Sound.WebAudioSound#seek - * @type {number} - */ Object.defineProperty(WebAudioSound.prototype, 'seek', { - get: function () { if (this.isPlaying) @@ -51031,7 +50283,6 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { return 0; } }, - set: function (value) { if (this.manager.context.currentTime < this.startTime) @@ -51056,23 +50307,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { this.emit('seek', this, value); } } - }); - -/** - * Property indicating whether or not - * the sound or current sound marker will loop. - * - * @name Phaser.Sound.WebAudioSound#loop - * @type {boolean} - */ Object.defineProperty(WebAudioSound.prototype, 'loop', { - get: function () { return this.currentConfig.loop; }, - set: function (value) { this.currentConfig.loop = value; @@ -51092,9 +50332,7 @@ Object.defineProperty(WebAudioSound.prototype, 'loop', { */ this.emit('loop', this, value); } - }); - module.exports = WebAudioSound; @@ -51110,7 +50348,7 @@ module.exports = WebAudioSound; var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); var EventEmitter = __webpack_require__(13); var GenerateTexture = __webpack_require__(211); var GetValue = __webpack_require__(4); @@ -51792,8 +51030,8 @@ var TextureManager = new Class({ // if (textureFrame.trimmed) // { - // x -= this.sprite.texture.trim.x; - // y -= this.sprite.texture.trim.y; + // x -= this.sprite.texture.trim.x; + // y -= this.sprite.texture.trim.y; // } var context = this._tempContext; @@ -51900,15 +51138,15 @@ module.exports = TextureManager; module.exports = { - Canvas: __webpack_require__(528), - Image: __webpack_require__(529), - JSONArray: __webpack_require__(530), - JSONHash: __webpack_require__(531), - Pyxel: __webpack_require__(532), - SpriteSheet: __webpack_require__(533), - SpriteSheetFromAtlas: __webpack_require__(534), - StarlingXML: __webpack_require__(535), - UnityYAML: __webpack_require__(536) + Canvas: __webpack_require__(530), + Image: __webpack_require__(531), + JSONArray: __webpack_require__(532), + JSONHash: __webpack_require__(533), + Pyxel: __webpack_require__(534), + SpriteSheet: __webpack_require__(535), + SpriteSheetFromAtlas: __webpack_require__(536), + StarlingXML: __webpack_require__(537), + UnityYAML: __webpack_require__(538) }; @@ -52358,7 +51596,7 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(126); +var IsSizePowerOfTwo = __webpack_require__(125); var ScaleModes = __webpack_require__(62); /** @@ -52838,10 +52076,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) var letters = xml.getElementsByTagName('char'); - var x = 0; - var y = 0; - var cx = 0; - var cy = 0; var adjustForTrim = (frame !== undefined && frame.trimmed); if (adjustForTrim) @@ -52850,8 +52084,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) var left = frame.width; } - var diff = 0; - for (var i = 0; i < letters.length; i++) { var node = letters[i]; @@ -52866,18 +52098,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) if (adjustForTrim) { - // if (gx + gw > frame.width) - // { - // diff = frame.width - (gx + gw); - // gw -= diff; - // } - - // if (gy + gh > frame.height) - // { - // diff = frame.height - (gy + gh); - // gh -= diff; - // } - if (gx < left) { left = gx; @@ -52952,21 +52172,21 @@ module.exports = ParseXMLBitmapFont; var Ellipse = __webpack_require__(135); -Ellipse.Area = __webpack_require__(554); +Ellipse.Area = __webpack_require__(556); Ellipse.Circumference = __webpack_require__(270); Ellipse.CircumferencePoint = __webpack_require__(136); -Ellipse.Clone = __webpack_require__(555); +Ellipse.Clone = __webpack_require__(557); Ellipse.Contains = __webpack_require__(68); -Ellipse.ContainsPoint = __webpack_require__(556); -Ellipse.ContainsRect = __webpack_require__(557); -Ellipse.CopyFrom = __webpack_require__(558); -Ellipse.Equals = __webpack_require__(559); -Ellipse.GetBounds = __webpack_require__(560); +Ellipse.ContainsPoint = __webpack_require__(558); +Ellipse.ContainsRect = __webpack_require__(559); +Ellipse.CopyFrom = __webpack_require__(560); +Ellipse.Equals = __webpack_require__(561); +Ellipse.GetBounds = __webpack_require__(562); Ellipse.GetPoint = __webpack_require__(268); Ellipse.GetPoints = __webpack_require__(269); -Ellipse.Offset = __webpack_require__(561); -Ellipse.OffsetPoint = __webpack_require__(562); -Ellipse.Random = __webpack_require__(110); +Ellipse.Offset = __webpack_require__(563); +Ellipse.OffsetPoint = __webpack_require__(564); +Ellipse.Random = __webpack_require__(109); module.exports = Ellipse; @@ -53351,7 +52571,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c break; default: - console.error('Phaser: Invalid Graphics Command ID ' + commandID); + // console.error('Phaser: Invalid Graphics Command ID ' + commandID); break; } } @@ -53545,9 +52765,9 @@ module.exports = FloatBetween; module.exports = { - In: __webpack_require__(574), - Out: __webpack_require__(575), - InOut: __webpack_require__(576) + In: __webpack_require__(576), + Out: __webpack_require__(577), + InOut: __webpack_require__(578) }; @@ -53566,9 +52786,9 @@ module.exports = { module.exports = { - In: __webpack_require__(577), - Out: __webpack_require__(578), - InOut: __webpack_require__(579) + In: __webpack_require__(579), + Out: __webpack_require__(580), + InOut: __webpack_require__(581) }; @@ -53587,9 +52807,9 @@ module.exports = { module.exports = { - In: __webpack_require__(580), - Out: __webpack_require__(581), - InOut: __webpack_require__(582) + In: __webpack_require__(582), + Out: __webpack_require__(583), + InOut: __webpack_require__(584) }; @@ -53608,9 +52828,9 @@ module.exports = { module.exports = { - In: __webpack_require__(583), - Out: __webpack_require__(584), - InOut: __webpack_require__(585) + In: __webpack_require__(585), + Out: __webpack_require__(586), + InOut: __webpack_require__(587) }; @@ -53629,9 +52849,9 @@ module.exports = { module.exports = { - In: __webpack_require__(586), - Out: __webpack_require__(587), - InOut: __webpack_require__(588) + In: __webpack_require__(588), + Out: __webpack_require__(589), + InOut: __webpack_require__(590) }; @@ -53650,9 +52870,9 @@ module.exports = { module.exports = { - In: __webpack_require__(589), - Out: __webpack_require__(590), - InOut: __webpack_require__(591) + In: __webpack_require__(591), + Out: __webpack_require__(592), + InOut: __webpack_require__(593) }; @@ -53669,7 +52889,7 @@ module.exports = { // Phaser.Math.Easing.Linear -module.exports = __webpack_require__(592); +module.exports = __webpack_require__(594); /***/ }), @@ -53686,9 +52906,9 @@ module.exports = __webpack_require__(592); module.exports = { - In: __webpack_require__(593), - Out: __webpack_require__(594), - InOut: __webpack_require__(595) + In: __webpack_require__(595), + Out: __webpack_require__(596), + InOut: __webpack_require__(597) }; @@ -53707,9 +52927,9 @@ module.exports = { module.exports = { - In: __webpack_require__(596), - Out: __webpack_require__(597), - InOut: __webpack_require__(598) + In: __webpack_require__(598), + Out: __webpack_require__(599), + InOut: __webpack_require__(600) }; @@ -53728,9 +52948,9 @@ module.exports = { module.exports = { - In: __webpack_require__(599), - Out: __webpack_require__(600), - InOut: __webpack_require__(601) + In: __webpack_require__(601), + Out: __webpack_require__(602), + InOut: __webpack_require__(603) }; @@ -53749,9 +52969,9 @@ module.exports = { module.exports = { - In: __webpack_require__(602), - Out: __webpack_require__(603), - InOut: __webpack_require__(604) + In: __webpack_require__(604), + Out: __webpack_require__(605), + InOut: __webpack_require__(606) }; @@ -53768,7 +52988,7 @@ module.exports = { // Phaser.Math.Easing.Stepped -module.exports = __webpack_require__(605); +module.exports = __webpack_require__(607); /***/ }), @@ -53819,11 +53039,11 @@ module.exports = HasAny; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); var GetBoolean = __webpack_require__(73); var GetValue = __webpack_require__(4); -var Sprite = __webpack_require__(38); -var TWEEN_CONST = __webpack_require__(88); +var Sprite = __webpack_require__(37); +var TWEEN_CONST = __webpack_require__(87); var Vector2 = __webpack_require__(6); /** @@ -54361,7 +53581,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(34); +var Utils = __webpack_require__(42); /** * @classdesc @@ -54617,7 +53837,7 @@ module.exports = Light; var Class = __webpack_require__(0); var Light = __webpack_require__(290); var LightPipeline = __webpack_require__(235); -var Utils = __webpack_require__(34); +var Utils = __webpack_require__(42); /** * @classdesc @@ -54950,14 +54170,14 @@ module.exports = LightsManager; module.exports = { - Circle: __webpack_require__(653), + Circle: __webpack_require__(655), Ellipse: __webpack_require__(267), Intersects: __webpack_require__(293), - Line: __webpack_require__(673), - Point: __webpack_require__(691), - Polygon: __webpack_require__(705), + Line: __webpack_require__(675), + Point: __webpack_require__(693), + Polygon: __webpack_require__(707), Rectangle: __webpack_require__(305), - Triangle: __webpack_require__(734) + Triangle: __webpack_require__(736) }; @@ -54978,20 +54198,20 @@ module.exports = { module.exports = { - CircleToCircle: __webpack_require__(663), - CircleToRectangle: __webpack_require__(664), - GetRectangleIntersection: __webpack_require__(665), + CircleToCircle: __webpack_require__(665), + CircleToRectangle: __webpack_require__(666), + GetRectangleIntersection: __webpack_require__(667), LineToCircle: __webpack_require__(295), - LineToLine: __webpack_require__(90), - LineToRectangle: __webpack_require__(666), + LineToLine: __webpack_require__(89), + LineToRectangle: __webpack_require__(668), PointToLine: __webpack_require__(296), - PointToLineSegment: __webpack_require__(667), + PointToLineSegment: __webpack_require__(669), RectangleToRectangle: __webpack_require__(294), - RectangleToTriangle: __webpack_require__(668), - RectangleToValues: __webpack_require__(669), - TriangleToCircle: __webpack_require__(670), - TriangleToLine: __webpack_require__(671), - TriangleToTriangle: __webpack_require__(672) + RectangleToTriangle: __webpack_require__(670), + RectangleToValues: __webpack_require__(671), + TriangleToCircle: __webpack_require__(672), + TriangleToLine: __webpack_require__(673), + TriangleToTriangle: __webpack_require__(674) }; @@ -55227,8 +54447,8 @@ module.exports = Decompose; var Class = __webpack_require__(0); var GetPoint = __webpack_require__(300); -var GetPoints = __webpack_require__(109); -var Random = __webpack_require__(111); +var GetPoints = __webpack_require__(108); +var Random = __webpack_require__(110); /** * @classdesc @@ -55563,7 +54783,7 @@ module.exports = GetPoint; */ var MATH_CONST = __webpack_require__(16); -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); var Angle = __webpack_require__(54); /** @@ -55839,40 +55059,40 @@ module.exports = Polygon; var Rectangle = __webpack_require__(8); -Rectangle.Area = __webpack_require__(710); -Rectangle.Ceil = __webpack_require__(711); -Rectangle.CeilAll = __webpack_require__(712); +Rectangle.Area = __webpack_require__(712); +Rectangle.Ceil = __webpack_require__(713); +Rectangle.CeilAll = __webpack_require__(714); Rectangle.CenterOn = __webpack_require__(306); -Rectangle.Clone = __webpack_require__(713); +Rectangle.Clone = __webpack_require__(715); Rectangle.Contains = __webpack_require__(33); -Rectangle.ContainsPoint = __webpack_require__(714); -Rectangle.ContainsRect = __webpack_require__(715); -Rectangle.CopyFrom = __webpack_require__(716); +Rectangle.ContainsPoint = __webpack_require__(716); +Rectangle.ContainsRect = __webpack_require__(717); +Rectangle.CopyFrom = __webpack_require__(718); Rectangle.Decompose = __webpack_require__(297); -Rectangle.Equals = __webpack_require__(717); -Rectangle.FitInside = __webpack_require__(718); -Rectangle.FitOutside = __webpack_require__(719); -Rectangle.Floor = __webpack_require__(720); -Rectangle.FloorAll = __webpack_require__(721); -Rectangle.FromPoints = __webpack_require__(122); +Rectangle.Equals = __webpack_require__(719); +Rectangle.FitInside = __webpack_require__(720); +Rectangle.FitOutside = __webpack_require__(721); +Rectangle.Floor = __webpack_require__(722); +Rectangle.FloorAll = __webpack_require__(723); +Rectangle.FromPoints = __webpack_require__(121); Rectangle.GetAspectRatio = __webpack_require__(145); -Rectangle.GetCenter = __webpack_require__(722); -Rectangle.GetPoint = __webpack_require__(107); +Rectangle.GetCenter = __webpack_require__(724); +Rectangle.GetPoint = __webpack_require__(106); Rectangle.GetPoints = __webpack_require__(182); -Rectangle.GetSize = __webpack_require__(723); -Rectangle.Inflate = __webpack_require__(724); +Rectangle.GetSize = __webpack_require__(725); +Rectangle.Inflate = __webpack_require__(726); Rectangle.MarchingAnts = __webpack_require__(186); -Rectangle.MergePoints = __webpack_require__(725); -Rectangle.MergeRect = __webpack_require__(726); -Rectangle.MergeXY = __webpack_require__(727); -Rectangle.Offset = __webpack_require__(728); -Rectangle.OffsetPoint = __webpack_require__(729); -Rectangle.Overlaps = __webpack_require__(730); +Rectangle.MergePoints = __webpack_require__(727); +Rectangle.MergeRect = __webpack_require__(728); +Rectangle.MergeXY = __webpack_require__(729); +Rectangle.Offset = __webpack_require__(730); +Rectangle.OffsetPoint = __webpack_require__(731); +Rectangle.Overlaps = __webpack_require__(732); Rectangle.Perimeter = __webpack_require__(78); -Rectangle.PerimeterPoint = __webpack_require__(731); -Rectangle.Random = __webpack_require__(108); -Rectangle.Scale = __webpack_require__(732); -Rectangle.Union = __webpack_require__(733); +Rectangle.PerimeterPoint = __webpack_require__(733); +Rectangle.Random = __webpack_require__(107); +Rectangle.Scale = __webpack_require__(734); +Rectangle.Union = __webpack_require__(735); module.exports = Rectangle; @@ -56431,6 +55651,7 @@ var AudioFile = new Class({ }, function (e) { + // eslint-disable-next-line no-console console.error('Error with decoding audio data for \'' + this.key + '\':', e.message); _this.state = CONST.FILE_ERRORED; @@ -56452,7 +55673,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData)) { - console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.'); + // console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.'); return null; } @@ -56460,7 +55681,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) if (!url) { - console.warn('No supported url provided for audio \'' + key + '\'!'); + // console.warn('No supported url provided for audio \'' + key + '\'!'); return null; } @@ -56649,7 +55870,7 @@ var HTML5AudioFile = new Class({ this.loader.nextFile(this, true); }, - onError: function (event) + onError: function () { for (var i = 0; i < this.data.length; i++) { @@ -57192,7 +56413,7 @@ module.exports = RoundAwayFromZero; */ var ArcadeImage = __webpack_require__(325); -var ArcadeSprite = __webpack_require__(92); +var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var PhysicsGroup = __webpack_require__(327); @@ -57546,18 +56767,18 @@ module.exports = ArcadeImage; module.exports = { - Acceleration: __webpack_require__(825), - Angular: __webpack_require__(826), - Bounce: __webpack_require__(827), - Debug: __webpack_require__(828), - Drag: __webpack_require__(829), - Enable: __webpack_require__(830), - Friction: __webpack_require__(831), - Gravity: __webpack_require__(832), - Immovable: __webpack_require__(833), - Mass: __webpack_require__(834), - Size: __webpack_require__(835), - Velocity: __webpack_require__(836) + Acceleration: __webpack_require__(827), + Angular: __webpack_require__(828), + Bounce: __webpack_require__(829), + Debug: __webpack_require__(830), + Drag: __webpack_require__(831), + Enable: __webpack_require__(832), + Friction: __webpack_require__(833), + Gravity: __webpack_require__(834), + Immovable: __webpack_require__(835), + Mass: __webpack_require__(836), + Size: __webpack_require__(837), + Velocity: __webpack_require__(838) }; @@ -57572,7 +56793,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeSprite = __webpack_require__(92); +var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var GetFastValue = __webpack_require__(1); @@ -57799,7 +57020,7 @@ module.exports = PhysicsGroup; // Phaser.Physics.Arcade.StaticGroup -var ArcadeSprite = __webpack_require__(92); +var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var Group = __webpack_require__(69); @@ -57904,7 +57125,7 @@ var StaticPhysicsGroup = new Class({ * * @param {object} entries - [description] */ - createMultipleCallback: function (entries) + createMultipleCallback: function () { this.refresh(); }, @@ -57949,19 +57170,21 @@ var Clamp = __webpack_require__(60); var Class = __webpack_require__(0); var Collider = __webpack_require__(331); var CONST = __webpack_require__(58); -var DistanceBetween = __webpack_require__(43); +var DistanceBetween = __webpack_require__(41); var EventEmitter = __webpack_require__(13); +var GetOverlapX = __webpack_require__(332); +var GetOverlapY = __webpack_require__(333); var GetValue = __webpack_require__(4); -var ProcessQueue = __webpack_require__(332); -var ProcessTileCallbacks = __webpack_require__(837); +var ProcessQueue = __webpack_require__(334); +var ProcessTileCallbacks = __webpack_require__(839); var Rectangle = __webpack_require__(8); -var RTree = __webpack_require__(333); -var SeparateTile = __webpack_require__(838); -var SeparateX = __webpack_require__(843); -var SeparateY = __webpack_require__(845); +var RTree = __webpack_require__(335); +var SeparateTile = __webpack_require__(840); +var SeparateX = __webpack_require__(845); +var SeparateY = __webpack_require__(846); var Set = __webpack_require__(61); -var StaticBody = __webpack_require__(336); -var TileIntersectsBody = __webpack_require__(335); +var StaticBody = __webpack_require__(338); +var TileIntersectsBody = __webpack_require__(337); var Vector2 = __webpack_require__(6); /** @@ -58633,7 +57856,7 @@ var World = new Class({ var body; var dynamic = this.bodies; - var static = this.staticBodies; + var staticBodies = this.staticBodies; var pending = this.pendingDestroy; var bodies = dynamic.entries; @@ -58665,7 +57888,7 @@ var World = new Class({ } } - bodies = static.entries; + bodies = staticBodies.entries; len = bodies.length; for (i = 0; i < len; i++) @@ -58699,7 +57922,7 @@ var World = new Class({ else if (body.physicsType === CONST.STATIC_BODY) { staticTree.remove(body); - static.delete(body); + staticBodies.delete(body); } body.world = undefined; @@ -59328,6 +58551,7 @@ var World = new Class({ return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } } + // GROUPS else if (object1.isParent) { @@ -59344,6 +58568,7 @@ var World = new Class({ return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } } + // TILEMAP LAYERS else if (object1.isTilemap) { @@ -59486,7 +58711,8 @@ var World = new Class({ { if (children[i].body) { - if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) { + if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) + { didCollide = true; } } @@ -61695,6 +60921,164 @@ module.exports = Collider; /***/ }), /* 332 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Physics.Arcade.GetOverlapX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - [description] + * @param {Phaser.Physics.Arcade.Body} body2 - [description] + * @param {boolean} overlapOnly - [description] + * @param {number} bias - [description] + * + * @return {number} [description] + */ +var GetOverlapX = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; + + if (body1.deltaX() === 0 && body2.deltaX() === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaX() > body2.deltaX()) + { + // Body1 is moving right and / or Body2 is moving left + overlap = body1.right - body2.x; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.right = true; + body2.touching.none = false; + body2.touching.left = true; + } + } + else if (body1.deltaX() < body2.deltaX()) + { + // Body1 is moving left and/or Body2 is moving right + overlap = body1.x - body2.width - body2.x; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.left = true; + body2.touching.none = false; + body2.touching.right = true; + } + } + + // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapX = overlap; + body2.overlapX = overlap; + + return overlap; +}; + +module.exports = GetOverlapX; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Physics.Arcade.GetOverlapY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - [description] + * @param {Phaser.Physics.Arcade.Body} body2 - [description] + * @param {boolean} overlapOnly - [description] + * @param {number} bias - [description] + * + * @return {number} [description] + */ +var GetOverlapY = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; + + if (body1.deltaY() === 0 && body2.deltaY() === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaY() > body2.deltaY()) + { + // Body1 is moving down and/or Body2 is moving up + overlap = body1.bottom - body2.y; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.down = true; + body2.touching.none = false; + body2.touching.up = true; + } + } + else if (body1.deltaY() < body2.deltaY()) + { + // Body1 is moving up and/or Body2 is moving down + overlap = body1.y - body2.bottom; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.up = true; + body2.touching.none = false; + body2.touching.down = true; + } + } + + // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapY = overlap; + body2.overlapY = overlap; + + return overlap; +}; + +module.exports = GetOverlapY; + + +/***/ }), +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61892,7 +61276,7 @@ module.exports = ProcessQueue; /***/ }), -/* 333 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61901,7 +61285,7 @@ module.exports = ProcessQueue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(334); +var quickselect = __webpack_require__(336); /** * @classdesc @@ -62501,7 +61885,7 @@ module.exports = rbush; /***/ }), -/* 334 */ +/* 336 */ /***/ (function(module, exports) { /** @@ -62619,7 +62003,7 @@ module.exports = QuickSelect; /***/ }), -/* 335 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -62656,7 +62040,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 336 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62668,7 +62052,6 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); var Vector2 = __webpack_require__(6); @@ -63513,10 +62896,10 @@ module.exports = StaticBody; /***/ }), -/* 337 */, -/* 338 */, /* 339 */, -/* 340 */ +/* 340 */, +/* 341 */, +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63559,7 +62942,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 341 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63601,7 +62984,7 @@ module.exports = HasTileAt; /***/ }), -/* 342 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63610,7 +62993,7 @@ module.exports = HasTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); var CalculateFacesAt = __webpack_require__(150); @@ -63662,7 +63045,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 343 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63673,9 +63056,9 @@ module.exports = RemoveTileAt; var Formats = __webpack_require__(19); var Parse2DArray = __webpack_require__(153); -var ParseCSV = __webpack_require__(344); -var ParseJSONTiled = __webpack_require__(345); -var ParseWeltmeister = __webpack_require__(350); +var ParseCSV = __webpack_require__(346); +var ParseJSONTiled = __webpack_require__(347); +var ParseWeltmeister = __webpack_require__(352); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -63732,7 +63115,7 @@ module.exports = Parse; /***/ }), -/* 344 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63780,7 +63163,7 @@ module.exports = ParseCSV; /***/ }), -/* 345 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63856,7 +63239,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 346 */ +/* 348 */ /***/ (function(module, exports) { /** @@ -63946,7 +63329,7 @@ module.exports = ParseGID; /***/ }), -/* 347 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64118,7 +63501,7 @@ module.exports = ImageCollection; /***/ }), -/* 348 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64128,7 +63511,7 @@ module.exports = ImageCollection; */ var Pick = __webpack_require__(897); -var ParseGID = __webpack_require__(346); +var ParseGID = __webpack_require__(348); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -64200,7 +63583,7 @@ module.exports = ParseObject; /***/ }), -/* 349 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64306,7 +63689,7 @@ module.exports = ObjectLayer; /***/ }), -/* 350 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64373,7 +63756,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 351 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64383,16 +63766,16 @@ module.exports = ParseWeltmeister; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); -var DynamicTilemapLayer = __webpack_require__(352); +var DegToRad = __webpack_require__(35); +var DynamicTilemapLayer = __webpack_require__(354); var Extend = __webpack_require__(23); var Formats = __webpack_require__(19); var LayerData = __webpack_require__(75); var Rotate = __webpack_require__(322); -var StaticTilemapLayer = __webpack_require__(353); -var Tile = __webpack_require__(45); -var TilemapComponents = __webpack_require__(97); -var Tileset = __webpack_require__(101); +var StaticTilemapLayer = __webpack_require__(355); +var Tile = __webpack_require__(44); +var TilemapComponents = __webpack_require__(96); +var Tileset = __webpack_require__(100); /** * @classdesc @@ -66632,7 +66015,7 @@ module.exports = Tilemap; /***/ }), -/* 352 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66645,7 +66028,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DynamicTilemapLayerRender = __webpack_require__(903); var GameObject = __webpack_require__(2); -var TilemapComponents = __webpack_require__(97); +var TilemapComponents = __webpack_require__(96); /** * @classdesc @@ -67751,7 +67134,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 353 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67764,8 +67147,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var StaticTilemapLayerRender = __webpack_require__(906); -var TilemapComponents = __webpack_require__(97); -var Utils = __webpack_require__(34); +var TilemapComponents = __webpack_require__(96); +var Utils = __webpack_require__(42); /** * @classdesc @@ -67961,7 +67344,7 @@ var StaticTilemapLayer = new Class({ * * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object. */ - contextRestore: function (renderer) + contextRestore: function () { this.dirty = true; this.vertexBuffer = null; @@ -68086,13 +67469,13 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (this.vertexBuffer === null) + if (vertexBuffer === null) { - this.vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); } else { - renderer.setVertexBuffer(this.vertexBuffer); + renderer.setVertexBuffer(vertexBuffer); gl.bufferSubData(gl.ARRAY_BUFFER, 0, bufferData); } } @@ -68787,7 +68170,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 354 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69090,7 +68473,7 @@ module.exports = TimerEvent; /***/ }), -/* 355 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69148,7 +68531,7 @@ module.exports = GetProps; /***/ }), -/* 356 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69194,7 +68577,7 @@ module.exports = GetTweens; /***/ }), -/* 357 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69207,7 +68590,7 @@ var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(102); +var GetNewValue = __webpack_require__(101); var GetValue = __webpack_require__(4); var GetValueOp = __webpack_require__(156); var Tween = __webpack_require__(158); @@ -69322,7 +68705,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 358 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69336,12 +68719,12 @@ var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(102); +var GetNewValue = __webpack_require__(101); var GetTargets = __webpack_require__(155); -var GetTweens = __webpack_require__(356); +var GetTweens = __webpack_require__(358); var GetValue = __webpack_require__(4); -var Timeline = __webpack_require__(359); -var TweenBuilder = __webpack_require__(103); +var Timeline = __webpack_require__(361); +var TweenBuilder = __webpack_require__(102); /** * [description] @@ -69474,7 +68857,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 359 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69485,8 +68868,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); -var TweenBuilder = __webpack_require__(103); -var TWEEN_CONST = __webpack_require__(88); +var TweenBuilder = __webpack_require__(102); +var TWEEN_CONST = __webpack_require__(87); /** * @classdesc @@ -70328,7 +69711,7 @@ module.exports = Timeline; /***/ }), -/* 360 */ +/* 362 */ /***/ (function(module, exports) { /** @@ -70375,7 +69758,7 @@ module.exports = SpliceOne; /***/ }), -/* 361 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71038,8 +70421,8 @@ var Animation = new Class({ return this; }, - // Scale the time (make it go faster / slower) - // Factor that's used to scale time where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + // Scale the time (make it go faster / slower) + // Factor that's used to scale time where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. /** * [description] @@ -71195,12 +70578,10 @@ module.exports = Animation; /***/ }), -/* 362 */, -/* 363 */ +/* 364 */, +/* 365 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(364); -__webpack_require__(365); __webpack_require__(366); __webpack_require__(367); __webpack_require__(368); @@ -71208,10 +70589,12 @@ __webpack_require__(369); __webpack_require__(370); __webpack_require__(371); __webpack_require__(372); +__webpack_require__(373); +__webpack_require__(374); /***/ }), -/* 364 */ +/* 366 */ /***/ (function(module, exports) { /** @@ -71251,7 +70634,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 365 */ +/* 367 */ /***/ (function(module, exports) { /** @@ -71267,7 +70650,7 @@ if (!Array.isArray) /***/ }), -/* 366 */ +/* 368 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -71455,7 +70838,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 367 */ +/* 369 */ /***/ (function(module, exports) { /** @@ -71470,7 +70853,7 @@ if (!window.console) /***/ }), -/* 368 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -71518,7 +70901,7 @@ if (!Function.prototype.bind) { /***/ }), -/* 369 */ +/* 371 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -71530,7 +70913,7 @@ if (!Math.trunc) { /***/ }), -/* 370 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -71567,7 +70950,7 @@ if (!Math.trunc) { /***/ }), -/* 371 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -71640,7 +71023,7 @@ if (!global.cancelAnimationFrame) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) /***/ }), -/* 372 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -71692,7 +71075,7 @@ if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "o /***/ }), -/* 373 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -71726,7 +71109,7 @@ module.exports = Angle; /***/ }), -/* 374 */ +/* 376 */ /***/ (function(module, exports) { /** @@ -71763,7 +71146,7 @@ module.exports = Call; /***/ }), -/* 375 */ +/* 377 */ /***/ (function(module, exports) { /** @@ -71819,7 +71202,7 @@ module.exports = GetFirst; /***/ }), -/* 376 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71856,6 +71239,7 @@ var GridAlign = function (items, options) var position = GetValue(options, 'position', CONST.TOP_LEFT); var x = GetValue(options, 'x', 0); var y = GetValue(options, 'y', 0); + // var centerX = GetValue(options, 'centerX', null); // var centerY = GetValue(options, 'centerY', null); @@ -71867,7 +71251,7 @@ var GridAlign = function (items, options) // If the Grid is centered on a position then we need to calculate it now // if (centerX !== null && centerY !== null) // { - // + // // } tempZone.setPosition(x, y); @@ -71932,7 +71316,7 @@ module.exports = GridAlign; /***/ }), -/* 377 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72246,8 +71630,9 @@ var RandomDataGenerator = new Class({ var a = ''; var b = ''; - for (b = a = ''; a++ < 36; b +=~a % 5 | a*3 & 4 ? (a^15 ? 8 ^ this.frac()*(a^20 ? 16 : 4) : 4).toString(16) : '-') + for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') { + // eslint-disable-next-line no-empty } return b; @@ -72379,7 +71764,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 378 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72625,7 +72010,7 @@ module.exports = Alpha; /***/ }), -/* 379 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72634,7 +72019,7 @@ module.exports = Alpha; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); /** * Provides methods used for setting the blend mode of a Game Object. @@ -72736,7 +72121,7 @@ module.exports = BlendMode; /***/ }), -/* 380 */ +/* 382 */ /***/ (function(module, exports) { /** @@ -72823,7 +72208,7 @@ module.exports = ComputedSize; /***/ }), -/* 381 */ +/* 383 */ /***/ (function(module, exports) { /** @@ -72907,7 +72292,7 @@ module.exports = Depth; /***/ }), -/* 382 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -73055,7 +72440,7 @@ module.exports = Flip; /***/ }), -/* 383 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73249,7 +72634,7 @@ module.exports = GetBounds; /***/ }), -/* 384 */ +/* 386 */ /***/ (function(module, exports) { /** @@ -73441,7 +72826,7 @@ module.exports = Origin; /***/ }), -/* 385 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73512,7 +72897,7 @@ module.exports = ScaleMode; /***/ }), -/* 386 */ +/* 388 */ /***/ (function(module, exports) { /** @@ -73604,7 +72989,7 @@ module.exports = ScrollFactor; /***/ }), -/* 387 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -73749,7 +73134,7 @@ module.exports = Size; /***/ }), -/* 388 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -73849,7 +73234,7 @@ module.exports = Texture; /***/ }), -/* 389 */ +/* 391 */ /***/ (function(module, exports) { /** @@ -74044,7 +73429,7 @@ module.exports = Tint; /***/ }), -/* 390 */ +/* 392 */ /***/ (function(module, exports) { /** @@ -74097,7 +73482,7 @@ module.exports = ToJSON; /***/ }), -/* 391 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74450,7 +73835,7 @@ module.exports = Transform; /***/ }), -/* 392 */ +/* 394 */ /***/ (function(module, exports) { /** @@ -74530,7 +73915,7 @@ module.exports = Visible; /***/ }), -/* 393 */ +/* 395 */ /***/ (function(module, exports) { /** @@ -74564,7 +73949,7 @@ module.exports = IncAlpha; /***/ }), -/* 394 */ +/* 396 */ /***/ (function(module, exports) { /** @@ -74598,7 +73983,7 @@ module.exports = IncX; /***/ }), -/* 395 */ +/* 397 */ /***/ (function(module, exports) { /** @@ -74634,7 +74019,7 @@ module.exports = IncXY; /***/ }), -/* 396 */ +/* 398 */ /***/ (function(module, exports) { /** @@ -74668,7 +74053,7 @@ module.exports = IncY; /***/ }), -/* 397 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -74713,7 +74098,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 398 */ +/* 400 */ /***/ (function(module, exports) { /** @@ -74761,7 +74146,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 399 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74770,7 +74155,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoints = __webpack_require__(109); +var GetPoints = __webpack_require__(108); /** * [description] @@ -74803,7 +74188,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 400 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74862,7 +74247,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 401 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74920,7 +74305,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 402 */ +/* 404 */ /***/ (function(module, exports) { /** @@ -74955,7 +74340,7 @@ module.exports = PlayAnimation; /***/ }), -/* 403 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74964,7 +74349,7 @@ module.exports = PlayAnimation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(106); +var Random = __webpack_require__(105); /** * [description] @@ -74991,7 +74376,7 @@ module.exports = RandomCircle; /***/ }), -/* 404 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75000,7 +74385,7 @@ module.exports = RandomCircle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(110); +var Random = __webpack_require__(109); /** * [description] @@ -75027,7 +74412,7 @@ module.exports = RandomEllipse; /***/ }), -/* 405 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75036,7 +74421,7 @@ module.exports = RandomEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(111); +var Random = __webpack_require__(110); /** * [description] @@ -75063,7 +74448,7 @@ module.exports = RandomLine; /***/ }), -/* 406 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75072,7 +74457,7 @@ module.exports = RandomLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(108); +var Random = __webpack_require__(107); /** * [description] @@ -75099,7 +74484,7 @@ module.exports = RandomRectangle; /***/ }), -/* 407 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75108,7 +74493,7 @@ module.exports = RandomRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(112); +var Random = __webpack_require__(111); /** * [description] @@ -75135,7 +74520,7 @@ module.exports = RandomTriangle; /***/ }), -/* 408 */ +/* 410 */ /***/ (function(module, exports) { /** @@ -75172,7 +74557,7 @@ module.exports = Rotate; /***/ }), -/* 409 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75181,8 +74566,8 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundDistance = __webpack_require__(113); -var DistanceBetween = __webpack_require__(43); +var RotateAroundDistance = __webpack_require__(112); +var DistanceBetween = __webpack_require__(41); /** * [description] @@ -75215,7 +74600,7 @@ module.exports = RotateAround; /***/ }), -/* 410 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75224,7 +74609,7 @@ module.exports = RotateAround; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(113); +var MathRotateAroundDistance = __webpack_require__(112); /** * [description] @@ -75262,7 +74647,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 411 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -75296,7 +74681,7 @@ module.exports = ScaleX; /***/ }), -/* 412 */ +/* 414 */ /***/ (function(module, exports) { /** @@ -75332,7 +74717,7 @@ module.exports = ScaleXY; /***/ }), -/* 413 */ +/* 415 */ /***/ (function(module, exports) { /** @@ -75366,7 +74751,7 @@ module.exports = ScaleY; /***/ }), -/* 414 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -75403,7 +74788,7 @@ module.exports = SetAlpha; /***/ }), -/* 415 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -75437,7 +74822,7 @@ module.exports = SetBlendMode; /***/ }), -/* 416 */ +/* 418 */ /***/ (function(module, exports) { /** @@ -75474,7 +74859,7 @@ module.exports = SetDepth; /***/ }), -/* 417 */ +/* 419 */ /***/ (function(module, exports) { /** @@ -75509,7 +74894,7 @@ module.exports = SetHitArea; /***/ }), -/* 418 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -75544,7 +74929,7 @@ module.exports = SetOrigin; /***/ }), -/* 419 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -75581,7 +74966,7 @@ module.exports = SetRotation; /***/ }), -/* 420 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -75624,7 +75009,7 @@ module.exports = SetScale; /***/ }), -/* 421 */ +/* 423 */ /***/ (function(module, exports) { /** @@ -75661,7 +75046,7 @@ module.exports = SetScaleX; /***/ }), -/* 422 */ +/* 424 */ /***/ (function(module, exports) { /** @@ -75698,7 +75083,7 @@ module.exports = SetScaleY; /***/ }), -/* 423 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -75735,7 +75120,7 @@ module.exports = SetTint; /***/ }), -/* 424 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -75769,7 +75154,7 @@ module.exports = SetVisible; /***/ }), -/* 425 */ +/* 427 */ /***/ (function(module, exports) { /** @@ -75806,7 +75191,7 @@ module.exports = SetX; /***/ }), -/* 426 */ +/* 428 */ /***/ (function(module, exports) { /** @@ -75847,7 +75232,7 @@ module.exports = SetXY; /***/ }), -/* 427 */ +/* 429 */ /***/ (function(module, exports) { /** @@ -75884,7 +75269,7 @@ module.exports = SetY; /***/ }), -/* 428 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76011,7 +75396,7 @@ module.exports = ShiftPosition; /***/ }), -/* 429 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76041,7 +75426,7 @@ module.exports = Shuffle; /***/ }), -/* 430 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76095,7 +75480,7 @@ module.exports = SmootherStep; /***/ }), -/* 431 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76149,7 +75534,7 @@ module.exports = SmoothStep; /***/ }), -/* 432 */ +/* 434 */ /***/ (function(module, exports) { /** @@ -76201,7 +75586,7 @@ module.exports = Spread; /***/ }), -/* 433 */ +/* 435 */ /***/ (function(module, exports) { /** @@ -76234,7 +75619,7 @@ module.exports = ToggleVisible; /***/ }), -/* 434 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76257,7 +75642,7 @@ module.exports = { /***/ }), -/* 435 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76279,7 +75664,7 @@ module.exports = { /***/ }), -/* 436 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76294,15 +75679,15 @@ module.exports = { module.exports = { - Controls: __webpack_require__(437), - Scene2D: __webpack_require__(440), - Sprite3D: __webpack_require__(442) + Controls: __webpack_require__(439), + Scene2D: __webpack_require__(442), + Sprite3D: __webpack_require__(444) }; /***/ }), -/* 437 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76317,14 +75702,14 @@ module.exports = { module.exports = { - Fixed: __webpack_require__(438), - Smoothed: __webpack_require__(439) + Fixed: __webpack_require__(440), + Smoothed: __webpack_require__(441) }; /***/ }), -/* 438 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76617,7 +76002,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 439 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77082,7 +76467,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 440 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77097,14 +76482,14 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(115), - CameraManager: __webpack_require__(441) + Camera: __webpack_require__(114), + CameraManager: __webpack_require__(443) }; /***/ }), -/* 441 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77113,7 +76498,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(115); +var Camera = __webpack_require__(114); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginManager = __webpack_require__(11); @@ -77584,7 +76969,7 @@ module.exports = CameraManager; /***/ }), -/* 442 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77599,8 +76984,8 @@ module.exports = CameraManager; module.exports = { - Camera: __webpack_require__(118), - CameraManager: __webpack_require__(446), + Camera: __webpack_require__(117), + CameraManager: __webpack_require__(448), OrthographicCamera: __webpack_require__(209), PerspectiveCamera: __webpack_require__(210) @@ -77608,7 +76993,7 @@ module.exports = { /***/ }), -/* 443 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77622,12 +77007,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(444); + renderWebGL = __webpack_require__(446); } if (true) { - renderCanvas = __webpack_require__(445); + renderCanvas = __webpack_require__(447); } module.exports = { @@ -77639,7 +77024,7 @@ module.exports = { /***/ }), -/* 444 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77678,7 +77063,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 445 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77717,7 +77102,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 446 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77972,7 +77357,7 @@ module.exports = CameraManager; /***/ }), -/* 447 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77988,13 +77373,13 @@ module.exports = CameraManager; module.exports = { GenerateTexture: __webpack_require__(211), - Palettes: __webpack_require__(448) + Palettes: __webpack_require__(450) }; /***/ }), -/* 448 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78010,16 +77395,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(212), - C64: __webpack_require__(449), - CGA: __webpack_require__(450), - JMP: __webpack_require__(451), - MSX: __webpack_require__(452) + C64: __webpack_require__(451), + CGA: __webpack_require__(452), + JMP: __webpack_require__(453), + MSX: __webpack_require__(454) }; /***/ }), -/* 449 */ +/* 451 */ /***/ (function(module, exports) { /** @@ -78073,7 +77458,7 @@ module.exports = { /***/ }), -/* 450 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -78127,7 +77512,7 @@ module.exports = { /***/ }), -/* 451 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -78181,7 +77566,7 @@ module.exports = { /***/ }), -/* 452 */ +/* 454 */ /***/ (function(module, exports) { /** @@ -78235,7 +77620,7 @@ module.exports = { /***/ }), -/* 453 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78250,7 +77635,7 @@ module.exports = { module.exports = { - Path: __webpack_require__(454), + Path: __webpack_require__(456), CubicBezier: __webpack_require__(213), Curve: __webpack_require__(66), @@ -78262,7 +77647,7 @@ module.exports = { /***/ }), -/* 454 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78278,7 +77663,7 @@ var CubicBezierCurve = __webpack_require__(213); var EllipseCurve = __webpack_require__(215); var GameObjectFactory = __webpack_require__(9); var LineCurve = __webpack_require__(217); -var MovePathTo = __webpack_require__(455); +var MovePathTo = __webpack_require__(457); var Rectangle = __webpack_require__(8); var SplineCurve = __webpack_require__(218); var Vector2 = __webpack_require__(6); @@ -79027,7 +78412,7 @@ module.exports = Path; /***/ }), -/* 455 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79163,7 +78548,7 @@ module.exports = MoveTo; /***/ }), -/* 456 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79179,13 +78564,13 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(79), - DataManagerPlugin: __webpack_require__(457) + DataManagerPlugin: __webpack_require__(459) }; /***/ }), -/* 457 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79293,7 +78678,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 458 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79308,17 +78693,17 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(459), - Bounds: __webpack_require__(474), - Canvas: __webpack_require__(477), + Align: __webpack_require__(461), + Bounds: __webpack_require__(476), + Canvas: __webpack_require__(479), Color: __webpack_require__(220), - Masks: __webpack_require__(488) + Masks: __webpack_require__(490) }; /***/ }), -/* 459 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79333,14 +78718,14 @@ module.exports = { module.exports = { - In: __webpack_require__(460), - To: __webpack_require__(461) + In: __webpack_require__(462), + To: __webpack_require__(463) }; /***/ }), -/* 460 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79370,7 +78755,7 @@ module.exports = { /***/ }), -/* 461 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79385,24 +78770,24 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(462), - BottomLeft: __webpack_require__(463), - BottomRight: __webpack_require__(464), - LeftBottom: __webpack_require__(465), - LeftCenter: __webpack_require__(466), - LeftTop: __webpack_require__(467), - RightBottom: __webpack_require__(468), - RightCenter: __webpack_require__(469), - RightTop: __webpack_require__(470), - TopCenter: __webpack_require__(471), - TopLeft: __webpack_require__(472), - TopRight: __webpack_require__(473) + BottomCenter: __webpack_require__(464), + BottomLeft: __webpack_require__(465), + BottomRight: __webpack_require__(466), + LeftBottom: __webpack_require__(467), + LeftCenter: __webpack_require__(468), + LeftTop: __webpack_require__(469), + RightBottom: __webpack_require__(470), + RightCenter: __webpack_require__(471), + RightTop: __webpack_require__(472), + TopCenter: __webpack_require__(473), + TopLeft: __webpack_require__(474), + TopRight: __webpack_require__(475) }; /***/ }), -/* 462 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79412,8 +78797,8 @@ module.exports = { */ var GetBottom = __webpack_require__(24); -var GetCenterX = __webpack_require__(47); -var SetCenterX = __webpack_require__(48); +var GetCenterX = __webpack_require__(46); +var SetCenterX = __webpack_require__(47); var SetTop = __webpack_require__(31); /** @@ -79444,7 +78829,7 @@ module.exports = BottomCenter; /***/ }), -/* 463 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79486,7 +78871,7 @@ module.exports = BottomLeft; /***/ }), -/* 464 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79528,7 +78913,7 @@ module.exports = BottomRight; /***/ }), -/* 465 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79570,7 +78955,7 @@ module.exports = LeftBottom; /***/ }), -/* 466 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79579,9 +78964,9 @@ module.exports = LeftBottom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetLeft = __webpack_require__(26); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetRight = __webpack_require__(29); /** @@ -79612,7 +78997,7 @@ module.exports = LeftCenter; /***/ }), -/* 467 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79654,7 +79039,7 @@ module.exports = LeftTop; /***/ }), -/* 468 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79696,7 +79081,7 @@ module.exports = RightBottom; /***/ }), -/* 469 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79705,9 +79090,9 @@ module.exports = RightBottom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetRight = __webpack_require__(28); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetLeft = __webpack_require__(27); /** @@ -79738,7 +79123,7 @@ module.exports = RightCenter; /***/ }), -/* 470 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79780,7 +79165,7 @@ module.exports = RightTop; /***/ }), -/* 471 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79789,10 +79174,10 @@ module.exports = RightTop; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(47); +var GetCenterX = __webpack_require__(46); var GetTop = __webpack_require__(30); var SetBottom = __webpack_require__(25); -var SetCenterX = __webpack_require__(48); +var SetCenterX = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -79822,7 +79207,7 @@ module.exports = TopCenter; /***/ }), -/* 472 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79864,7 +79249,7 @@ module.exports = TopLeft; /***/ }), -/* 473 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79906,7 +79291,7 @@ module.exports = TopRight; /***/ }), -/* 474 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79923,16 +79308,16 @@ module.exports = { CenterOn: __webpack_require__(173), GetBottom: __webpack_require__(24), - GetCenterX: __webpack_require__(47), - GetCenterY: __webpack_require__(50), + GetCenterX: __webpack_require__(46), + GetCenterY: __webpack_require__(49), GetLeft: __webpack_require__(26), - GetOffsetX: __webpack_require__(475), - GetOffsetY: __webpack_require__(476), + GetOffsetX: __webpack_require__(477), + GetOffsetY: __webpack_require__(478), GetRight: __webpack_require__(28), GetTop: __webpack_require__(30), SetBottom: __webpack_require__(25), - SetCenterX: __webpack_require__(48), - SetCenterY: __webpack_require__(49), + SetCenterX: __webpack_require__(47), + SetCenterY: __webpack_require__(48), SetLeft: __webpack_require__(27), SetRight: __webpack_require__(29), SetTop: __webpack_require__(31) @@ -79941,7 +79326,7 @@ module.exports = { /***/ }), -/* 475 */ +/* 477 */ /***/ (function(module, exports) { /** @@ -79971,7 +79356,7 @@ module.exports = GetOffsetX; /***/ }), -/* 476 */ +/* 478 */ /***/ (function(module, exports) { /** @@ -80001,7 +79386,7 @@ module.exports = GetOffsetY; /***/ }), -/* 477 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80018,15 +79403,15 @@ module.exports = { Interpolation: __webpack_require__(219), Pool: __webpack_require__(20), - Smoothing: __webpack_require__(121), - TouchAction: __webpack_require__(478), - UserSelect: __webpack_require__(479) + Smoothing: __webpack_require__(120), + TouchAction: __webpack_require__(480), + UserSelect: __webpack_require__(481) }; /***/ }), -/* 478 */ +/* 480 */ /***/ (function(module, exports) { /** @@ -80061,7 +79446,7 @@ module.exports = TouchAction; /***/ }), -/* 479 */ +/* 481 */ /***/ (function(module, exports) { /** @@ -80108,7 +79493,7 @@ module.exports = UserSelect; /***/ }), -/* 480 */ +/* 482 */ /***/ (function(module, exports) { /** @@ -80156,7 +79541,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 481 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80165,7 +79550,7 @@ module.exports = ColorToRGBA; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); var HueToComponent = __webpack_require__(222); /** @@ -80206,7 +79591,7 @@ module.exports = HSLToColor; /***/ }), -/* 482 */ +/* 484 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -80234,7 +79619,7 @@ module.exports = function(module) { /***/ }), -/* 483 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80275,7 +79660,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 484 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80378,7 +79763,7 @@ module.exports = { /***/ }), -/* 485 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80388,7 +79773,7 @@ module.exports = { */ var Between = __webpack_require__(226); -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -80414,7 +79799,7 @@ module.exports = RandomRGB; /***/ }), -/* 486 */ +/* 488 */ /***/ (function(module, exports) { /** @@ -80478,7 +79863,7 @@ module.exports = RGBToHSV; /***/ }), -/* 487 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80522,7 +79907,7 @@ module.exports = RGBToString; /***/ }), -/* 488 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80537,14 +79922,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(489), - GeometryMask: __webpack_require__(490) + BitmapMask: __webpack_require__(491), + GeometryMask: __webpack_require__(492) }; /***/ }), -/* 489 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80735,7 +80120,7 @@ var BitmapMask = new Class({ * @param {[type]} mask - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. */ - preRenderCanvas: function (renderer, mask, camera) + preRenderCanvas: function () { // NOOP }, @@ -80748,7 +80133,7 @@ var BitmapMask = new Class({ * * @param {[type]} renderer - [description] */ - postRenderCanvas: function (renderer) + postRenderCanvas: function () { // NOOP } @@ -80759,7 +80144,7 @@ module.exports = BitmapMask; /***/ }), -/* 490 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80903,7 +80288,7 @@ module.exports = GeometryMask; /***/ }), -/* 491 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80918,7 +80303,7 @@ module.exports = GeometryMask; module.exports = { - AddToDOM: __webpack_require__(124), + AddToDOM: __webpack_require__(123), DOMContentLoaded: __webpack_require__(227), ParseXML: __webpack_require__(228), RemoveFromDOM: __webpack_require__(229), @@ -80928,7 +80313,7 @@ module.exports = { /***/ }), -/* 492 */ +/* 494 */ /***/ (function(module, exports) { // shim for using process in browser @@ -81118,7 +80503,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 493 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81300,7 +80685,7 @@ module.exports = EventEmitter; /***/ }), -/* 494 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81309,16 +80694,16 @@ module.exports = EventEmitter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(123); var AnimationManager = __webpack_require__(194); var CacheManager = __webpack_require__(197); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Config = __webpack_require__(495); -var CreateRenderer = __webpack_require__(496); +var Config = __webpack_require__(497); +var CreateRenderer = __webpack_require__(498); var DataManager = __webpack_require__(79); -var DebugHeader = __webpack_require__(513); -var Device = __webpack_require__(514); +var DebugHeader = __webpack_require__(515); +var Device = __webpack_require__(516); var DOMContentLoaded = __webpack_require__(227); var EventEmitter = __webpack_require__(13); var InputManager = __webpack_require__(237); @@ -81327,8 +80712,8 @@ var PluginManager = __webpack_require__(11); var SceneManager = __webpack_require__(249); var SoundManagerCreator = __webpack_require__(253); var TextureManager = __webpack_require__(260); -var TimeStep = __webpack_require__(537); -var VisibilityHandler = __webpack_require__(538); +var TimeStep = __webpack_require__(539); +var VisibilityHandler = __webpack_require__(540); /** * @classdesc @@ -81781,7 +81166,7 @@ module.exports = Game; /***/ }), -/* 495 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81796,7 +81181,7 @@ var GetValue = __webpack_require__(4); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(3); var Plugins = __webpack_require__(231); -var ValueToColor = __webpack_require__(116); +var ValueToColor = __webpack_require__(115); /** * This callback type is completely empty, a no-operation. @@ -82012,7 +81397,7 @@ module.exports = Config; /***/ }), -/* 496 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82024,7 +81409,7 @@ module.exports = Config; var CanvasInterpolation = __webpack_require__(219); var CanvasPool = __webpack_require__(20); var CONST = __webpack_require__(22); -var Features = __webpack_require__(125); +var Features = __webpack_require__(124); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -82100,8 +81485,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(497); - WebGLRenderer = __webpack_require__(502); + CanvasRenderer = __webpack_require__(499); + WebGLRenderer = __webpack_require__(504); // Let the config pick the renderer type, both are included if (config.renderType === CONST.WEBGL) @@ -82141,7 +81526,7 @@ module.exports = CreateRenderer; /***/ }), -/* 497 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82150,14 +81535,14 @@ module.exports = CreateRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitImage = __webpack_require__(498); -var CanvasSnapshot = __webpack_require__(499); +var BlitImage = __webpack_require__(500); +var CanvasSnapshot = __webpack_require__(501); var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var DrawImage = __webpack_require__(500); -var GetBlendModes = __webpack_require__(501); +var DrawImage = __webpack_require__(502); +var GetBlendModes = __webpack_require__(503); var ScaleModes = __webpack_require__(62); -var Smoothing = __webpack_require__(121); +var Smoothing = __webpack_require__(120); /** * @classdesc @@ -82414,7 +81799,7 @@ var CanvasRenderer = new Class({ * * @param {function} callback - [description] */ - onContextLost: function (callback) + onContextLost: function () { }, @@ -82426,7 +81811,7 @@ var CanvasRenderer = new Class({ * * @param {function} callback - [description] */ - onContextRestored: function (callback) + onContextRestored: function () { }, @@ -82670,7 +82055,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -82711,7 +82096,7 @@ module.exports = BlitImage; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, exports) { /** @@ -82750,7 +82135,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, exports) { /** @@ -82795,6 +82180,7 @@ var DrawImage = function (src, camera) if (this.currentScaleMode !== src.scaleMode) { this.currentScaleMode = src.scaleMode; + // ctx[this.smoothProperty] = (source.scaleMode === ScaleModes.LINEAR); } @@ -82844,7 +82230,7 @@ module.exports = DrawImage; /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82853,7 +82239,7 @@ module.exports = DrawImage; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var modes = __webpack_require__(46); +var modes = __webpack_require__(45); var CanvasFeatures = __webpack_require__(232); /** @@ -82894,7 +82280,7 @@ module.exports = GetBlendModes; /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82905,13 +82291,13 @@ module.exports = GetBlendModes; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(126); -var Utils = __webpack_require__(34); -var WebGLSnapshot = __webpack_require__(503); +var IsSizePowerOfTwo = __webpack_require__(125); +var Utils = __webpack_require__(42); +var WebGLSnapshot = __webpack_require__(505); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(504); -var FlatTintPipeline = __webpack_require__(507); +var BitmapMaskPipeline = __webpack_require__(506); +var FlatTintPipeline = __webpack_require__(509); var ForwardDiffuseLightPipeline = __webpack_require__(235); var TextureTintPipeline = __webpack_require__(236); @@ -82932,6 +82318,7 @@ var WebGLRenderer = new Class({ function WebGLRenderer (game) { + // eslint-disable-next-line consistent-this var renderer = this; var contextCreationConfig = { @@ -83077,27 +82464,17 @@ var WebGLRenderer = new Class({ encoder: null }; - for (var i = 0; i <= 16; i++) - { - this.blendModes.push({ func: [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ], equation: WebGLRenderingContext.FUNC_ADD }); - } - - this.blendModes[1].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.DST_ALPHA ]; - this.blendModes[2].func = [ WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ]; - this.blendModes[3].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_COLOR ]; - - // Intenal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) + // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) /** * [description] * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit - * @type {int} + * @type {integer} * @since 3.1.0 */ this.currentActiveTextureUnit = 0; - /** * [description] * @@ -83161,7 +82538,7 @@ var WebGLRenderer = new Class({ * [description] * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentBlendMode - * @type {int} + * @type {integer} * @since 3.0.0 */ this.currentBlendMode = Infinity; @@ -83183,7 +82560,7 @@ var WebGLRenderer = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.currentScissor = new Uint32Array([0, 0, this.width, this.height]); + this.currentScissor = new Uint32Array([ 0, 0, this.width, this.height ]); /** * [description] @@ -83202,11 +82579,12 @@ var WebGLRenderer = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.scissorStack = new Uint32Array(4 * 1000); + this.scissorStack = new Uint32Array(4 * 1000); // Setup context lost and restore event listeners - this.canvas.addEventListener('webglcontextlost', function (event) { + this.canvas.addEventListener('webglcontextlost', function (event) + { renderer.contextLost = true; event.preventDefault(); @@ -83217,7 +82595,8 @@ var WebGLRenderer = new Class({ } }, false); - this.canvas.addEventListener('webglcontextrestored', function (event) { + this.canvas.addEventListener('webglcontextrestored', function () + { renderer.contextLost = false; renderer.init(renderer.config); for (var index = 0; index < renderer.restoredContextCallbacks.length; ++index) @@ -83286,6 +82665,15 @@ var WebGLRenderer = new Class({ this.gl = gl; + for (var i = 0; i <= 16; i++) + { + this.blendModes.push({ func: [ gl.ONE, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_ADD }); + } + + this.blendModes[1].func = [ gl.ONE, gl.DST_ALPHA ]; + this.blendModes[2].func = [ gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA ]; + this.blendModes[3].func = [ gl.ONE, gl.ONE_MINUS_SRC_COLOR ]; + // Load supported extensions this.supportedExtensions = gl.getSupportedExtensions(); @@ -83369,7 +82757,7 @@ var WebGLRenderer = new Class({ */ onContextRestored: function (callback, target) { - this.restoredContextCallbacks.push([callback, target]); + this.restoredContextCallbacks.push([ callback, target ]); return this; }, @@ -83386,7 +82774,7 @@ var WebGLRenderer = new Class({ */ onContextLost: function (callback, target) { - this.lostContextCallbacks.push([callback, target]); + this.lostContextCallbacks.push([ callback, target ]); return this; }, @@ -83417,7 +82805,7 @@ var WebGLRenderer = new Class({ */ getExtension: function (extensionName) { - if (!this.hasExtension(extensionName)) return null; + if (!this.hasExtension(extensionName)) { return null; } if (!(extensionName in this.extensions)) { @@ -83502,8 +82890,8 @@ var WebGLRenderer = new Class({ */ addPipeline: function (pipelineName, pipelineInstance) { - if (!this.hasPipeline(pipelineName)) this.pipelines[pipelineName] = pipelineInstance; - else console.warn('Pipeline', pipelineName, ' already exists.'); + if (!this.hasPipeline(pipelineName)) { this.pipelines[pipelineName] = pipelineInstance; } + else { console.warn('Pipeline', pipelineName, ' already exists.'); } pipelineInstance.name = pipelineName; this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); @@ -83517,10 +82905,10 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setScissor * @since 3.0.0 * - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} w - [description] - * @param {int} h - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} w - [description] + * @param {integer} h - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -83528,11 +82916,11 @@ var WebGLRenderer = new Class({ { var gl = this.gl; var currentScissor = this.currentScissor; - var enabled = (x == 0 && y == 0 && w == gl.canvas.width && h == gl.canvas.height && w >= 0 && h >= 0); + var enabled = (x === 0 && y === 0 && w === gl.canvas.width && h === gl.canvas.height && w >= 0 && h >= 0); - if (currentScissor[0] !== x || - currentScissor[1] !== y || - currentScissor[2] !== w || + if (currentScissor[0] !== x || + currentScissor[1] !== y || + currentScissor[2] !== w || currentScissor[3] !== h) { this.flush(); @@ -83563,10 +82951,10 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#pushScissor * @since 3.0.0 * - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} w - [description] - * @param {int} h - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} w - [description] + * @param {integer} h - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -83606,7 +82994,7 @@ var WebGLRenderer = new Class({ var h = scissorStack[stackIndex + 3]; this.currentScissorIdx = stackIndex; - this.setScissor(x, y, w, h); + this.setScissor(x, y, w, h); return this; }, @@ -83643,7 +83031,7 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode * @since 3.0.0 * - * @param {int} blendModeId - [description] + * @param {integer} blendModeId - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -83714,7 +83102,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {WebGLTexture} texture - [description] - * @param {int} textureUnit - [description] + * @param {integer} textureUnit - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -83847,14 +83235,14 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {object} source - [description] - * @param {int} width - [description] - * @param {int} height - [description] - * @param {int} scaleMode - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] + * @param {integer} scaleMode - [description] * * @return {WebGLTexture} [description] */ createTextureFromSource: function (source, width, height, scaleMode) - { + { var gl = this.gl; var filter = gl.NEAREST; var wrap = gl.CLAMP_TO_EDGE; @@ -83895,15 +83283,15 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#createTexture2D * @since 3.0.0 * - * @param {int} mipLevel - [description] - * @param {int} minFilter - [description] - * @param {int} magFilter - [description] - * @param {int} wrapT - [description] - * @param {int} wrapS - [description] - * @param {int} format - [description] + * @param {integer} mipLevel - [description] + * @param {integer} minFilter - [description] + * @param {integer} magFilter - [description] + * @param {integer} wrapT - [description] + * @param {integer} wrapS - [description] + * @param {integer} format - [description] * @param {object} pixels - [description] - * @param {int} width - [description] - * @param {int} height - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] * @param {boolean} pma - [description] * * @return {WebGLTexture} [description] @@ -83913,7 +83301,7 @@ var WebGLRenderer = new Class({ var gl = this.gl; var texture = gl.createTexture(); - pma = (pma === undefined || pma === null) ? true : pma; + pma = (pma === undefined || pma === null) ? true : pma; this.setTexture2D(texture, 0); @@ -83952,8 +83340,8 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#createFramebuffer * @since 3.0.0 * - * @param {int} width - [description] - * @param {int} height - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] * @param {WebGLFramebuffer} renderTexture - [description] * @param {boolean} addDepthStencilBuffer - [description] * @@ -84051,7 +83439,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {ArrayBuffer} initialDataOrSize - [description] - * @param {int} bufferUsage - [description] + * @param {integer} bufferUsage - [description] * * @return {WebGLBuffer} [description] */ @@ -84074,7 +83462,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {ArrayBuffer} initialDataOrSize - [description] - * @param {int} bufferUsage - [description] + * @param {integer} bufferUsage - [description] * * @return {WebGLBuffer} [description] */ @@ -84100,7 +83488,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteTexture: function (texture) + deleteTexture: function () { return this; }, @@ -84115,7 +83503,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteFramebuffer: function (framebuffer) + deleteFramebuffer: function () { return this; }, @@ -84130,7 +83518,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteProgram: function (program) + deleteProgram: function () { return this; }, @@ -84145,7 +83533,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteBuffer: function (vertexBuffer) + deleteBuffer: function () { return this; }, @@ -84172,12 +83560,12 @@ var WebGLRenderer = new Class({ var FlatTintPipeline = this.pipelines.FlatTintPipeline; FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0), color.alphaGL, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); FlatTintPipeline.flush(); @@ -84200,22 +83588,22 @@ var WebGLRenderer = new Class({ // Fade FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(camera._fadeRed, camera._fadeGreen, camera._fadeBlue, 1.0), camera._fadeAlpha, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); // Flash FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(camera._flashRed, camera._flashGreen, camera._flashBlue, 1.0), camera._flashAlpha, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); FlatTintPipeline.flush(); @@ -84232,7 +83620,7 @@ var WebGLRenderer = new Class({ */ preRender: function () { - if (this.contextLost) return; + if (this.contextLost) { return; } var gl = this.gl; var color = this.config.backgroundColor; @@ -84242,7 +83630,7 @@ var WebGLRenderer = new Class({ gl.clearColor(color.redGL, color.greenGL, color.blueGL, color.alphaGL); if (this.config.clearBeforeRender) - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + { gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); } for (var key in pipelines) { @@ -84263,9 +83651,8 @@ var WebGLRenderer = new Class({ */ render: function (scene, children, interpolationPercentage, camera) { - if (this.contextLost) return; + if (this.contextLost) { return; } - var gl = this.gl; var list = children.list; var childCount = list.length; var pipelines = this.pipelines; @@ -84317,7 +83704,7 @@ var WebGLRenderer = new Class({ */ postRender: function () { - if (this.contextLost) return; + if (this.contextLost) { return; } // Unbind custom framebuffer here @@ -84364,11 +83751,11 @@ var WebGLRenderer = new Class({ * @param {HTMLCanvasElement} srcCanvas - [description] * @param {WebGLTexture} dstTexture - [description] * @param {boolean} shouldReallocate - [description] - * @param {int} scaleMode - [description] + * @param {integer} scaleMode - [description] * * @return {WebGLTexture} [description] */ - canvasToTexture: function (srcCanvas, dstTexture, shouldReallocate, scaleMode) + canvasToTexture: function (srcCanvas, dstTexture, shouldReallocate) { var gl = this.gl; @@ -84410,8 +83797,8 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setTextureFilter * @since 3.0.0 * - * @param {int} texture - [description] - * @param {int} filter - [description] + * @param {integer} texture - [description] + * @param {integer} filter - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -84520,7 +83907,7 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] + * @param {integer} x - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -84539,8 +83926,8 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -84559,9 +83946,9 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} z - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} z - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -84580,10 +83967,10 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} z - [description] - * @param {int} w - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} z - [description] + * @param {integer} w - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -84662,8 +84049,6 @@ var WebGLRenderer = new Class({ */ destroy: function () { - var gl = this.gl; - // Clear-up anything that should be cleared :) for (var key in this.pipelines) { @@ -84674,7 +84059,7 @@ var WebGLRenderer = new Class({ for (var index = 0; index < this.nativeTextures.length; ++index) { this.deleteTexture(this.nativeTextures[index]); - delete this.nativeTextures[index]; + delete this.nativeTextures[index]; } if (this.hasExtension('WEBGL_lose_context')) @@ -84696,7 +84081,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports) { /** @@ -84765,7 +84150,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84775,10 +84160,9 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(505); -var ShaderSourceVS = __webpack_require__(506); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); +var ShaderSourceFS = __webpack_require__(507); +var ShaderSourceVS = __webpack_require__(508); +var WebGLPipeline = __webpack_require__(126); /** * @classdesc @@ -84811,7 +84195,7 @@ var BitmapMaskPipeline = new Class({ fragShader: ShaderSourceFS, vertexCapacity: 3, - vertexSize: + vertexSize: Float32Array.BYTES_PER_ELEMENT * 2, vertices: new Float32Array([ @@ -84977,19 +84361,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = maskColor.a * mainColor.a;\r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n" /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n" /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85002,10 +84386,10 @@ var Class = __webpack_require__(0); var Commands = __webpack_require__(127); var Earcut = __webpack_require__(233); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(508); -var ShaderSourceVS = __webpack_require__(509); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); +var ShaderSourceFS = __webpack_require__(510); +var ShaderSourceVS = __webpack_require__(511); +var Utils = __webpack_require__(42); +var WebGLPipeline = __webpack_require__(126); var Point = function (x, y, width, rgb, alpha) { @@ -85023,7 +84407,7 @@ var Path = function (x, y, width, rgb, alpha) this.points[0] = new Point(x, y, width, rgb, alpha); }; -var currentMatrix = new Float32Array([1, 0, 0, 1, 0, 0]); +var currentMatrix = new Float32Array([ 1, 0, 0, 1, 0, 0 ]); var matrixStack = new Float32Array(6 * 1000); var matrixStackLength = 0; var pathArray = []; @@ -85063,8 +84447,8 @@ var FlatTintPipeline = new Class({ fragShader: ShaderSourceFS, vertexCapacity: 12000, - vertexSize: - Float32Array.BYTES_PER_ELEMENT * 2 + + vertexSize: + Float32Array.BYTES_PER_ELEMENT * 2 + Uint8Array.BYTES_PER_ELEMENT * 4, attributes: [ @@ -85181,7 +84565,7 @@ var FlatTintPipeline = new Class({ * @param {float} y - [description] * @param {float} width - [description] * @param {float} height - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -85190,10 +84574,9 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) - { + batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) + { this.renderer.setPipeline(this); if (this.vertexCount + 6 > this.vertexCapacity) @@ -85201,8 +84584,8 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -85230,18 +84613,6 @@ var FlatTintPipeline = new Class({ var ty3 = xw * b + y * d + f; var tint = Utils.getTintAppendFloatAlphaAndSwap(fillColor, fillAlpha); - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -85281,7 +84652,7 @@ var FlatTintPipeline = new Class({ * @param {float} y1 - [description] * @param {float} x2 - [description] * @param {float} y2 - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -85290,9 +84661,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -85301,8 +84671,8 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -85326,16 +84696,6 @@ var FlatTintPipeline = new Class({ var ty2 = x2 * b + y2 * d + f; var tint = Utils.getTintAppendFloatAlphaAndSwap(fillColor, fillAlpha); - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -85367,7 +84727,7 @@ var FlatTintPipeline = new Class({ * @param {float} x2 - [description] * @param {float} y2 - [description] * @param {float} lineWidth - [description] - * @param {int} lineColor - [description] + * @param {integer} lineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a - [description] * @param {float} b - [description] @@ -85376,9 +84736,8 @@ var FlatTintPipeline = new Class({ * @param {float} e - [description] * @param {float} f - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchStrokeTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, currentMatrix, roundPixels) + batchStrokeTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, currentMatrix) { var tempTriangle = this.tempTriangle; @@ -85408,8 +84767,7 @@ var FlatTintPipeline = new Class({ tempTriangle, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, false, - currentMatrix, - roundPixels + currentMatrix ); }, @@ -85425,7 +84783,7 @@ var FlatTintPipeline = new Class({ * @param {float} srcScaleY - [description] * @param {float} srcRotation - [description] * @param {float} path - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -85434,14 +84792,13 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillPath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillPath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var length = path.length; var polygonCache = this.polygonCache; var polygonIndexArray; @@ -85502,16 +84859,6 @@ var FlatTintPipeline = new Class({ tx2 = x2 * a + y2 * c + e; ty2 = x2 * b + y2 * d + f; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -85541,7 +84888,7 @@ var FlatTintPipeline = new Class({ * @param {float} srcRotation - [description] * @param {array} path - [description] * @param {float} lineWidth - [description] - * @param {int} lineColor - [description] + * @param {integer} lineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a - [description] * @param {float} b - [description] @@ -85551,9 +84898,8 @@ var FlatTintPipeline = new Class({ * @param {float} f - [description] * @param {boolean} isLastPath - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchStrokePath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, isLastPath, currentMatrix, roundPixels) + batchStrokePath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, isLastPath, currentMatrix) { this.renderer.setPipeline(this); @@ -85579,8 +84925,7 @@ var FlatTintPipeline = new Class({ point0.width / 2, point1.width / 2, point0.rgb, point1.rgb, lineAlpha, a, b, c, d, e, f, - currentMatrix, - roundPixels + currentMatrix ); polylines.push(line); @@ -85640,8 +84985,8 @@ var FlatTintPipeline = new Class({ * @param {float} by - [description] * @param {float} aLineWidth - [description] * @param {float} bLineWidth - [description] - * @param {int} aLineColor - [description] - * @param {int} bLineColor - [description] + * @param {integer} aLineColor - [description] + * @param {integer} bLineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -85650,9 +84995,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -85661,8 +85005,8 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var a0 = currentMatrix[0]; var b0 = currentMatrix[1]; var c0 = currentMatrix[2]; @@ -85705,18 +85049,6 @@ var FlatTintPipeline = new Class({ var bTint = getTint(bLineColor, lineAlpha); var vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - x0 = ((x0 * resolution)|0) / resolution; - y0 = ((y0 * resolution)|0) / resolution; - x1 = ((x1 * resolution)|0) / resolution; - y1 = ((y1 * resolution)|0) / resolution; - x2 = ((x2 * resolution)|0) / resolution; - y2 = ((y2 * resolution)|0) / resolution; - x3 = ((x3 * resolution)|0) / resolution; - y3 = ((y3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = x0; vertexViewF32[vertexOffset + 1] = y0; vertexViewU32[vertexOffset + 2] = bTint; @@ -85725,7 +85057,7 @@ var FlatTintPipeline = new Class({ vertexViewU32[vertexOffset + 5] = aTint; vertexViewF32[vertexOffset + 6] = x2; vertexViewF32[vertexOffset + 7] = y2; - vertexViewU32[vertexOffset + 8] = bTint + vertexViewU32[vertexOffset + 8] = bTint; vertexViewF32[vertexOffset + 9] = x1; vertexViewF32[vertexOffset + 10] = y1; vertexViewU32[vertexOffset + 11] = aTint; @@ -85757,7 +85089,7 @@ var FlatTintPipeline = new Class({ */ batchGraphics: function (graphics, camera) { - if (graphics.commandBuffer.length <= 0) return; + if (graphics.commandBuffer.length <= 0) { return; } this.renderer.setPipeline(this); @@ -85810,7 +85142,9 @@ var FlatTintPipeline = new Class({ var mvd = src * cmb + srd * cmd; var mve = sre * cma + srf * cmc + cme; var mvf = sre * cmb + srf * cmd + cmf; - var roundPixels = camera.roundPixels; + + var pathArrayIndex; + var pathArrayLength; pathArray.length = 0; @@ -85886,52 +85220,58 @@ var FlatTintPipeline = new Class({ break; case Commands.FILL_PATH: - for (var pathArrayIndex = 0, pathArrayLength = pathArray.length; + for (pathArrayIndex = 0, pathArrayLength = pathArray.length; pathArrayIndex < pathArrayLength; ++pathArrayIndex) { this.batchFillPath( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ pathArray[pathArrayIndex].points, fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); } break; case Commands.STROKE_PATH: - for (var pathArrayIndex = 0, pathArrayLength = pathArray.length; + for (pathArrayIndex = 0, pathArrayLength = pathArray.length; pathArrayIndex < pathArrayLength; ++pathArrayIndex) { path = pathArray[pathArrayIndex]; this.batchStrokePath( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ path.points, lineWidth, lineColor, lineAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, path === this._lastPath, - currentMatrix, - roundPixels + currentMatrix ); } break; case Commands.FILL_RECT: this.batchFillRect( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -85939,10 +85279,10 @@ var FlatTintPipeline = new Class({ commands[cmdIndex + 4], fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 4; @@ -85950,8 +85290,10 @@ var FlatTintPipeline = new Class({ case Commands.FILL_TRIANGLE: this.batchFillTriangle( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Triangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -85961,10 +85303,10 @@ var FlatTintPipeline = new Class({ commands[cmdIndex + 6], fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 6; @@ -85972,8 +85314,10 @@ var FlatTintPipeline = new Class({ case Commands.STROKE_TRIANGLE: this.batchStrokeTriangle( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Triangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -85984,10 +85328,10 @@ var FlatTintPipeline = new Class({ lineWidth, lineColor, lineAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 6; @@ -86103,6 +85447,7 @@ var FlatTintPipeline = new Class({ break; default: + // eslint-disable-next-line no-console console.error('Phaser: Invalid Graphics Command ID ' + cmd); break; } @@ -86120,7 +85465,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function () { }, @@ -86133,7 +85478,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Particles.ParticleEmittermanager} emitterManager - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawEmitterManager: function (emitterManager, camera) + drawEmitterManager: function () { }, @@ -86146,7 +85491,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Blitter} blitter - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawBlitter: function (blitter, camera) + drawBlitter: function () { }, @@ -86159,7 +85504,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Sprite} sprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchSprite: function (sprite, camera) + batchSprite: function () { }, @@ -86172,7 +85517,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Mesh} mesh - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchMesh: function (mesh, camera) + batchMesh: function () { }, @@ -86185,7 +85530,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchBitmapText: function (bitmapText, camera) + batchBitmapText: function () { }, @@ -86198,7 +85543,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchDynamicBitmapText: function (bitmapText, camera) + batchDynamicBitmapText: function () { }, @@ -86211,7 +85556,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Text} text - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchText: function (text, camera) + batchText: function () { }, @@ -86224,7 +85569,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchDynamicTilemapLayer: function (tilemapLayer, camera) + batchDynamicTilemapLayer: function () { }, @@ -86237,7 +85582,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchTileSprite: function (tileSprite, camera) + batchTileSprite: function () { } @@ -86247,37 +85592,37 @@ module.exports = FlatTintPipeline; /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n" /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n" /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n" /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n" /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n" /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86396,7 +85741,7 @@ module.exports = DebugHeader; /***/ }), -/* 514 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86418,18 +85763,18 @@ module.exports = { os: __webpack_require__(67), browser: __webpack_require__(82), - features: __webpack_require__(125), - input: __webpack_require__(515), - audio: __webpack_require__(516), - video: __webpack_require__(517), - fullscreen: __webpack_require__(518), + features: __webpack_require__(124), + input: __webpack_require__(517), + audio: __webpack_require__(518), + video: __webpack_require__(519), + fullscreen: __webpack_require__(520), canvasFeatures: __webpack_require__(232) }; /***/ }), -/* 515 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86509,7 +85854,7 @@ module.exports = init(); /***/ }), -/* 516 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86635,7 +85980,7 @@ module.exports = init(); /***/ }), -/* 517 */ +/* 519 */ /***/ (function(module, exports) { /** @@ -86721,7 +86066,7 @@ module.exports = init(); /***/ }), -/* 518 */ +/* 520 */ /***/ (function(module, exports) { /** @@ -86820,7 +86165,7 @@ module.exports = init(); /***/ }), -/* 519 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86829,7 +86174,7 @@ module.exports = init(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(520); +var AdvanceKeyCombo = __webpack_require__(522); /** * Used internally by the KeyCombo class. @@ -86900,7 +86245,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 520 */ +/* 522 */ /***/ (function(module, exports) { /** @@ -86941,7 +86286,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 521 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -86975,7 +86320,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 522 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86997,7 +86342,7 @@ module.exports = KeyMap; /***/ }), -/* 523 */ +/* 525 */ /***/ (function(module, exports) { /** @@ -87052,7 +86397,7 @@ module.exports = ProcessKeyDown; /***/ }), -/* 524 */ +/* 526 */ /***/ (function(module, exports) { /** @@ -87102,7 +86447,7 @@ module.exports = ProcessKeyUp; /***/ }), -/* 525 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87164,7 +86509,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 526 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87210,7 +86555,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 527 */ +/* 529 */ /***/ (function(module, exports) { /** @@ -87258,7 +86603,7 @@ module.exports = InjectionMap; /***/ }), -/* 528 */ +/* 530 */ /***/ (function(module, exports) { /** @@ -87291,7 +86636,7 @@ module.exports = Canvas; /***/ }), -/* 529 */ +/* 531 */ /***/ (function(module, exports) { /** @@ -87324,7 +86669,7 @@ module.exports = Image; /***/ }), -/* 530 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87429,7 +86774,7 @@ module.exports = JSONArray; /***/ }), -/* 531 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87526,7 +86871,7 @@ module.exports = JSONHash; /***/ }), -/* 532 */ +/* 534 */ /***/ (function(module, exports) { /** @@ -87585,7 +86930,7 @@ var Pyxel = function (texture, json) frames[i].y, tilewidth, tileheight, - "frame_" + i // No names are included in pyxel tilemap data. + 'frame_' + i // No names are included in pyxel tilemap data. )); // No trim data is included. @@ -87599,7 +86944,7 @@ module.exports = Pyxel; /***/ }), -/* 533 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87711,7 +87056,7 @@ module.exports = SpriteSheet; /***/ }), -/* 534 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87894,7 +87239,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 535 */ +/* 537 */ /***/ (function(module, exports) { /** @@ -87977,7 +87322,7 @@ module.exports = StarlingXML; /***/ }), -/* 536 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -87994,7 +87339,9 @@ var addFrame = function (texture, sourceIndex, name, frame) var y = imageHeight - frame.y - frame.height; - var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); + // var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); + + texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); // console.log('name', name, 'rect', frame.x, y, frame.width, frame.height); @@ -88043,8 +87390,9 @@ var UnityYAML = function (texture, sourceIndex, yaml) var prevSprite = ''; var currentSprite = ''; var rect = { x: 0, y: 0, width: 0, height: 0 }; - var pivot = { x: 0, y: 0 }; - var border = { x: 0, y: 0, z: 0, w: 0 }; + + // var pivot = { x: 0, y: 0 }; + // var border = { x: 0, y: 0, z: 0, w: 0 }; for (var i = 0; i < data.length; i++) { @@ -88087,13 +87435,13 @@ var UnityYAML = function (texture, sourceIndex, yaml) rect[key] = parseInt(value, 10); break; - case 'pivot': - pivot = eval('var obj = ' + value); - break; + // case 'pivot': + // pivot = eval('var obj = ' + value); + // break; - case 'border': - border = eval('var obj = ' + value); - break; + // case 'border': + // border = eval('var obj = ' + value); + // break; } } @@ -88141,7 +87489,7 @@ TextureImporter: /***/ }), -/* 537 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88763,7 +88111,7 @@ module.exports = TimeStep; /***/ }), -/* 538 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -88877,7 +88225,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 539 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88892,10 +88240,10 @@ module.exports = VisibilityHandler; var GameObjects = { - DisplayList: __webpack_require__(540), + DisplayList: __webpack_require__(542), GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), - UpdateList: __webpack_require__(541), + UpdateList: __webpack_require__(543), Components: __webpack_require__(12), @@ -88908,7 +88256,7 @@ var GameObjects = { Particles: __webpack_require__(137), PathFollower: __webpack_require__(287), Sprite3D: __webpack_require__(81), - Sprite: __webpack_require__(38), + Sprite: __webpack_require__(37), Text: __webpack_require__(139), TileSprite: __webpack_require__(140), Zone: __webpack_require__(77), @@ -88916,34 +88264,34 @@ var GameObjects = { // Game Object Factories Factories: { - Blitter: __webpack_require__(620), - DynamicBitmapText: __webpack_require__(621), - Graphics: __webpack_require__(622), - Group: __webpack_require__(623), - Image: __webpack_require__(624), - Particles: __webpack_require__(625), - PathFollower: __webpack_require__(626), - Sprite3D: __webpack_require__(627), - Sprite: __webpack_require__(628), - StaticBitmapText: __webpack_require__(629), - Text: __webpack_require__(630), - TileSprite: __webpack_require__(631), - Zone: __webpack_require__(632) + Blitter: __webpack_require__(622), + DynamicBitmapText: __webpack_require__(623), + Graphics: __webpack_require__(624), + Group: __webpack_require__(625), + Image: __webpack_require__(626), + Particles: __webpack_require__(627), + PathFollower: __webpack_require__(628), + Sprite3D: __webpack_require__(629), + Sprite: __webpack_require__(630), + StaticBitmapText: __webpack_require__(631), + Text: __webpack_require__(632), + TileSprite: __webpack_require__(633), + Zone: __webpack_require__(634) }, Creators: { - Blitter: __webpack_require__(633), - DynamicBitmapText: __webpack_require__(634), - Graphics: __webpack_require__(635), - Group: __webpack_require__(636), - Image: __webpack_require__(637), - Particles: __webpack_require__(638), - Sprite3D: __webpack_require__(639), - Sprite: __webpack_require__(640), - StaticBitmapText: __webpack_require__(641), - Text: __webpack_require__(642), - TileSprite: __webpack_require__(643), - Zone: __webpack_require__(644) + Blitter: __webpack_require__(635), + DynamicBitmapText: __webpack_require__(636), + Graphics: __webpack_require__(637), + Group: __webpack_require__(638), + Image: __webpack_require__(639), + Particles: __webpack_require__(640), + Sprite3D: __webpack_require__(641), + Sprite: __webpack_require__(642), + StaticBitmapText: __webpack_require__(643), + Text: __webpack_require__(644), + TileSprite: __webpack_require__(645), + Zone: __webpack_require__(646) } }; @@ -88951,26 +88299,26 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(89); + GameObjects.Mesh = __webpack_require__(88); GameObjects.Quad = __webpack_require__(141); - GameObjects.Factories.Mesh = __webpack_require__(648); - GameObjects.Factories.Quad = __webpack_require__(649); + GameObjects.Factories.Mesh = __webpack_require__(650); + GameObjects.Factories.Quad = __webpack_require__(651); - GameObjects.Creators.Mesh = __webpack_require__(650); - GameObjects.Creators.Quad = __webpack_require__(651); + GameObjects.Creators.Mesh = __webpack_require__(652); + GameObjects.Creators.Quad = __webpack_require__(653); GameObjects.Light = __webpack_require__(290); __webpack_require__(291); - __webpack_require__(652); + __webpack_require__(654); } module.exports = GameObjects; /***/ }), -/* 540 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88980,7 +88328,7 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(87); +var List = __webpack_require__(86); var PluginManager = __webpack_require__(11); var StableSort = __webpack_require__(264); @@ -89142,7 +88490,7 @@ module.exports = DisplayList; /***/ }), -/* 541 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89275,7 +88623,7 @@ var UpdateList = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time, delta) + preUpdate: function () { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; @@ -89300,9 +88648,6 @@ var UpdateList = new Class({ { this._list.splice(index, 1); } - - // Pool them? - // gameObject.destroy(); } // Move pending to active @@ -89415,7 +88760,7 @@ module.exports = UpdateList; /***/ }), -/* 542 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89449,7 +88794,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 543 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89568,83 +88913,83 @@ var ParseRetroFont = function (scene, config) * @constant * @type {string} */ -ParseRetroFont.TEXT_SET1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; +ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; /** * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET2 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; +ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '; /** * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"; +ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789'; /** * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET5 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789"; +ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789'; /** * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' * @constant * @type {string} */ -ParseRetroFont.TEXT_SET6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' "; +ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' '; /** * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET7 = "AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39"; +ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39'; /** * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET8 = "0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! * @constant * @type {string} */ -ParseRetroFont.TEXT_SET9 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!"; +ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!'; /** * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET10 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET11 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"; +ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789'; module.exports = ParseRetroFont; /***/ }), -/* 544 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89658,12 +89003,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(545); + renderWebGL = __webpack_require__(547); } if (true) { - renderCanvas = __webpack_require__(546); + renderCanvas = __webpack_require__(548); } module.exports = { @@ -89675,7 +89020,7 @@ module.exports = { /***/ }), -/* 545 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89717,7 +89062,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 546 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89784,7 +89129,6 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, var textureX = textureFrame.cutX; var textureY = textureFrame.cutY; - var rotation = 0; var scale = (src.fontSize / src.fontData.size); // Blend Mode @@ -89810,6 +89154,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, ctx.save(); ctx.translate((src.x - cameraScrollX) + src.frame.x, (src.y - cameraScrollY) + src.frame.y); ctx.rotate(src.rotation); + ctx.translate(-src.displayOriginX, -src.displayOriginY); ctx.scale(src.scaleX, src.scaleY); // ctx.fillStyle = 'rgba(255,0,255,0.5)'; @@ -89866,6 +89211,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, ctx.save(); ctx.translate(x, y); ctx.scale(scale, scale); + // ctx.fillRect(0, 0, glyphW, glyphH); ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH); ctx.restore(); @@ -89878,7 +89224,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 547 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89892,12 +89238,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(548); + renderWebGL = __webpack_require__(550); } if (true) { - renderCanvas = __webpack_require__(549); + renderCanvas = __webpack_require__(551); } module.exports = { @@ -89909,7 +89255,7 @@ module.exports = { /***/ }), -/* 548 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89948,7 +89294,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 549 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89984,7 +89330,6 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca renderer.setBlendMode(src.blendMode); - var ca = renderer.currentAlpha; var ctx = renderer.gameContext; var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX; var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY; @@ -90032,7 +89377,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 550 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90377,7 +89722,7 @@ module.exports = Bob; /***/ }), -/* 551 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90391,12 +89736,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(552); + renderWebGL = __webpack_require__(554); } if (true) { - renderCanvas = __webpack_require__(553); + renderCanvas = __webpack_require__(555); } module.exports = { @@ -90408,7 +89753,7 @@ module.exports = { /***/ }), -/* 552 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90450,7 +89795,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 553 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90545,6 +89890,7 @@ var DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPerc ctx.save(); ctx.translate(src.x, src.y); ctx.rotate(src.rotation); + ctx.translate(-src.displayOriginX, -src.displayOriginY); ctx.scale(src.scaleX, src.scaleY); if (src.cropWidth > 0 && src.cropHeight > 0) @@ -90642,7 +89988,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 554 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -90676,7 +90022,7 @@ module.exports = Area; /***/ }), -/* 555 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90706,7 +90052,7 @@ module.exports = Clone; /***/ }), -/* 556 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90737,7 +90083,7 @@ module.exports = ContainsPoint; /***/ }), -/* 557 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90773,7 +90119,7 @@ module.exports = ContainsRect; /***/ }), -/* 558 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -90803,7 +90149,7 @@ module.exports = CopyFrom; /***/ }), -/* 559 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -90838,7 +90184,7 @@ module.exports = Equals; /***/ }), -/* 560 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90876,7 +90222,7 @@ module.exports = GetBounds; /***/ }), -/* 561 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -90909,7 +90255,7 @@ module.exports = Offset; /***/ }), -/* 562 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -90941,7 +90287,7 @@ module.exports = OffsetPoint; /***/ }), -/* 563 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90955,7 +90301,7 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(564); + renderWebGL = __webpack_require__(566); // Needed for Graphics.generateTexture renderCanvas = __webpack_require__(271); @@ -90975,7 +90321,7 @@ module.exports = { /***/ }), -/* 564 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91014,7 +90360,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 565 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91028,12 +90374,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(566); + renderWebGL = __webpack_require__(568); } if (true) { - renderCanvas = __webpack_require__(567); + renderCanvas = __webpack_require__(569); } module.exports = { @@ -91045,7 +90391,7 @@ module.exports = { /***/ }), -/* 566 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91084,7 +90430,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 567 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91123,7 +90469,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 568 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91264,7 +90610,7 @@ var GravityWell = new Class({ * @param {number} delta - The delta time in ms. * @param {float} step - The delta value divided by 1000. */ - update: function (particle, delta, step) + update: function (particle, delta) { var x = this.x - particle.x; var y = this.y - particle.y; @@ -91338,7 +90684,7 @@ module.exports = GravityWell; /***/ }), -/* 569 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91347,23 +90693,22 @@ module.exports = GravityWell; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(570); -var EdgeZone = __webpack_require__(571); -var EmitterOp = __webpack_require__(572); +var DeathZone = __webpack_require__(572); +var EdgeZone = __webpack_require__(573); +var EmitterOp = __webpack_require__(574); var GetFastValue = __webpack_require__(1); var GetRandomElement = __webpack_require__(138); -var GetValue = __webpack_require__(4); var HasAny = __webpack_require__(286); var HasValue = __webpack_require__(72); -var Particle = __webpack_require__(606); -var RandomZone = __webpack_require__(607); +var Particle = __webpack_require__(608); +var RandomZone = __webpack_require__(609); var Rectangle = __webpack_require__(8); var StableSort = __webpack_require__(264); var Vector2 = __webpack_require__(6); -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); /** * @classdesc @@ -92285,7 +91630,7 @@ var ParticleEmitter = new Class({ if (this._frameCounter === this.frameQuantity) { this._frameCounter = 0; - this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); + this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); } return frame; @@ -92329,7 +91674,8 @@ var ParticleEmitter = new Class({ else if (t === 'object') { var frameConfig = frames; - var frames = GetFastValue(frameConfig, 'frames', null); + + frames = GetFastValue(frameConfig, 'frames', null); if (frames) { @@ -92411,10 +91757,10 @@ var ParticleEmitter = new Class({ { var obj = x; - var x = obj.x; - var y = obj.y; - var width = (HasValue(obj, 'w')) ? obj.w : obj.width; - var height = (HasValue(obj, 'h')) ? obj.h : obj.height; + x = obj.x; + y = obj.y; + width = (HasValue(obj, 'w')) ? obj.w : obj.width; + height = (HasValue(obj, 'h')) ? obj.h : obj.height; } if (this.bounds) @@ -93319,7 +92665,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 570 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93397,7 +92743,7 @@ module.exports = DeathZone; /***/ }), -/* 571 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93407,7 +92753,6 @@ module.exports = DeathZone; */ var Class = __webpack_require__(0); -var Wrap = __webpack_require__(42); /** * @classdesc @@ -93637,7 +92982,7 @@ module.exports = EdgeZone; /***/ }), -/* 572 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93650,7 +92995,7 @@ var Class = __webpack_require__(0); var FloatBetween = __webpack_require__(273); var GetEaseFunction = __webpack_require__(71); var GetFastValue = __webpack_require__(1); -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); /** * @classdesc @@ -94180,11 +93525,10 @@ var EmitterOp = new Class({ * @param {Phaser.GameObjects.Particles.Particle} particle - [description] * @param {string} key - [description] * @param {float} t - The T value (between 0 and 1) - * @param {number} value - [description] * * @return {number} [description] */ - easeValueUpdate: function (particle, key, t, value) + easeValueUpdate: function (particle, key, t) { var data = particle.data[key]; @@ -94197,7 +93541,7 @@ module.exports = EmitterOp; /***/ }), -/* 573 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94278,7 +93622,7 @@ module.exports = { /***/ }), -/* 574 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -94309,7 +93653,7 @@ module.exports = In; /***/ }), -/* 575 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -94340,7 +93684,7 @@ module.exports = Out; /***/ }), -/* 576 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -94380,7 +93724,7 @@ module.exports = InOut; /***/ }), -/* 577 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -94425,7 +93769,7 @@ module.exports = In; /***/ }), -/* 578 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -94468,7 +93812,7 @@ module.exports = Out; /***/ }), -/* 579 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -94532,7 +93876,7 @@ module.exports = InOut; /***/ }), -/* 580 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -94560,7 +93904,7 @@ module.exports = In; /***/ }), -/* 581 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -94588,7 +93932,7 @@ module.exports = Out; /***/ }), -/* 582 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -94623,7 +93967,7 @@ module.exports = InOut; /***/ }), -/* 583 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -94651,7 +93995,7 @@ module.exports = In; /***/ }), -/* 584 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -94679,7 +94023,7 @@ module.exports = Out; /***/ }), -/* 585 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -94714,7 +94058,7 @@ module.exports = InOut; /***/ }), -/* 586 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -94769,7 +94113,7 @@ module.exports = In; /***/ }), -/* 587 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -94824,7 +94168,7 @@ module.exports = Out; /***/ }), -/* 588 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -94886,7 +94230,7 @@ module.exports = InOut; /***/ }), -/* 589 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -94914,7 +94258,7 @@ module.exports = In; /***/ }), -/* 590 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -94942,7 +94286,7 @@ module.exports = Out; /***/ }), -/* 591 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -94977,7 +94321,7 @@ module.exports = InOut; /***/ }), -/* 592 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -95005,7 +94349,7 @@ module.exports = Linear; /***/ }), -/* 593 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -95033,7 +94377,7 @@ module.exports = In; /***/ }), -/* 594 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -95061,7 +94405,7 @@ module.exports = Out; /***/ }), -/* 595 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -95096,7 +94440,7 @@ module.exports = InOut; /***/ }), -/* 596 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -95124,7 +94468,7 @@ module.exports = In; /***/ }), -/* 597 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -95152,7 +94496,7 @@ module.exports = Out; /***/ }), -/* 598 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -95187,7 +94531,7 @@ module.exports = InOut; /***/ }), -/* 599 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -95215,7 +94559,7 @@ module.exports = In; /***/ }), -/* 600 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -95243,7 +94587,7 @@ module.exports = Out; /***/ }), -/* 601 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -95278,7 +94622,7 @@ module.exports = InOut; /***/ }), -/* 602 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -95317,7 +94661,7 @@ module.exports = In; /***/ }), -/* 603 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -95356,7 +94700,7 @@ module.exports = Out; /***/ }), -/* 604 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -95395,7 +94739,7 @@ module.exports = InOut; /***/ }), -/* 605 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -95437,7 +94781,7 @@ module.exports = Stepped; /***/ }), -/* 606 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95447,8 +94791,8 @@ module.exports = Stepped; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); -var DistanceBetween = __webpack_require__(43); +var DegToRad = __webpack_require__(35); +var DistanceBetween = __webpack_require__(41); /** * @classdesc @@ -96038,7 +95382,7 @@ module.exports = Particle; /***/ }), -/* 607 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96111,7 +95455,7 @@ module.exports = RandomZone; /***/ }), -/* 608 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96125,12 +95469,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(609); + renderWebGL = __webpack_require__(611); } if (true) { - renderCanvas = __webpack_require__(610); + renderCanvas = __webpack_require__(612); } module.exports = { @@ -96142,7 +95486,7 @@ module.exports = { /***/ }), -/* 609 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96183,7 +95527,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 610 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96280,7 +95624,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 611 */ +/* 613 */ /***/ (function(module, exports) { /** @@ -96359,7 +95703,7 @@ module.exports = GetTextSize; /***/ }), -/* 612 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96373,12 +95717,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(613); + renderWebGL = __webpack_require__(615); } if (true) { - renderCanvas = __webpack_require__(614); + renderCanvas = __webpack_require__(616); } module.exports = { @@ -96390,7 +95734,7 @@ module.exports = { /***/ }), -/* 613 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96435,7 +95779,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 614 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96468,7 +95812,8 @@ var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camer } var ctx = renderer.currentContext; - var resolution = src.resolution; + + // var resolution = src.resolution; // Blend Mode if (renderer.currentBlendMode !== src.blendMode) @@ -96493,7 +95838,8 @@ var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camer var canvas = src.canvas; ctx.save(); - //ctx.scale(1.0 / resolution, 1.0 / resolution); + + // ctx.scale(1.0 / resolution, 1.0 / resolution); ctx.translate(src.x - camera.scrollX * src.scrollFactorX, src.y - camera.scrollY * src.scrollFactorY); ctx.rotate(src.rotation); ctx.scale(src.scaleX, src.scaleY); @@ -96507,7 +95853,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 615 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96519,7 +95865,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var MeasureText = __webpack_require__(616); +var MeasureText = __webpack_require__(618); // Key: [ Object Key, Default Value ] @@ -97422,7 +96768,7 @@ module.exports = TextStyle; /***/ }), -/* 616 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97551,7 +96897,7 @@ module.exports = MeasureText; /***/ }), -/* 617 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97565,12 +96911,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(618); + renderWebGL = __webpack_require__(620); } if (true) { - renderCanvas = __webpack_require__(619); + renderCanvas = __webpack_require__(621); } module.exports = { @@ -97582,7 +96928,7 @@ module.exports = { /***/ }), -/* 618 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97623,7 +96969,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 619 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97697,7 +97043,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 620 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97739,7 +97085,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 621 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97782,7 +97128,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 622 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97821,7 +97167,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 623 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97867,7 +97213,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 624 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97909,7 +97255,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 625 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97955,7 +97301,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 626 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98003,7 +97349,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 627 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98051,7 +97397,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) /***/ }), -/* 628 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98061,7 +97407,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -98098,7 +97444,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 629 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98141,7 +97487,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) /***/ }), -/* 630 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98183,7 +97529,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 631 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98227,7 +97573,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 632 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98269,7 +97615,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 633 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98311,7 +97657,7 @@ GameObjectCreator.register('blitter', function (config) /***/ }), -/* 634 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98355,7 +97701,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) /***/ }), -/* 635 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98388,7 +97734,7 @@ GameObjectCreator.register('graphics', function (config) /***/ }), -/* 636 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98421,7 +97767,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 637 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98463,7 +97809,7 @@ GameObjectCreator.register('image', function (config) /***/ }), -/* 638 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98520,7 +97866,7 @@ GameObjectCreator.register('particles', function (config) /***/ }), -/* 639 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98569,7 +97915,7 @@ GameObjectCreator.register('sprite3D', function (config) /***/ }), -/* 640 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98582,7 +97928,7 @@ var BuildGameObject = __webpack_require__(21); var BuildGameObjectAnimation = __webpack_require__(289); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * Creates a new Sprite Game Object and returns it. @@ -98618,7 +97964,7 @@ GameObjectCreator.register('sprite', function (config) /***/ }), -/* 641 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98650,6 +97996,7 @@ GameObjectCreator.register('bitmapText', function (config) var font = GetValue(config, 'font', ''); var text = GetAdvancedValue(config, 'text', ''); var size = GetAdvancedValue(config, 'size', false); + // var align = GetValue(config, 'align', 'left'); var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size); @@ -98663,7 +98010,7 @@ GameObjectCreator.register('bitmapText', function (config) /***/ }), -/* 642 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98742,7 +98089,7 @@ GameObjectCreator.register('text', function (config) /***/ }), -/* 643 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98788,7 +98135,7 @@ GameObjectCreator.register('tileSprite', function (config) /***/ }), -/* 644 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98827,7 +98174,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 645 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98841,12 +98188,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(646); + renderWebGL = __webpack_require__(648); } if (true) { - renderCanvas = __webpack_require__(647); + renderCanvas = __webpack_require__(649); } module.exports = { @@ -98858,7 +98205,7 @@ module.exports = { /***/ }), -/* 646 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98897,7 +98244,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 647 */ +/* 649 */ /***/ (function(module, exports) { /** @@ -98918,7 +98265,7 @@ module.exports = MeshWebGLRenderer; * @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 (renderer, src, interpolationPercentage, camera) +var MeshCanvasRenderer = function () { }; @@ -98926,7 +98273,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 648 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98935,7 +98282,7 @@ module.exports = MeshCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Mesh = __webpack_require__(89); +var Mesh = __webpack_require__(88); var GameObjectFactory = __webpack_require__(9); /** @@ -98962,7 +98309,7 @@ if (true) { GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame) { - return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, key, frame)); + return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame)); }); } @@ -98976,7 +98323,7 @@ if (true) /***/ }), -/* 649 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99022,7 +98369,7 @@ if (true) /***/ }), -/* 650 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99035,7 +98382,7 @@ var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var Mesh = __webpack_require__(89); +var Mesh = __webpack_require__(88); /** * Creates a new Mesh Game Object and returns it. @@ -99069,7 +98416,7 @@ GameObjectCreator.register('mesh', function (config) /***/ }), -/* 651 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99113,7 +98460,7 @@ GameObjectCreator.register('quad', function (config) /***/ }), -/* 652 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99208,7 +98555,7 @@ module.exports = LightsPlugin; /***/ }), -/* 653 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99219,27 +98566,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(63); -Circle.Area = __webpack_require__(654); +Circle.Area = __webpack_require__(656); Circle.Circumference = __webpack_require__(181); -Circle.CircumferencePoint = __webpack_require__(105); -Circle.Clone = __webpack_require__(655); +Circle.CircumferencePoint = __webpack_require__(104); +Circle.Clone = __webpack_require__(657); Circle.Contains = __webpack_require__(32); -Circle.ContainsPoint = __webpack_require__(656); -Circle.ContainsRect = __webpack_require__(657); -Circle.CopyFrom = __webpack_require__(658); -Circle.Equals = __webpack_require__(659); -Circle.GetBounds = __webpack_require__(660); +Circle.ContainsPoint = __webpack_require__(658); +Circle.ContainsRect = __webpack_require__(659); +Circle.CopyFrom = __webpack_require__(660); +Circle.Equals = __webpack_require__(661); +Circle.GetBounds = __webpack_require__(662); Circle.GetPoint = __webpack_require__(179); Circle.GetPoints = __webpack_require__(180); -Circle.Offset = __webpack_require__(661); -Circle.OffsetPoint = __webpack_require__(662); -Circle.Random = __webpack_require__(106); +Circle.Offset = __webpack_require__(663); +Circle.OffsetPoint = __webpack_require__(664); +Circle.Random = __webpack_require__(105); module.exports = Circle; /***/ }), -/* 654 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -99267,7 +98614,7 @@ module.exports = Area; /***/ }), -/* 655 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99297,7 +98644,7 @@ module.exports = Clone; /***/ }), -/* 656 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99328,7 +98675,7 @@ module.exports = ContainsPoint; /***/ }), -/* 657 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99364,7 +98711,7 @@ module.exports = ContainsRect; /***/ }), -/* 658 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -99394,7 +98741,7 @@ module.exports = CopyFrom; /***/ }), -/* 659 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -99428,7 +98775,7 @@ module.exports = Equals; /***/ }), -/* 660 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99466,7 +98813,7 @@ module.exports = GetBounds; /***/ }), -/* 661 */ +/* 663 */ /***/ (function(module, exports) { /** @@ -99499,7 +98846,7 @@ module.exports = Offset; /***/ }), -/* 662 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -99531,7 +98878,7 @@ module.exports = OffsetPoint; /***/ }), -/* 663 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99540,7 +98887,7 @@ module.exports = OffsetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var DistanceBetween = __webpack_require__(43); +var DistanceBetween = __webpack_require__(41); /** * [description] @@ -99562,7 +98909,7 @@ module.exports = CircleToCircle; /***/ }), -/* 664 */ +/* 666 */ /***/ (function(module, exports) { /** @@ -99616,7 +98963,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 665 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99659,7 +99006,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 666 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -99760,7 +99107,7 @@ module.exports = LineToRectangle; /***/ }), -/* 667 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99801,7 +99148,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 668 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99810,7 +99157,7 @@ module.exports = PointToLineSegment; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToLine = __webpack_require__(90); +var LineToLine = __webpack_require__(89); var Contains = __webpack_require__(33); var ContainsArray = __webpack_require__(142); var Decompose = __webpack_require__(297); @@ -99894,7 +99241,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 669 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -99934,7 +99281,7 @@ module.exports = RectangleToValues; /***/ }), -/* 670 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99959,7 +99306,7 @@ var Contains = __webpack_require__(53); */ var TriangleToCircle = function (triangle, circle) { - // First the cheapest ones: + // First the cheapest ones: if ( triangle.left > circle.right || @@ -99997,7 +99344,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 671 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100007,7 +99354,7 @@ module.exports = TriangleToCircle; */ var Contains = __webpack_require__(53); -var LineToLine = __webpack_require__(90); +var LineToLine = __webpack_require__(89); /** * [description] @@ -100051,7 +99398,7 @@ module.exports = TriangleToLine; /***/ }), -/* 672 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100062,7 +99409,7 @@ module.exports = TriangleToLine; var ContainsArray = __webpack_require__(142); var Decompose = __webpack_require__(298); -var LineToLine = __webpack_require__(90); +var LineToLine = __webpack_require__(89); /** * [description] @@ -100139,7 +99486,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 673 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100152,35 +99499,35 @@ var Line = __webpack_require__(299); Line.Angle = __webpack_require__(54); Line.BresenhamPoints = __webpack_require__(189); -Line.CenterOn = __webpack_require__(674); -Line.Clone = __webpack_require__(675); -Line.CopyFrom = __webpack_require__(676); -Line.Equals = __webpack_require__(677); -Line.GetMidPoint = __webpack_require__(678); -Line.GetNormal = __webpack_require__(679); +Line.CenterOn = __webpack_require__(676); +Line.Clone = __webpack_require__(677); +Line.CopyFrom = __webpack_require__(678); +Line.Equals = __webpack_require__(679); +Line.GetMidPoint = __webpack_require__(680); +Line.GetNormal = __webpack_require__(681); Line.GetPoint = __webpack_require__(300); -Line.GetPoints = __webpack_require__(109); -Line.Height = __webpack_require__(680); +Line.GetPoints = __webpack_require__(108); +Line.Height = __webpack_require__(682); Line.Length = __webpack_require__(65); Line.NormalAngle = __webpack_require__(301); -Line.NormalX = __webpack_require__(681); -Line.NormalY = __webpack_require__(682); -Line.Offset = __webpack_require__(683); -Line.PerpSlope = __webpack_require__(684); -Line.Random = __webpack_require__(111); -Line.ReflectAngle = __webpack_require__(685); -Line.Rotate = __webpack_require__(686); -Line.RotateAroundPoint = __webpack_require__(687); +Line.NormalX = __webpack_require__(683); +Line.NormalY = __webpack_require__(684); +Line.Offset = __webpack_require__(685); +Line.PerpSlope = __webpack_require__(686); +Line.Random = __webpack_require__(110); +Line.ReflectAngle = __webpack_require__(687); +Line.Rotate = __webpack_require__(688); +Line.RotateAroundPoint = __webpack_require__(689); Line.RotateAroundXY = __webpack_require__(143); -Line.SetToAngle = __webpack_require__(688); -Line.Slope = __webpack_require__(689); -Line.Width = __webpack_require__(690); +Line.SetToAngle = __webpack_require__(690); +Line.Slope = __webpack_require__(691); +Line.Width = __webpack_require__(692); module.exports = Line; /***/ }), -/* 674 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -100220,7 +99567,7 @@ module.exports = CenterOn; /***/ }), -/* 675 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100250,7 +99597,7 @@ module.exports = Clone; /***/ }), -/* 676 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -100279,7 +99626,7 @@ module.exports = CopyFrom; /***/ }), -/* 677 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -100313,7 +99660,7 @@ module.exports = Equals; /***/ }), -/* 678 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100349,7 +99696,7 @@ module.exports = GetMidPoint; /***/ }), -/* 679 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100389,7 +99736,7 @@ module.exports = GetNormal; /***/ }), -/* 680 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -100417,7 +99764,7 @@ module.exports = Height; /***/ }), -/* 681 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100448,7 +99795,7 @@ module.exports = NormalX; /***/ }), -/* 682 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100479,7 +99826,7 @@ module.exports = NormalY; /***/ }), -/* 683 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -100515,7 +99862,7 @@ module.exports = Offset; /***/ }), -/* 684 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -100543,7 +99890,7 @@ module.exports = PerpSlope; /***/ }), -/* 685 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100579,7 +99926,7 @@ module.exports = ReflectAngle; /***/ }), -/* 686 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100613,7 +99960,7 @@ module.exports = Rotate; /***/ }), -/* 687 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100645,7 +99992,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 688 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -100683,7 +100030,7 @@ module.exports = SetToAngle; /***/ }), -/* 689 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -100711,7 +100058,7 @@ module.exports = Slope; /***/ }), -/* 690 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -100739,7 +100086,7 @@ module.exports = Width; /***/ }), -/* 691 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100750,27 +100097,27 @@ module.exports = Width; var Point = __webpack_require__(5); -Point.Ceil = __webpack_require__(692); -Point.Clone = __webpack_require__(693); -Point.CopyFrom = __webpack_require__(694); -Point.Equals = __webpack_require__(695); -Point.Floor = __webpack_require__(696); -Point.GetCentroid = __webpack_require__(697); +Point.Ceil = __webpack_require__(694); +Point.Clone = __webpack_require__(695); +Point.CopyFrom = __webpack_require__(696); +Point.Equals = __webpack_require__(697); +Point.Floor = __webpack_require__(698); +Point.GetCentroid = __webpack_require__(699); Point.GetMagnitude = __webpack_require__(302); Point.GetMagnitudeSq = __webpack_require__(303); -Point.GetRectangleFromPoints = __webpack_require__(698); -Point.Interpolate = __webpack_require__(699); -Point.Invert = __webpack_require__(700); -Point.Negative = __webpack_require__(701); -Point.Project = __webpack_require__(702); -Point.ProjectUnit = __webpack_require__(703); -Point.SetMagnitude = __webpack_require__(704); +Point.GetRectangleFromPoints = __webpack_require__(700); +Point.Interpolate = __webpack_require__(701); +Point.Invert = __webpack_require__(702); +Point.Negative = __webpack_require__(703); +Point.Project = __webpack_require__(704); +Point.ProjectUnit = __webpack_require__(705); +Point.SetMagnitude = __webpack_require__(706); module.exports = Point; /***/ }), -/* 692 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -100798,7 +100145,7 @@ module.exports = Ceil; /***/ }), -/* 693 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100828,7 +100175,7 @@ module.exports = Clone; /***/ }), -/* 694 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -100857,7 +100204,7 @@ module.exports = CopyFrom; /***/ }), -/* 695 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -100886,7 +100233,7 @@ module.exports = Equals; /***/ }), -/* 696 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -100914,7 +100261,7 @@ module.exports = Floor; /***/ }), -/* 697 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100975,7 +100322,7 @@ module.exports = GetCentroid; /***/ }), -/* 698 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101043,7 +100390,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 699 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101082,7 +100429,7 @@ module.exports = Interpolate; /***/ }), -/* 700 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -101110,7 +100457,7 @@ module.exports = Invert; /***/ }), -/* 701 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101143,7 +100490,7 @@ module.exports = Negative; /***/ }), -/* 702 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101187,7 +100534,7 @@ module.exports = Project; /***/ }), -/* 703 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101229,7 +100576,7 @@ module.exports = ProjectUnit; /***/ }), -/* 704 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101271,7 +100618,7 @@ module.exports = SetMagnitude; /***/ }), -/* 705 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101282,17 +100629,17 @@ module.exports = SetMagnitude; var Polygon = __webpack_require__(304); -Polygon.Clone = __webpack_require__(706); +Polygon.Clone = __webpack_require__(708); Polygon.Contains = __webpack_require__(144); -Polygon.ContainsPoint = __webpack_require__(707); -Polygon.GetAABB = __webpack_require__(708); -Polygon.GetNumberArray = __webpack_require__(709); +Polygon.ContainsPoint = __webpack_require__(709); +Polygon.GetAABB = __webpack_require__(710); +Polygon.GetNumberArray = __webpack_require__(711); module.exports = Polygon; /***/ }), -/* 706 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101322,7 +100669,7 @@ module.exports = Clone; /***/ }), -/* 707 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101353,7 +100700,7 @@ module.exports = ContainsPoint; /***/ }), -/* 708 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101407,7 +100754,7 @@ module.exports = GetAABB; /***/ }), -/* 709 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -101446,7 +100793,7 @@ module.exports = GetNumberArray; /***/ }), -/* 710 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -101474,7 +100821,7 @@ module.exports = Area; /***/ }), -/* 711 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -101505,7 +100852,7 @@ module.exports = Ceil; /***/ }), -/* 712 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -101538,7 +100885,7 @@ module.exports = CeilAll; /***/ }), -/* 713 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101568,7 +100915,7 @@ module.exports = Clone; /***/ }), -/* 714 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101599,7 +100946,7 @@ module.exports = ContainsPoint; /***/ }), -/* 715 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -101632,7 +100979,7 @@ var ContainsRect = function (rectA, rectB) return ( (rectB.x > rectA.x && rectB.x < rectA.right) && (rectB.right > rectA.x && rectB.right < rectA.right) && - (rectB.y > rectA.y && rectB.y < rectA.bottom) && + (rectB.y > rectA.y && rectB.y < rectA.bottom) && (rectB.bottom > rectA.y && rectB.bottom < rectA.bottom) ); }; @@ -101641,7 +100988,7 @@ module.exports = ContainsRect; /***/ }), -/* 716 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -101670,7 +101017,7 @@ module.exports = CopyFrom; /***/ }), -/* 717 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -101704,7 +101051,7 @@ module.exports = Equals; /***/ }), -/* 718 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101755,7 +101102,7 @@ module.exports = FitInside; /***/ }), -/* 719 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101806,7 +101153,7 @@ module.exports = FitOutside; /***/ }), -/* 720 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -101837,7 +101184,7 @@ module.exports = Floor; /***/ }), -/* 721 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -101870,7 +101217,7 @@ module.exports = FloorAll; /***/ }), -/* 722 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101908,7 +101255,7 @@ module.exports = GetCenter; /***/ }), -/* 723 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101947,7 +101294,7 @@ module.exports = GetSize; /***/ }), -/* 724 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101988,7 +101335,7 @@ module.exports = Inflate; /***/ }), -/* 725 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -102038,7 +101385,7 @@ module.exports = MergePoints; /***/ }), -/* 726 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -102082,7 +101429,7 @@ module.exports = MergeRect; /***/ }), -/* 727 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -102124,7 +101471,7 @@ module.exports = MergeXY; /***/ }), -/* 728 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -102157,7 +101504,7 @@ module.exports = Offset; /***/ }), -/* 729 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -102189,7 +101536,7 @@ module.exports = OffsetPoint; /***/ }), -/* 730 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -102212,9 +101559,9 @@ module.exports = OffsetPoint; var Overlaps = function (rectA, rectB) { return ( - rectA.x < rectB.right && - rectA.right > rectB.x && - rectA.y < rectB.bottom && + rectA.x < rectB.right && + rectA.right > rectB.x && + rectA.y < rectB.bottom && rectA.bottom > rectB.y ); }; @@ -102223,7 +101570,7 @@ module.exports = Overlaps; /***/ }), -/* 731 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102233,7 +101580,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(5); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); /** * [description] @@ -102278,7 +101625,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 732 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -102315,7 +101662,7 @@ module.exports = Scale; /***/ }), -/* 733 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102357,7 +101704,7 @@ module.exports = Union; /***/ }), -/* 734 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102368,36 +101715,36 @@ module.exports = Union; var Triangle = __webpack_require__(55); -Triangle.Area = __webpack_require__(735); -Triangle.BuildEquilateral = __webpack_require__(736); -Triangle.BuildFromPolygon = __webpack_require__(737); -Triangle.BuildRight = __webpack_require__(738); -Triangle.CenterOn = __webpack_require__(739); +Triangle.Area = __webpack_require__(737); +Triangle.BuildEquilateral = __webpack_require__(738); +Triangle.BuildFromPolygon = __webpack_require__(739); +Triangle.BuildRight = __webpack_require__(740); +Triangle.CenterOn = __webpack_require__(741); Triangle.Centroid = __webpack_require__(309); -Triangle.CircumCenter = __webpack_require__(740); -Triangle.CircumCircle = __webpack_require__(741); -Triangle.Clone = __webpack_require__(742); +Triangle.CircumCenter = __webpack_require__(742); +Triangle.CircumCircle = __webpack_require__(743); +Triangle.Clone = __webpack_require__(744); Triangle.Contains = __webpack_require__(53); Triangle.ContainsArray = __webpack_require__(142); -Triangle.ContainsPoint = __webpack_require__(743); -Triangle.CopyFrom = __webpack_require__(744); +Triangle.ContainsPoint = __webpack_require__(745); +Triangle.CopyFrom = __webpack_require__(746); Triangle.Decompose = __webpack_require__(298); -Triangle.Equals = __webpack_require__(745); +Triangle.Equals = __webpack_require__(747); Triangle.GetPoint = __webpack_require__(307); Triangle.GetPoints = __webpack_require__(308); Triangle.InCenter = __webpack_require__(311); -Triangle.Perimeter = __webpack_require__(746); +Triangle.Perimeter = __webpack_require__(748); Triangle.Offset = __webpack_require__(310); -Triangle.Random = __webpack_require__(112); -Triangle.Rotate = __webpack_require__(747); -Triangle.RotateAroundPoint = __webpack_require__(748); +Triangle.Random = __webpack_require__(111); +Triangle.Rotate = __webpack_require__(749); +Triangle.RotateAroundPoint = __webpack_require__(750); Triangle.RotateAroundXY = __webpack_require__(146); module.exports = Triangle; /***/ }), -/* 735 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -102436,7 +101783,7 @@ module.exports = Area; /***/ }), -/* 736 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102486,7 +101833,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 737 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102559,7 +101906,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 738 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102589,7 +101936,7 @@ var Triangle = __webpack_require__(55); */ var BuildRight = function (x, y, width, height) { - if (height === undefined) { height = width; } + if (height === undefined) { height = width; } // 90 degree angle var x1 = x; @@ -102608,7 +101955,7 @@ module.exports = BuildRight; /***/ }), -/* 739 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102651,7 +101998,7 @@ module.exports = CenterOn; /***/ }), -/* 740 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -102719,7 +102066,7 @@ module.exports = CircumCenter; /***/ }), -/* 741 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102800,7 +102147,7 @@ module.exports = CircumCircle; /***/ }), -/* 742 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102830,7 +102177,7 @@ module.exports = Clone; /***/ }), -/* 743 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102861,7 +102208,7 @@ module.exports = ContainsPoint; /***/ }), -/* 744 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -102890,7 +102237,7 @@ module.exports = CopyFrom; /***/ }), -/* 745 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -102926,7 +102273,7 @@ module.exports = Equals; /***/ }), -/* 746 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102962,7 +102309,7 @@ module.exports = Perimeter; /***/ }), -/* 747 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102996,7 +102343,7 @@ module.exports = Rotate; /***/ }), -/* 748 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103028,7 +102375,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 749 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103043,20 +102390,20 @@ module.exports = RotateAroundPoint; module.exports = { - Gamepad: __webpack_require__(750), + Gamepad: __webpack_require__(752), InputManager: __webpack_require__(237), - InputPlugin: __webpack_require__(755), + InputPlugin: __webpack_require__(757), InteractiveObject: __webpack_require__(312), - Keyboard: __webpack_require__(756), - Mouse: __webpack_require__(761), + Keyboard: __webpack_require__(758), + Mouse: __webpack_require__(763), Pointer: __webpack_require__(246), - Touch: __webpack_require__(762) + Touch: __webpack_require__(764) }; /***/ }), -/* 750 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103076,12 +102423,12 @@ module.exports = { Gamepad: __webpack_require__(239), GamepadManager: __webpack_require__(238), - Configs: __webpack_require__(751) + Configs: __webpack_require__(753) }; /***/ }), -/* 751 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103096,15 +102443,15 @@ module.exports = { module.exports = { - DUALSHOCK_4: __webpack_require__(752), - SNES_USB: __webpack_require__(753), - XBOX_360: __webpack_require__(754) + DUALSHOCK_4: __webpack_require__(754), + SNES_USB: __webpack_require__(755), + XBOX_360: __webpack_require__(756) }; /***/ }), -/* 752 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -103155,7 +102502,7 @@ module.exports = { /***/ }), -/* 753 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -103195,7 +102542,7 @@ module.exports = { /***/ }), -/* 754 */ +/* 756 */ /***/ (function(module, exports) { /** @@ -103245,8 +102592,9 @@ module.exports = { }; + /***/ }), -/* 755 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103258,7 +102606,7 @@ module.exports = { var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); -var DistanceBetween = __webpack_require__(43); +var DistanceBetween = __webpack_require__(41); var Ellipse = __webpack_require__(135); var EllipseContains = __webpack_require__(68); var EventEmitter = __webpack_require__(13); @@ -104828,7 +104176,7 @@ module.exports = InputPlugin; /***/ }), -/* 756 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104850,16 +104198,16 @@ module.exports = { KeyCombo: __webpack_require__(244), - JustDown: __webpack_require__(757), - JustUp: __webpack_require__(758), - DownDuration: __webpack_require__(759), - UpDuration: __webpack_require__(760) + JustDown: __webpack_require__(759), + JustUp: __webpack_require__(760), + DownDuration: __webpack_require__(761), + UpDuration: __webpack_require__(762) }; /***/ }), -/* 757 */ +/* 759 */ /***/ (function(module, exports) { /** @@ -104898,7 +104246,7 @@ module.exports = JustDown; /***/ }), -/* 758 */ +/* 760 */ /***/ (function(module, exports) { /** @@ -104937,7 +104285,7 @@ module.exports = JustUp; /***/ }), -/* 759 */ +/* 761 */ /***/ (function(module, exports) { /** @@ -104969,7 +104317,7 @@ module.exports = DownDuration; /***/ }), -/* 760 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -105001,7 +104349,7 @@ module.exports = UpDuration; /***/ }), -/* 761 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105014,15 +104362,17 @@ module.exports = UpDuration; * @namespace Phaser.Input.Mouse */ +/* eslint-disable */ module.exports = { MouseManager: __webpack_require__(245) }; +/* eslint-enable */ /***/ }), -/* 762 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105035,15 +104385,17 @@ module.exports = { * @namespace Phaser.Input.Touch */ +/* eslint-disable */ module.exports = { TouchManager: __webpack_require__(247) }; +/* eslint-enable */ /***/ }), -/* 763 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105058,21 +104410,21 @@ module.exports = { module.exports = { - FileTypes: __webpack_require__(764), + FileTypes: __webpack_require__(766), File: __webpack_require__(18), FileTypesManager: __webpack_require__(7), GetURL: __webpack_require__(147), - LoaderPlugin: __webpack_require__(780), + LoaderPlugin: __webpack_require__(782), MergeXHRSettings: __webpack_require__(148), XHRLoader: __webpack_require__(313), - XHRSettings: __webpack_require__(91) + XHRSettings: __webpack_require__(90) }; /***/ }), -/* 764 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105110,33 +104462,33 @@ module.exports = { module.exports = { - AnimationJSONFile: __webpack_require__(765), - AtlasJSONFile: __webpack_require__(766), + AnimationJSONFile: __webpack_require__(767), + AtlasJSONFile: __webpack_require__(768), AudioFile: __webpack_require__(314), - AudioSprite: __webpack_require__(767), - BinaryFile: __webpack_require__(768), - BitmapFontFile: __webpack_require__(769), - GLSLFile: __webpack_require__(770), + AudioSprite: __webpack_require__(769), + BinaryFile: __webpack_require__(770), + BitmapFontFile: __webpack_require__(771), + GLSLFile: __webpack_require__(772), HTML5AudioFile: __webpack_require__(315), - HTMLFile: __webpack_require__(771), + HTMLFile: __webpack_require__(773), ImageFile: __webpack_require__(57), JSONFile: __webpack_require__(56), - MultiAtlas: __webpack_require__(772), - PluginFile: __webpack_require__(773), - ScriptFile: __webpack_require__(774), - SpriteSheetFile: __webpack_require__(775), - SVGFile: __webpack_require__(776), + MultiAtlas: __webpack_require__(774), + PluginFile: __webpack_require__(775), + ScriptFile: __webpack_require__(776), + SpriteSheetFile: __webpack_require__(777), + SVGFile: __webpack_require__(778), TextFile: __webpack_require__(318), - TilemapCSVFile: __webpack_require__(777), - TilemapJSONFile: __webpack_require__(778), - UnityAtlasFile: __webpack_require__(779), + TilemapCSVFile: __webpack_require__(779), + TilemapJSONFile: __webpack_require__(780), + UnityAtlasFile: __webpack_require__(781), XMLFile: __webpack_require__(316) }; /***/ }), -/* 765 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105218,7 +104570,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 766 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105296,7 +104648,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 767 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105370,7 +104722,7 @@ FileTypesManager.register('audioSprite', function (key, urls, json, config, audi /***/ }), -/* 768 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105476,7 +104828,7 @@ module.exports = BinaryFile; /***/ }), -/* 769 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105554,7 +104906,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 770 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105660,7 +105012,7 @@ module.exports = GLSLFile; /***/ }), -/* 771 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105824,7 +105176,7 @@ module.exports = HTMLFile; /***/ }), -/* 772 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105913,7 +105265,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t /***/ }), -/* 773 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106029,7 +105381,7 @@ module.exports = PluginFile; /***/ }), -/* 774 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106141,7 +105493,7 @@ module.exports = ScriptFile; /***/ }), -/* 775 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106218,7 +105570,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 776 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106373,7 +105725,7 @@ module.exports = SVGFile; /***/ }), -/* 777 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106480,7 +105832,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 778 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106595,7 +105947,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 779 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106674,7 +106026,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 780 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106691,7 +106043,7 @@ var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(1); var ParseXMLBitmapFont = __webpack_require__(266); var PluginManager = __webpack_require__(11); -var XHRSettings = __webpack_require__(91); +var XHRSettings = __webpack_require__(90); /** * @classdesc @@ -107656,7 +107008,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 781 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107675,56 +107027,56 @@ var Extend = __webpack_require__(23); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(782), - Distance: __webpack_require__(790), - Easing: __webpack_require__(793), - Fuzzy: __webpack_require__(794), - Interpolation: __webpack_require__(800), - Pow2: __webpack_require__(803), - Snap: __webpack_require__(805), + Angle: __webpack_require__(784), + Distance: __webpack_require__(792), + Easing: __webpack_require__(795), + Fuzzy: __webpack_require__(796), + Interpolation: __webpack_require__(802), + Pow2: __webpack_require__(805), + Snap: __webpack_require__(807), // Single functions - Average: __webpack_require__(809), + Average: __webpack_require__(811), Bernstein: __webpack_require__(320), Between: __webpack_require__(226), - CatmullRom: __webpack_require__(123), - CeilTo: __webpack_require__(810), + CatmullRom: __webpack_require__(122), + CeilTo: __webpack_require__(812), Clamp: __webpack_require__(60), - DegToRad: __webpack_require__(36), - Difference: __webpack_require__(811), + DegToRad: __webpack_require__(35), + Difference: __webpack_require__(813), Factorial: __webpack_require__(321), FloatBetween: __webpack_require__(273), - FloorTo: __webpack_require__(812), + FloorTo: __webpack_require__(814), FromPercent: __webpack_require__(64), - GetSpeed: __webpack_require__(813), - IsEven: __webpack_require__(814), - IsEvenStrict: __webpack_require__(815), + GetSpeed: __webpack_require__(815), + IsEven: __webpack_require__(816), + IsEvenStrict: __webpack_require__(817), Linear: __webpack_require__(225), - MaxAdd: __webpack_require__(816), - MinSub: __webpack_require__(817), - Percent: __webpack_require__(818), + MaxAdd: __webpack_require__(818), + MinSub: __webpack_require__(819), + Percent: __webpack_require__(820), RadToDeg: __webpack_require__(216), - RandomXY: __webpack_require__(819), + RandomXY: __webpack_require__(821), RandomXYZ: __webpack_require__(204), RandomXYZW: __webpack_require__(205), Rotate: __webpack_require__(322), RotateAround: __webpack_require__(183), - RotateAroundDistance: __webpack_require__(113), + RotateAroundDistance: __webpack_require__(112), RoundAwayFromZero: __webpack_require__(323), - RoundTo: __webpack_require__(820), - SinCosTableGenerator: __webpack_require__(821), + RoundTo: __webpack_require__(822), + SinCosTableGenerator: __webpack_require__(823), SmootherStep: __webpack_require__(190), SmoothStep: __webpack_require__(191), TransformXY: __webpack_require__(248), - Within: __webpack_require__(822), - Wrap: __webpack_require__(42), + Within: __webpack_require__(824), + Wrap: __webpack_require__(50), // Vector classes Vector2: __webpack_require__(6), Vector3: __webpack_require__(51), - Vector4: __webpack_require__(120), + Vector4: __webpack_require__(119), Matrix3: __webpack_require__(208), - Matrix4: __webpack_require__(119), + Matrix4: __webpack_require__(118), Quaternion: __webpack_require__(207), RotateVec3: __webpack_require__(206) @@ -107740,7 +107092,7 @@ module.exports = PhaserMath; /***/ }), -/* 782 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107755,13 +107107,13 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(783), - BetweenY: __webpack_require__(784), - BetweenPoints: __webpack_require__(785), - BetweenPointsY: __webpack_require__(786), - Reverse: __webpack_require__(787), - RotateTo: __webpack_require__(788), - ShortestBetween: __webpack_require__(789), + Between: __webpack_require__(785), + BetweenY: __webpack_require__(786), + BetweenPoints: __webpack_require__(787), + BetweenPointsY: __webpack_require__(788), + Reverse: __webpack_require__(789), + RotateTo: __webpack_require__(790), + ShortestBetween: __webpack_require__(791), Normalize: __webpack_require__(319), Wrap: __webpack_require__(160), WrapDegrees: __webpack_require__(161) @@ -107770,7 +107122,7 @@ module.exports = { /***/ }), -/* 783 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -107801,7 +107153,7 @@ module.exports = Between; /***/ }), -/* 784 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -107832,7 +107184,7 @@ module.exports = BetweenY; /***/ }), -/* 785 */ +/* 787 */ /***/ (function(module, exports) { /** @@ -107861,7 +107213,7 @@ module.exports = BetweenPoints; /***/ }), -/* 786 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -107890,7 +107242,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 787 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107920,7 +107272,7 @@ module.exports = Reverse; /***/ }), -/* 788 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107987,7 +107339,7 @@ module.exports = RotateTo; /***/ }), -/* 789 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -108033,7 +107385,7 @@ module.exports = ShortestBetween; /***/ }), -/* 790 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108048,15 +107400,15 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(43), - Power: __webpack_require__(791), - Squared: __webpack_require__(792) + Between: __webpack_require__(41), + Power: __webpack_require__(793), + Squared: __webpack_require__(794) }; /***/ }), -/* 791 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -108090,7 +107442,7 @@ module.exports = DistancePower; /***/ }), -/* 792 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -108124,7 +107476,7 @@ module.exports = DistanceSquared; /***/ }), -/* 793 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108156,7 +107508,7 @@ module.exports = { /***/ }), -/* 794 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108171,17 +107523,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(795), - Equal: __webpack_require__(796), - Floor: __webpack_require__(797), - GreaterThan: __webpack_require__(798), - LessThan: __webpack_require__(799) + Ceil: __webpack_require__(797), + Equal: __webpack_require__(798), + Floor: __webpack_require__(799), + GreaterThan: __webpack_require__(800), + LessThan: __webpack_require__(801) }; /***/ }), -/* 795 */ +/* 797 */ /***/ (function(module, exports) { /** @@ -108212,7 +107564,7 @@ module.exports = Ceil; /***/ }), -/* 796 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -108244,7 +107596,7 @@ module.exports = Equal; /***/ }), -/* 797 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -108259,13 +107611,12 @@ module.exports = Equal; * @function Phaser.Math.Fuzzy.Floor * @since 3.0.0 * - * @param {number} a - [description] - * @param {number} b - [description] + * @param {number} value - [description] * @param {float} [epsilon=0.0001] - [description] * * @return {number} [description] */ -var Floor = function (a, b, epsilon) +var Floor = function (value, epsilon) { if (epsilon === undefined) { epsilon = 0.0001; } @@ -108276,7 +107627,7 @@ module.exports = Floor; /***/ }), -/* 798 */ +/* 800 */ /***/ (function(module, exports) { /** @@ -108308,7 +107659,7 @@ module.exports = GreaterThan; /***/ }), -/* 799 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -108340,7 +107691,7 @@ module.exports = LessThan; /***/ }), -/* 800 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108355,8 +107706,8 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(801), - CatmullRom: __webpack_require__(802), + Bezier: __webpack_require__(803), + CatmullRom: __webpack_require__(804), CubicBezier: __webpack_require__(214), Linear: __webpack_require__(224) @@ -108364,7 +107715,7 @@ module.exports = { /***/ }), -/* 801 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108403,7 +107754,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 802 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108412,7 +107763,7 @@ module.exports = BezierInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CatmullRom = __webpack_require__(123); +var CatmullRom = __webpack_require__(122); /** * [description] @@ -108460,7 +107811,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 803 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108476,14 +107827,14 @@ module.exports = CatmullRomInterpolation; module.exports = { GetNext: __webpack_require__(288), - IsSize: __webpack_require__(126), - IsValue: __webpack_require__(804) + IsSize: __webpack_require__(125), + IsValue: __webpack_require__(806) }; /***/ }), -/* 804 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -108511,7 +107862,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 805 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108526,15 +107877,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(806), - Floor: __webpack_require__(807), - To: __webpack_require__(808) + Ceil: __webpack_require__(808), + Floor: __webpack_require__(809), + To: __webpack_require__(810) }; /***/ }), -/* 806 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -108574,7 +107925,7 @@ module.exports = SnapCeil; /***/ }), -/* 807 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -108614,7 +107965,7 @@ module.exports = SnapFloor; /***/ }), -/* 808 */ +/* 810 */ /***/ (function(module, exports) { /** @@ -108654,7 +108005,7 @@ module.exports = SnapTo; /***/ }), -/* 809 */ +/* 811 */ /***/ (function(module, exports) { /** @@ -108689,7 +108040,7 @@ module.exports = Average; /***/ }), -/* 810 */ +/* 812 */ /***/ (function(module, exports) { /** @@ -108724,7 +108075,7 @@ module.exports = CeilTo; /***/ }), -/* 811 */ +/* 813 */ /***/ (function(module, exports) { /** @@ -108753,7 +108104,7 @@ module.exports = Difference; /***/ }), -/* 812 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -108788,7 +108139,7 @@ module.exports = FloorTo; /***/ }), -/* 813 */ +/* 815 */ /***/ (function(module, exports) { /** @@ -108817,7 +108168,7 @@ module.exports = GetSpeed; /***/ }), -/* 814 */ +/* 816 */ /***/ (function(module, exports) { /** @@ -108839,6 +108190,8 @@ module.exports = GetSpeed; var IsEven = function (value) { // Use abstract equality == for "is number" test + + // eslint-disable-next-line eqeqeq return (value == parseFloat(value)) ? !(value % 2) : void 0; }; @@ -108846,7 +108199,7 @@ module.exports = IsEven; /***/ }), -/* 815 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -108875,7 +108228,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 816 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -108905,7 +108258,7 @@ module.exports = MaxAdd; /***/ }), -/* 817 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -108935,7 +108288,7 @@ module.exports = MinSub; /***/ }), -/* 818 */ +/* 820 */ /***/ (function(module, exports) { /** @@ -108994,7 +108347,7 @@ module.exports = Percent; /***/ }), -/* 819 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -109030,7 +108383,7 @@ module.exports = RandomXY; /***/ }), -/* 820 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -109065,7 +108418,7 @@ module.exports = RoundTo; /***/ }), -/* 821 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -109119,7 +108472,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 822 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -109149,7 +108502,7 @@ module.exports = Within; /***/ }), -/* 823 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109164,14 +108517,14 @@ module.exports = Within; module.exports = { - ArcadePhysics: __webpack_require__(824), + ArcadePhysics: __webpack_require__(826), Body: __webpack_require__(330), Collider: __webpack_require__(331), Factory: __webpack_require__(324), Group: __webpack_require__(327), Image: __webpack_require__(325), - Sprite: __webpack_require__(92), - StaticBody: __webpack_require__(336), + Sprite: __webpack_require__(91), + StaticBody: __webpack_require__(338), StaticGroup: __webpack_require__(328), World: __webpack_require__(329) @@ -109179,7 +108532,7 @@ module.exports = { /***/ }), -/* 824 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109191,11 +108544,11 @@ module.exports = { var Class = __webpack_require__(0); var Factory = __webpack_require__(324); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(104); +var Merge = __webpack_require__(103); var PluginManager = __webpack_require__(11); var World = __webpack_require__(329); -var DistanceBetween = __webpack_require__(43); -var DegToRad = __webpack_require__(36); +var DistanceBetween = __webpack_require__(41); +var DegToRad = __webpack_require__(35); // All methods in this class are available under `this.physics` in a Scene. @@ -109650,7 +109003,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 825 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -109725,7 +109078,7 @@ module.exports = Acceleration; /***/ }), -/* 826 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -109799,7 +109152,7 @@ module.exports = Angular; /***/ }), -/* 827 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -109891,7 +109244,7 @@ module.exports = Bounce; /***/ }), -/* 828 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -110015,7 +109368,7 @@ module.exports = Debug; /***/ }), -/* 829 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -110090,7 +109443,7 @@ module.exports = Drag; /***/ }), -/* 830 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -110200,7 +109553,7 @@ module.exports = Enable; /***/ }), -/* 831 */ +/* 833 */ /***/ (function(module, exports) { /** @@ -110275,7 +109628,7 @@ module.exports = Friction; /***/ }), -/* 832 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -110350,7 +109703,7 @@ module.exports = Gravity; /***/ }), -/* 833 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -110392,7 +109745,7 @@ module.exports = Immovable; /***/ }), -/* 834 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -110432,7 +109785,7 @@ module.exports = Mass; /***/ }), -/* 835 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -110511,7 +109864,7 @@ module.exports = Size; /***/ }), -/* 836 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -110606,7 +109959,7 @@ module.exports = Velocity; /***/ }), -/* 837 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -110647,7 +110000,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 838 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110656,9 +110009,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileCheckX = __webpack_require__(839); -var TileCheckY = __webpack_require__(841); -var TileIntersectsBody = __webpack_require__(335); +var TileCheckX = __webpack_require__(841); +var TileCheckY = __webpack_require__(843); +var TileIntersectsBody = __webpack_require__(337); /** * The core separation function to separate a physics body and a tile. @@ -110760,7 +110113,7 @@ module.exports = SeparateTile; /***/ }), -/* 839 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110769,7 +110122,7 @@ module.exports = SeparateTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(840); +var ProcessTileSeparationX = __webpack_require__(842); /** * Check the body against the given tile on the X axis. @@ -110835,7 +110188,7 @@ module.exports = TileCheckX; /***/ }), -/* 840 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -110880,7 +110233,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 841 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110889,7 +110242,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(842); +var ProcessTileSeparationY = __webpack_require__(844); /** * Check the body against the given tile on the Y axis. @@ -110955,7 +110308,7 @@ module.exports = TileCheckY; /***/ }), -/* 842 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -111000,7 +110353,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 843 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111009,7 +110362,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapX = __webpack_require__(844); +var GetOverlapX = __webpack_require__(332); /** * [description] @@ -111087,86 +110440,7 @@ module.exports = SeparateX; /***/ }), -/* 844 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Arcade.GetOverlapX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - [description] - * @param {Phaser.Physics.Arcade.Body} body2 - [description] - * @param {boolean} overlapOnly - [description] - * @param {number} bias - [description] - * - * @return {number} [description] - */ -var GetOverlapX = function (body1, body2, overlapOnly, bias) -{ - var overlap = 0; - var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; - - if (body1.deltaX() === 0 && body2.deltaX() === 0) - { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; - } - else if (body1.deltaX() > body2.deltaX()) - { - // Body1 is moving right and / or Body2 is moving left - overlap = body1.right - body2.x; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.right = true; - body2.touching.none = false; - body2.touching.left = true; - } - } - else if (body1.deltaX() < body2.deltaX()) - { - // Body1 is moving left and/or Body2 is moving right - overlap = body1.x - body2.width - body2.x; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.left = true; - body2.touching.none = false; - body2.touching.right = true; - } - } - - // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapX = overlap; - body2.overlapX = overlap; - - return overlap; -}; - -module.exports = GetOverlapX; - - -/***/ }), -/* 845 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111175,7 +110449,7 @@ module.exports = GetOverlapX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapY = __webpack_require__(846); +var GetOverlapY = __webpack_require__(333); /** * [description] @@ -111252,85 +110526,6 @@ var SeparateY = function (body1, body2, overlapOnly, bias) module.exports = SeparateY; -/***/ }), -/* 846 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Arcade.GetOverlapY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - [description] - * @param {Phaser.Physics.Arcade.Body} body2 - [description] - * @param {boolean} overlapOnly - [description] - * @param {number} bias - [description] - * - * @return {number} [description] - */ -var GetOverlapY = function (body1, body2, overlapOnly, bias) -{ - var overlap = 0; - var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; - - if (body1.deltaY() === 0 && body2.deltaY() === 0) - { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; - } - else if (body1.deltaY() > body2.deltaY()) - { - // Body1 is moving down and/or Body2 is moving up - overlap = body1.bottom - body2.y; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.down = true; - body2.touching.none = false; - body2.touching.up = true; - } - } - else if (body1.deltaY() < body2.deltaY()) - { - // Body1 is moving up and/or Body2 is moving down - overlap = body1.y - body2.bottom; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.up = true; - body2.touching.none = false; - body2.touching.down = true; - } - } - - // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapY = overlap; - body2.overlapY = overlap; - - return overlap; -}; - -module.exports = GetOverlapY; - - /***/ }), /* 847 */, /* 848 */, @@ -111375,7 +110570,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(84); +var CONST = __webpack_require__(83); var PluginManager = __webpack_require__(11); /** @@ -111444,16 +110639,6 @@ var ScenePlugin = new Class({ * @since 3.0.0 */ this.manager = scene.sys.game.scene; - - /** - * [description] - * - * @name Phaser.Scenes.ScenePlugin#_queue - * @type {array} - * @private - * @since 3.0.0 - */ - this._queue = []; }, /** @@ -111481,7 +110666,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - start: function (key, data) + start: function (key) { if (key === undefined) { key = this.key; } @@ -111532,7 +110717,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - launch: function (key, data) + launch: function (key) { if (key && key !== this.key) { @@ -111908,14 +111093,41 @@ module.exports = ScenePlugin; /** * @namespace Phaser.Sound + * + * @author Pavle Goloskokovic (http://prunegames.com) + */ + +/** + * Config object containing various sound settings. + * + * @typedef {object} SoundConfig + * + * @property {boolean} [mute=false] - Boolean indicating whether the sound should be muted or not. + * @property {number} [volume=1] - A value between 0 (silence) and 1 (full volume). + * @property {number} [rate=1] - Defines the speed at which the sound should be played. + * @property {number} [detune=0] - Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * @property {number} [seek=0] - Position of playback for this sound, in seconds. + * @property {boolean} [loop=false] - Whether or not the sound or current sound marker should loop. + * @property {number} [delay=0] - Time, in seconds, that should elapse before the sound actually starts its playback. + */ + +/** + * Marked section of a sound represented by name, and optionally start time, duration, and config object. + * + * @typedef {object} SoundMarker + * + * @property {string} name - Unique identifier of a sound marker. + * @property {number} [start=0] - Sound position offset at witch playback should start. + * @property {number} [duration] - Playback duration of this marker. + * @property {SoundConfig} [config] - An optional config object containing default marker settings. */ module.exports = { SoundManagerCreator: __webpack_require__(253), - BaseSound: __webpack_require__(86), - BaseSoundManager: __webpack_require__(85), + BaseSound: __webpack_require__(85), + BaseSoundManager: __webpack_require__(84), WebAudioSound: __webpack_require__(259), WebAudioSoundManager: __webpack_require__(258), @@ -111945,10 +111157,10 @@ module.exports = { module.exports = { - List: __webpack_require__(87), - Map: __webpack_require__(114), - ProcessQueue: __webpack_require__(332), - RTree: __webpack_require__(333), + List: __webpack_require__(86), + Map: __webpack_require__(113), + ProcessQueue: __webpack_require__(334), + RTree: __webpack_require__(335), Set: __webpack_require__(61) }; @@ -112036,24 +111248,24 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(97), + Components: __webpack_require__(96), Parsers: __webpack_require__(892), Formats: __webpack_require__(19), - ImageCollection: __webpack_require__(347), + ImageCollection: __webpack_require__(349), ParseToTilemap: __webpack_require__(154), - Tile: __webpack_require__(45), - Tilemap: __webpack_require__(351), + Tile: __webpack_require__(44), + Tilemap: __webpack_require__(353), TilemapCreator: __webpack_require__(909), TilemapFactory: __webpack_require__(910), - Tileset: __webpack_require__(101), + Tileset: __webpack_require__(100), LayerData: __webpack_require__(75), MapData: __webpack_require__(76), - ObjectLayer: __webpack_require__(349), + ObjectLayer: __webpack_require__(351), - DynamicTilemapLayer: __webpack_require__(352), - StaticTilemapLayer: __webpack_require__(353) + DynamicTilemapLayer: __webpack_require__(354), + StaticTilemapLayer: __webpack_require__(355) }; @@ -112069,7 +111281,7 @@ module.exports = { */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(35); +var CalculateFacesWithin = __webpack_require__(34); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -112133,10 +111345,10 @@ module.exports = Copy; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(99); -var TileToWorldY = __webpack_require__(100); +var TileToWorldX = __webpack_require__(98); +var TileToWorldY = __webpack_require__(99); var GetTilesWithin = __webpack_require__(15); -var ReplaceByIndex = __webpack_require__(340); +var ReplaceByIndex = __webpack_require__(342); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -112289,8 +111501,8 @@ module.exports = CullTiles; */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(35); -var SetTileCollision = __webpack_require__(44); +var CalculateFacesWithin = __webpack_require__(34); +var SetTileCollision = __webpack_require__(43); /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -112569,9 +111781,9 @@ module.exports = ForEachTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(98); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var GetTileAt = __webpack_require__(97); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Gets a tile at the given world coordinates from the given layer. @@ -112614,10 +111826,10 @@ var Geom = __webpack_require__(292); var GetTilesWithin = __webpack_require__(15); var Intersects = __webpack_require__(293); var NOOP = __webpack_require__(3); -var TileToWorldX = __webpack_require__(99); -var TileToWorldY = __webpack_require__(100); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var TileToWorldX = __webpack_require__(98); +var TileToWorldY = __webpack_require__(99); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); var TriangleToRectangle = function (triangle, rect) { @@ -112710,8 +111922,8 @@ module.exports = GetTilesWithinShape; */ var GetTilesWithin = __webpack_require__(15); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Gets the tiles in the given rectangular area (in world coordinates) of the layer. @@ -112761,9 +111973,9 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasTileAt = __webpack_require__(341); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var HasTileAt = __webpack_require__(343); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns @@ -112801,8 +112013,8 @@ module.exports = HasTileAtWorldXY; */ var PutTileAt = __webpack_require__(151); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either @@ -112842,7 +112054,7 @@ module.exports = PutTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CalculateFacesWithin = __webpack_require__(35); +var CalculateFacesWithin = __webpack_require__(34); var PutTileAt = __webpack_require__(151); /** @@ -112963,9 +112175,9 @@ module.exports = Randomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RemoveTileAt = __webpack_require__(342); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var RemoveTileAt = __webpack_require__(344); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Removes the tile at the given world coordinates in the specified layer and updates the layer's @@ -113090,8 +112302,8 @@ module.exports = RenderDebug; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var SetLayerCollisionIndex = __webpack_require__(152); /** @@ -113151,8 +112363,8 @@ module.exports = SetCollision; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var SetLayerCollisionIndex = __webpack_require__(152); /** @@ -113217,8 +112429,8 @@ module.exports = SetCollisionBetween; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var SetLayerCollisionIndex = __webpack_require__(152); /** @@ -113272,8 +112484,8 @@ module.exports = SetCollisionByExclusion; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var HasValue = __webpack_require__(72); /** @@ -113346,8 +112558,8 @@ module.exports = SetCollisionByProperty; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -113587,8 +112799,8 @@ module.exports = SwapByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(99); -var TileToWorldY = __webpack_require__(100); +var TileToWorldX = __webpack_require__(98); +var TileToWorldY = __webpack_require__(99); var Vector2 = __webpack_require__(6); /** @@ -113709,8 +112921,8 @@ module.exports = WeightedRandomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); var Vector2 = __webpack_require__(6); /** @@ -113760,12 +112972,12 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(343), + Parse: __webpack_require__(345), Parse2DArray: __webpack_require__(153), - ParseCSV: __webpack_require__(344), + ParseCSV: __webpack_require__(346), - Impact: __webpack_require__(350), - Tiled: __webpack_require__(345) + Impact: __webpack_require__(352), + Tiled: __webpack_require__(347) }; @@ -113783,8 +112995,8 @@ module.exports = { var Base64Decode = __webpack_require__(894); var GetFastValue = __webpack_require__(1); var LayerData = __webpack_require__(75); -var ParseGID = __webpack_require__(346); -var Tile = __webpack_require__(45); +var ParseGID = __webpack_require__(348); +var Tile = __webpack_require__(44); /** * [description] @@ -114001,9 +113213,9 @@ module.exports = ParseImageLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(101); -var ImageCollection = __webpack_require__(347); -var ParseObject = __webpack_require__(348); +var Tileset = __webpack_require__(100); +var ImageCollection = __webpack_require__(349); +var ParseObject = __webpack_require__(350); /** * Tilesets & Image Collections @@ -114150,8 +113362,8 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(348); -var ObjectLayer = __webpack_require__(349); +var ParseObject = __webpack_require__(350); +var ObjectLayer = __webpack_require__(351); /** * [description] @@ -114355,7 +113567,7 @@ module.exports = AssignTileProperties; */ var LayerData = __webpack_require__(75); -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); /** * [description] @@ -114438,7 +113650,7 @@ module.exports = ParseTileLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(101); +var Tileset = __webpack_require__(100); /** * [description] @@ -114545,7 +113757,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer src.cull(camera); - this.pipeline.batchDynamicTilemapLayer(src, camera); + this.pipeline.batchDynamicTilemapLayer(src, camera); }; module.exports = DynamicTilemapLayerWebGLRenderer; @@ -114931,7 +114143,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { Clock: __webpack_require__(912), - TimerEvent: __webpack_require__(354) + TimerEvent: __webpack_require__(356) }; @@ -114948,7 +114160,7 @@ module.exports = { var Class = __webpack_require__(0); var PluginManager = __webpack_require__(11); -var TimerEvent = __webpack_require__(354); +var TimerEvent = __webpack_require__(356); /** * @classdesc @@ -115148,7 +114360,7 @@ var Clock = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time, delta) + preUpdate: function () { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; @@ -115325,7 +114537,7 @@ module.exports = { TweenManager: __webpack_require__(916), Tween: __webpack_require__(158), TweenData: __webpack_require__(159), - Timeline: __webpack_require__(359) + Timeline: __webpack_require__(361) }; @@ -115348,14 +114560,14 @@ module.exports = { GetBoolean: __webpack_require__(73), GetEaseFunction: __webpack_require__(71), - GetNewValue: __webpack_require__(102), - GetProps: __webpack_require__(355), + GetNewValue: __webpack_require__(101), + GetProps: __webpack_require__(357), GetTargets: __webpack_require__(155), - GetTweens: __webpack_require__(356), + GetTweens: __webpack_require__(358), GetValueOp: __webpack_require__(156), - NumberTweenBuilder: __webpack_require__(357), - TimelineBuilder: __webpack_require__(358), - TweenBuilder: __webpack_require__(103), + NumberTweenBuilder: __webpack_require__(359), + TimelineBuilder: __webpack_require__(360), + TweenBuilder: __webpack_require__(102) }; @@ -115443,11 +114655,11 @@ module.exports = [ */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(357); +var NumberTweenBuilder = __webpack_require__(359); var PluginManager = __webpack_require__(11); -var TimelineBuilder = __webpack_require__(358); -var TWEEN_CONST = __webpack_require__(88); -var TweenBuilder = __webpack_require__(103); +var TimelineBuilder = __webpack_require__(360); +var TWEEN_CONST = __webpack_require__(87); +var TweenBuilder = __webpack_require__(102); // Phaser.Tweens.TweenManager @@ -116129,13 +115341,13 @@ module.exports = { GetRandomElement: __webpack_require__(138), NumberArray: __webpack_require__(317), NumberArrayStep: __webpack_require__(920), - QuickSelect: __webpack_require__(334), + QuickSelect: __webpack_require__(336), Range: __webpack_require__(272), RemoveRandomElement: __webpack_require__(921), RotateLeft: __webpack_require__(187), RotateRight: __webpack_require__(188), Shuffle: __webpack_require__(80), - SpliceOne: __webpack_require__(360) + SpliceOne: __webpack_require__(362) }; @@ -116275,7 +115487,7 @@ module.exports = NumberArrayStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SpliceOne = __webpack_require__(360); +var SpliceOne = __webpack_require__(362); /** * Removes a random object from the given array and returns it. @@ -116329,7 +115541,7 @@ module.exports = { HasAny: __webpack_require__(286), HasValue: __webpack_require__(72), IsPlainObject: __webpack_require__(165), - Merge: __webpack_require__(104), + Merge: __webpack_require__(103), MergeRight: __webpack_require__(925) }; @@ -116614,7 +115826,7 @@ module.exports = ReverseString; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(363); +__webpack_require__(365); var CONST = __webpack_require__(22); var Extend = __webpack_require__(23); @@ -116626,24 +115838,24 @@ var Extend = __webpack_require__(23); var Phaser = { Actions: __webpack_require__(166), - Animation: __webpack_require__(434), - Cache: __webpack_require__(435), - Cameras: __webpack_require__(436), + Animation: __webpack_require__(436), + Cache: __webpack_require__(437), + Cameras: __webpack_require__(438), Class: __webpack_require__(0), - Create: __webpack_require__(447), - Curves: __webpack_require__(453), - Data: __webpack_require__(456), - Display: __webpack_require__(458), - DOM: __webpack_require__(491), - EventEmitter: __webpack_require__(493), - Game: __webpack_require__(494), - GameObjects: __webpack_require__(539), + Create: __webpack_require__(449), + Curves: __webpack_require__(455), + Data: __webpack_require__(458), + Display: __webpack_require__(460), + DOM: __webpack_require__(493), + EventEmitter: __webpack_require__(495), + Game: __webpack_require__(496), + GameObjects: __webpack_require__(541), Geom: __webpack_require__(292), - Input: __webpack_require__(749), - Loader: __webpack_require__(763), - Math: __webpack_require__(781), + Input: __webpack_require__(751), + Loader: __webpack_require__(765), + Math: __webpack_require__(783), Physics: { - Arcade: __webpack_require__(823) + Arcade: __webpack_require__(825) }, Scene: __webpack_require__(250), Scenes: __webpack_require__(856), diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 42763fcc0..ade636b0f 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()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=989)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(107),o=i(182),a=i(108),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s={},r=new n({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,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={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){for(var e=0,i=0;ithis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return this.getLeft(t)+this.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],u=s[4],l=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+y)*w,this.y=(e*o+i*l+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,v=(d*c-l*f)*g,y=(u*f-l*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(112),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.values.forEach(function(t){e.add(t)}),this.entries.forEach(function(t){e.add(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.add(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.add(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(106),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(122),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(492))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),u=i(38),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(38),o=i(6),a=i(120),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(t,e){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=(this.vertexBuffer,this.vertexData,this.topology),n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);for(var n in i.spritemap=this.game.cache.json.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration,config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0):(console.error("addMarker - Marker has to have a valid name!"),!1):(console.error("addMarker - Marker object has to be provided!"),!1)},updateMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1):(console.error("updateMarker - Marker has to have a valid name!"),!1):(console.error("updateMarker - Marker object has to be provided!"),!1)},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):(console.error("removeMarker - Marker with name '"+e.name+"' does not exist for sound '"+this.key+"'!"),null)},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(645),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(38),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},,,,,function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(35),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(98),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(341),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(342),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(340),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(99),TileToWorldXY:i(889),TileToWorldY:i(100),WeightedRandomize:i(890),WorldToTileX:i(40),WorldToTileXY:i(891),WorldToTileY:i(41)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||b-y||S>-m||A-y||T>-m||b-y||S>-m||A-v&&S*n+C*r+h>-y&&(S+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],u=n[4],l=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*l-a*u)*c,y=(r*u-s*l)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,b=this.scrollX,T=this.scrollY,A=t+(b*m-T*x)*w,S=e+(b*x+T*m)*w;return i.x=A*d+S*p+v,i.y=A*f+S*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;el&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom)}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=u},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(119),r=i(204),o=i(205),a=i(206),h=i(61),u=i(81),l=i(6),c=i(51),d=i(120),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(84),r=i(525),o=i(526),a=i(231),h=i(252),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(542),h=i(543),u=i(544),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(547),s=i(550),r=i(0),o=i(12),a=i(130),h=i(2),u=i(87),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=l},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(551),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(115),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),u=i(4),l=i(16),c=i(563),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(110),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(568),a=i(87),h=i(569),u=i(608),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;su){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var y=l[c].length?c:c+1,m=l.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h]+" ")}r0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(u[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(u[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&l(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(617),u=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,u){var l=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=l,this.setTexture(h,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT,gl.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(0),s=i(89),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=l*l+c*c,g=l*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,w=t.y1,b=0;b=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration)r=1,o=s.duration;else if(n>s.delay&&n<=s.t1)r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r;else if(n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)}s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-180,180)}},,,function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(373),Call:i(374),GetFirst:i(375),GridAlign:i(376),IncAlpha:i(393),IncX:i(394),IncXY:i(395),IncY:i(396),PlaceOnCircle:i(397),PlaceOnEllipse:i(398),PlaceOnLine:i(399),PlaceOnRectangle:i(400),PlaceOnTriangle:i(401),PlayAnimation:i(402),RandomCircle:i(403),RandomEllipse:i(404),RandomLine:i(405),RandomRectangle:i(406),RandomTriangle:i(407),Rotate:i(408),RotateAround:i(409),RotateAroundDistance:i(410),ScaleX:i(411),ScaleXY:i(412),ScaleY:i(413),SetAlpha:i(414),SetBlendMode:i(415),SetDepth:i(416),SetHitArea:i(417),SetOrigin:i(418),SetRotation:i(419),SetScale:i(420),SetScaleX:i(421),SetScaleY:i(422),SetTint:i(423),SetVisible:i(424),SetX:i(425),SetXY:i(426),SetY:i(427),ShiftPosition:i(428),Shuffle:i(429),SmootherStep:i(430),SmoothStep:i(431),Spread:i(432),ToggleVisible:i(433)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(47),r=i(25),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(47),r=i(50);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(48),s=i(49);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(50),s=i(26),r=i(49),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(50),s=i(28),r=i(49),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(47),s=i(30),r=i(48),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(105),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(105),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=u),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=u[0],u[0].prevFrame=o;var v=1/(u.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(114),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(114),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(37);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(37);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(119),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*u,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*u,e[5]=g*s+v*a+y*l,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*u,e[8]=m*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=u+v,y[6]=l-g,y[1]=u-v,y[4]=1-(h+f),y[7]=d+p,y[2]=l+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,A=s*l-o*h,S=r*l-o*u,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,L=d*m-p*v,P=f*m-p*y,k=x*P-w*L+b*_+T*E-A*M+S*C;return k?(k=1/k,i[0]=(h*P-u*L+l*_)*k,i[1]=(u*E-a*P-l*M)*k,i[2]=(a*L-h*E+l*C)*k,i[3]=(r*L-s*P-o*_)*k,i[4]=(n*P-r*E+o*M)*k,i[5]=(s*E-n*L-o*C)*k,i[6]=(v*S-y*A+m*T)*k,i[7]=(y*b-g*S-m*w)*k,i[8]=(g*A-v*b+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(482)(t))},function(t,e,i){var n=i(117);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u={r:i=Math.floor(i*=255),g:i,b:i,color:0},l=s%6;return 0===l?(u.g=h,u.b=o):1===l?(u.r=a,u.b=o):2===l?(u.r=o,u.b=h):3===l?(u.r=o,u.g=a):4===l?(u.r=h,u.g=o):5===l&&(u.g=o,u.b=a),u.color=n(u.r,u.g,u.b),u}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(A(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),A(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&y(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(y(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!m(s,r)&&x(s,n,n.next,r)&&w(s,r)&&w(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),A(n),A(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&v(h,u)){var l=b(h,u);return h=r(h,h.next),l=r(l,l.next),o(h,e,i,n,s,a),void o(l,e,i,n,s,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=l&&s!==n.x&&g(ri.x)&&w(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&w(t,e)&&w(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(m(t,e)&&m(i,n)||m(t,n)&&m(i,e))||y(t,e,i)>0!=y(t,e,n)>0&&y(i,n,t)>0!=y(i,n,e)>0}function w(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function T(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),u=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(510),r=i(236),o=(i(34),i(83),new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;for(var n=this.renderer,s=this.program,r=t.lights.cull(e),o=Math.min(r.length,10),a=e.matrix,h={x:0,y:0},u=n.height,l=0;l<10;++l)n.setFloat1(s,"uLights["+l+"].radius",0);if(o<=0)return this;n.setFloat4(s,"uCamera",e.x,e.y,e.rotation,e.zoom),n.setFloat3(s,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b);for(l=0;l0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.renderer,i=this.vertexCount,n=(this.vertexBuffer,this.vertexData,this.topology),s=this.vertexSize,r=this.batches,o=0,a=null;if(0===r.length||0===i)return this.flushLocked=!1,this;t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));for(var h=0;h0){for(var u=0;u0){for(u=0;u0&&(e.setTexture2D(a.texture,0),t.drawArrays(n,a.first,o)),this.vertexCount=0,r.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t,e){if(t.vertexCount>0){var i=this.vertexBuffer,n=this.gl,s=this.renderer,r=t.tileset.image.get();s.currentPipeline&&s.currentPipeline.vertexCount>0&&s.flush(),this.vertexBuffer=t.vertexBuffer,s.setTexture2D(r.source.glTexture,0),s.setPipeline(this),n.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=i}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=(a.getTintAppendFloatAlpha,this.vertexViewF32),r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,u=o.config.resolution,l=this.maxQuads,c=e.scrollX,d=e.scrollY,f=e.matrix.matrix,p=f[0],g=f[1],v=f[2],y=f[3],m=f[4],x=f[5],w=Math.sin,b=Math.cos,T=this.vertexComponentCount,A=this.vertexCapacity,S=t.defaultFrame.source.glTexture;this.setTexture2D(S,0);for(var C=0;C=A&&(this.flush(),this.setTexture2D(S,0));for(var R=0;R=A&&(this.flush(),this.setTexture2D(S,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=this.renderer,o=e.roundPixels,h=r.config.resolution,u=t.getRenderList(),l=u.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,w=Math.ceil(l/this.maxQuads),b=0,T=t.x-m,A=t.y-x,S=0;S=this.vertexCapacity&&this.flush()}b+=C,l-=C,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,u=o.config.resolution,l=e.matrix.matrix,c=t.frame,d=c.texture.source[c.sourceIndex].glTexture,f=!!d.isRenderTexture,p=t.flipX,g=t.flipY^f,v=c.uvs,y=c.width*(p?-1:1),m=c.height*(g?-1:1),x=-t.displayOriginX+c.x+c.width*(p?1:0),w=-t.displayOriginY+c.y+c.height*(g?1:0),b=x+y,T=w+m,A=t.x-e.scrollX*t.scrollFactorX,S=t.y-e.scrollY*t.scrollFactorY,C=t.scaleX,M=t.scaleY,E=-t.rotation,_=t._alphaTL,L=t._alphaTR,P=t._alphaBL,k=t._alphaBR,F=t._tintTL,R=t._tintTR,O=t._tintBL,D=t._tintBR,I=Math.sin(E),B=Math.cos(E),Y=B*C,X=-I*C,z=I*M,N=B*M,W=A,G=S,U=l[0],V=l[1],j=l[2],H=l[3],q=Y*U+X*j,K=Y*V+X*H,J=z*U+N*j,Z=z*V+N*H,Q=W*U+G*j+l[4],$=W*V+G*H+l[5],tt=x*q+w*J+Q,et=x*K+w*Z+$,it=x*q+T*J+Q,nt=x*K+T*Z+$,st=b*q+T*J+Q,rt=b*K+T*Z+$,ot=b*q+w*J+Q,at=b*K+w*Z+$,ht=n(F,_),ut=n(R,L),lt=n(O,P),ct=n(D,k);this.setTexture2D(d,0),h&&(tt=(tt*u|0)/u,et=(et*u|0)/u,it=(it*u|0)/u,nt=(nt*u|0)/u,st=(st*u|0)/u,rt=(rt*u|0)/u,ot=(ot*u|0)/u,at=(at*u|0)/u),s[(i=this.vertexCount*this.vertexComponentCount)+0]=tt,s[i+1]=et,s[i+2]=v.x0,s[i+3]=v.y0,r[i+4]=ht,s[i+5]=it,s[i+6]=nt,s[i+7]=v.x1,s[i+8]=v.y1,r[i+9]=ut,s[i+10]=st,s[i+11]=rt,s[i+12]=v.x2,s[i+13]=v.y2,r[i+14]=lt,s[i+15]=tt,s[i+16]=et,s[i+17]=v.x0,s[i+18]=v.y0,r[i+19]=ht,s[i+20]=st,s[i+21]=rt,s[i+22]=v.x2,s[i+23]=v.y2,r[i+24]=lt,s[i+25]=ot,s[i+26]=at,s[i+27]=v.x3,s[i+28]=v.y3,r[i+29]=ct,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,u=t.alphas,l=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=e.roundPixels,p=d.config.resolution,g=e.matrix.matrix,v=(g[0],g[1],g[2],g[3],g[4],g[5],t.frame),y=t.texture.source[v.sourceIndex].glTexture,m=t.x-e.scrollX*t.scrollFactorX,x=t.y-e.scrollY*t.scrollFactorY,w=t.scaleX,b=t.scaleY,T=-t.rotation,A=Math.sin(T),S=Math.cos(T),C=S*w,M=-A*w,E=A*b,_=S*b,L=m,P=x,k=g[0],F=g[1],R=g[2],O=g[3],D=C*k+M*R,I=C*F+M*O,B=E*k+_*R,Y=E*F+_*O,X=L*k+P*R+g[4],z=L*F+P*O+g[5],N=0;this.setTexture2D(y,0),N=this.vertexCount*this.vertexComponentCount;for(var W=0,G=0;Wthis.vertexCapacity&&this.flush();var i=t.text,n=i.length,s=a.getTintAppendFloatAlpha,r=this.vertexViewF32,o=this.vertexViewU32,h=this.renderer,u=e.roundPixels,l=h.config.resolution,c=e.matrix.matrix,d=e.width+50,f=e.height+50,p=t.frame,g=t.texture.source[p.sourceIndex],v=e.scrollX*t.scrollFactorX,y=e.scrollY*t.scrollFactorY,m=t.fontData,x=m.lineHeight,w=t.fontSize/m.size,b=m.chars,T=t.alpha,A=s(t._tintTL,T),S=s(t._tintTR,T),C=s(t._tintBL,T),M=s(t._tintBR,T),E=t.x,_=t.y,L=p.cutX,P=p.cutY,k=g.width,F=g.height,R=g.glTexture,O=0,D=0,I=0,B=0,Y=null,X=0,z=0,N=0,W=0,G=0,U=0,V=0,j=0,H=0,q=0,K=0,J=0,Z=null,Q=0,$=E-v+p.x,tt=_-y+p.y,et=-t.rotation,it=t.scaleX,nt=t.scaleY,st=Math.sin(et),rt=Math.cos(et),ot=rt*it,at=-st*it,ht=st*nt,ut=rt*nt,lt=$,ct=tt,dt=c[0],ft=c[1],pt=c[2],gt=c[3],vt=ot*dt+at*pt,yt=ot*ft+at*gt,mt=ht*dt+ut*pt,xt=ht*ft+ut*gt,wt=lt*dt+ct*pt+c[4],bt=lt*ft+ct*gt+c[5],Tt=0;this.setTexture2D(R,0);for(var At=0;Atd||ty0<-50||ty0>f)&&(tx1<-50||tx1>d||ty1<-50||ty1>f)&&(tx2<-50||tx2>d||ty2<-50||ty2>f)&&(tx3<-50||tx3>d||ty3<-50||ty3>f)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Tt=this.vertexCount*this.vertexComponentCount,u&&(tx0=(tx0*l|0)/l,ty0=(ty0*l|0)/l,tx1=(tx1*l|0)/l,ty1=(ty1*l|0)/l,tx2=(tx2*l|0)/l,ty2=(ty2*l|0)/l,tx3=(tx3*l|0)/l,ty3=(ty3*l|0)/l),r[Tt+0]=tx0,r[Tt+1]=ty0,r[Tt+2]=H,r[Tt+3]=K,o[Tt+4]=A,r[Tt+5]=tx1,r[Tt+6]=ty1,r[Tt+7]=H,r[Tt+8]=J,o[Tt+9]=S,r[Tt+10]=tx2,r[Tt+11]=ty2,r[Tt+12]=q,r[Tt+13]=J,o[Tt+14]=C,r[Tt+15]=tx0,r[Tt+16]=ty0,r[Tt+17]=H,r[Tt+18]=K,o[Tt+19]=A,r[Tt+20]=tx2,r[Tt+21]=ty2,r[Tt+22]=q,r[Tt+23]=J,o[Tt+24]=C,r[Tt+25]=tx3,r[Tt+26]=ty3,r[Tt+27]=q,r[Tt+28]=K,o[Tt+29]=M,this.vertexCount+=6))}}else O=0,I=0,D+=x,Z=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,u=t.displayCallback,l=t.text,c=l.length,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=this.renderer,v=e.roundPixels,y=g.config.resolution,m=e.matrix.matrix,x=t.frame,w=t.texture.source[x.sourceIndex],b=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,A=t.scrollX,S=t.scrollY,C=t.fontData,M=C.lineHeight,E=t.fontSize/C.size,_=C.chars,L=t.alpha,P=d(t._tintTL,L),k=d(t._tintTR,L),F=d(t._tintBL,L),R=d(t._tintBR,L),O=t.x,D=t.y,I=x.cutX,B=x.cutY,Y=w.width,X=w.height,z=w.glTexture,N=0,W=0,G=0,U=0,V=null,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=null,rt=0,ot=O+x.x,at=D+x.y,ht=-t.rotation,ut=t.scaleX,lt=t.scaleY,ct=Math.sin(ht),dt=Math.cos(ht),ft=dt*ut,pt=-ct*ut,gt=ct*lt,vt=dt*lt,yt=ot,mt=at,xt=m[0],wt=m[1],bt=m[2],Tt=m[3],At=ft*xt+pt*bt,St=ft*wt+pt*Tt,Ct=gt*xt+vt*bt,Mt=gt*wt+vt*Tt,Et=yt*xt+mt*bt+m[4],_t=yt*wt+mt*Tt+m[5],Lt=t.cropWidth>0||t.cropHeight>0,Pt=0;this.setTexture2D(z,0),Lt&&g.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var kt=0;ktthis.vertexCapacity&&this.flush(),Pt=this.vertexCount*this.vertexComponentCount,v&&(tx0=(tx0*y|0)/y,ty0=(ty0*y|0)/y,tx1=(tx1*y|0)/y,ty1=(ty1*y|0)/y,tx2=(tx2*y|0)/y,ty2=(ty2*y|0)/y,tx3=(tx3*y|0)/y,ty3=(ty3*y|0)/y),f[Pt+0]=tx0,f[Pt+1]=ty0,f[Pt+2]=tt,f[Pt+3]=it,p[Pt+4]=P,f[Pt+5]=tx1,f[Pt+6]=ty1,f[Pt+7]=tt,f[Pt+8]=nt,p[Pt+9]=k,f[Pt+10]=tx2,f[Pt+11]=ty2,f[Pt+12]=et,f[Pt+13]=nt,p[Pt+14]=F,f[Pt+15]=tx0,f[Pt+16]=ty0,f[Pt+17]=tt,f[Pt+18]=it,p[Pt+19]=P,f[Pt+20]=tx2,f[Pt+21]=ty2,f[Pt+22]=et,f[Pt+23]=nt,p[Pt+24]=F,f[Pt+25]=tx3,f[Pt+26]=ty3,f[Pt+27]=et,f[Pt+28]=it,p[Pt+29]=R,this.vertexCount+=6}}}else N=0,G=0,W+=M,st=null;Lt&&g.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,u=t.alpha,l=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),f^=e.isRenderTexture?1:0,c=-c;a.getTintAppendFloatAlpha;var L,P=this.vertexViewF32,k=this.vertexViewU32,F=this.renderer,R=_.roundPixels,O=F.config.resolution,D=_.matrix.matrix,I=o*(d?1:0)-v,B=h*(f?1:0)-y,Y=I+o*(d?-1:1),X=B+h*(f?-1:1),z=s-_.scrollX*p,N=r-_.scrollY*g,W=Math.sin(c),G=Math.cos(c),U=G*u,V=-W*u,j=W*l,H=G*l,q=z,K=N,J=D[0],Z=D[1],Q=D[2],$=D[3],tt=U*J+V*Q,et=U*Z+V*$,it=j*J+H*Q,nt=j*Z+H*$,st=q*J+K*Q+D[4],rt=q*Z+K*$+D[5],ot=I*tt+B*it+st,at=I*et+B*nt+rt,ht=I*tt+X*it+st,ut=I*et+X*nt+rt,lt=Y*tt+X*it+st,ct=Y*et+X*nt+rt,dt=Y*tt+B*it+st,ft=Y*et+B*nt+rt,pt=m/i+M,gt=x/n+E,vt=(m+w)/i+M,yt=(x+b)/n+E;this.setTexture2D(e,0),R&&(ot=(ot*O|0)/O,at=(at*O|0)/O,ht=(ht*O|0)/O,ut=(ut*O|0)/O,lt=(lt*O|0)/O,ct=(ct*O|0)/O,dt=(dt*O|0)/O,ft=(ft*O|0)/O),P[(L=this.vertexCount*this.vertexComponentCount)+0]=ot,P[L+1]=at,P[L+2]=pt,P[L+3]=gt,k[L+4]=T,P[L+5]=ht,P[L+6]=ut,P[L+7]=pt,P[L+8]=yt,k[L+9]=A,P[L+10]=lt,P[L+11]=ct,P[L+12]=vt,P[L+13]=yt,k[L+14]=S,P[L+15]=ot,P[L+16]=at,P[L+17]=pt,P[L+18]=gt,k[L+19]=T,P[L+20]=lt,P[L+21]=ct,P[L+22]=vt,P[L+23]=yt,k[L+24]=S,P[L+25]=dt,P[L+26]=ft,P[L+27]=vt,P[L+28]=gt,k[L+29]=C,this.vertexCount+=6},batchGraphics:function(t,e){}});t.exports=u},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),u=i(8),l=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=0;l0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(522),u=i(523),l=i(524),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(84),s=i(4),r=i(527),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(){return!1},playAudioSprite:function(){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(86),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(){return!1},updateMarker:function(){return!1},removeMarker:function(){return null},play:function(){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(85),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){s.prototype.destroy.call(this),this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.context.suspend(),this.context=null}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(86),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var A=y+g-s,S=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,l=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,w=0,b=1,T=0,A=0,S=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(l-h,c-u),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,A=(65280&x)>>>8,S=255&x,v.strokeStyle="rgba("+T+","+A+","+S+","+y+")",v.lineWidth=b,C+=3;break;case n.FILL_STYLE:w=g[C+1],m=g[C+2],T=(16711680&w)>>>16,A=(65280&w)>>>8,S=255&w,v.fillStyle="rgba("+T+","+A+","+S+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+E)}}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(34),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(653),Ellipse:i(267),Intersects:i(293),Line:i(673),Point:i(691),Polygon:i(705),Rectangle:i(305),Triangle:i(734)}},function(t,e,i){t.exports={CircleToCircle:i(663),CircleToRectangle:i(664),GetRectangleIntersection:i(665),LineToCircle:i(295),LineToLine:i(90),LineToRectangle:i(666),PointToLine:i(296),PointToLineSegment:i(667),RectangleToRectangle:i(294),RectangleToTriangle:i(668),RectangleToValues:i(669),TriangleToCircle:i(670),TriangleToLine:i(671),TriangleToTriangle:i(672)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=r*r+o*o,l=r,c=o;if(u>0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(109),o=i(111),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(42),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),d=u+l+c;e||(e=d/i);for(var f=0;fu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return console.info("Skipping loading audio '"+e+"' since sounds are disabled."),null;var l=u.findAudioURL(r,i);return l?!a.webAudio||o&&o.disableWebAudio?new h(e,l,t.path,n,r.sound.locked):new u(e,l,t.path,s,r.sound.context):(console.warn("No supported url provided for audio '"+e+"'!"),null)},o.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(92),r=i(0),o=i(58),a=i(327),h=i(328),u=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=u},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(825),Angular:i(826),Bounce:i(827),Debug:i(828),Drag:i(829),Enable:i(830),Friction:i(831),Gravity:i(832),Immovable:i(833),Mass:i(834),Size:i(835),Velocity:i(836)}},function(t,e,i){var n=i(92),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(l.x,l.y,u.right,u.y)-l.radius):l.y>u.bottom&&(l.xu.right&&(a=h(l.x,l.y,u.right,u.bottom)-l.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,f=t.mass,p=e.velocity.x,g=e.velocity.y,v=e.mass,y=c*Math.cos(o)+d*Math.sin(o),m=c*Math.sin(o)-d*Math.cos(o),x=p*Math.cos(o)+g*Math.sin(o),w=p*Math.sin(o)-g*Math.cos(o),b=((f-v)*y+2*v*x)/(f+v),T=(2*f*y+(v-f)*x)/(f+v);return t.immovable||(t.velocity.x=(b*Math.cos(o)-m*Math.sin(o))*t.bounce.x,t.velocity.y=(m*Math.cos(o)+b*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(T*Math.cos(o)-w*Math.sin(o))*e.bounce.x,e.velocity.y=(w*Math.cos(o)+T*Math.sin(o))*e.bounce.y,p=e.velocity.x,g=e.velocity.y),Math.abs(o)0&&!t.immovable&&p>c?t.velocity.x*=-1:p<0&&!e.immovable&&c0&&!t.immovable&&g>d?t.velocity.y*=-1:g<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&p0&&!e.immovable&&c>p?e.velocity.x*=-1:d<0&&!t.immovable&&g0&&!e.immovable&&c>g&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,u+=f}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p,v=e.getTilesWithinWorldXY(a,h,u,l);if(0===v.length)return!1;for(var y={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,u,l,d,f,p,g,v,y,m;for(u=l=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=(i(8),i(33)),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u-1}return!1}},function(t,e,i){var n=i(45),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(344),o=i(345),a=i(350);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,u,l);break;case n.CSV:c=r(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),u=i(899),l=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=u(c),l(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(36),r=i(352),o=i(23),a=i(19),h=i(75),u=i(322),l=i(353),c=i(45),d=i(97),f=i(101),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[u])return this.tilesets[u].setTileSize(i,n),this.tilesets[u].setSpacing(s,r),this.tilesets[u].setImage(h),this.tilesets[u];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var l=new f(t,o,i,n,s,r);return l.setImage(h),this.tilesets.push(l),l},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new l(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,u){if(void 0===a&&(a=e.tileWidth),void 0===u&&(u=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var l,d=new h({name:t,tileWidth:a,tileHeight:u,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(102),h=i(4),u=i(156),l=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),A=[],S=u("value",f),C=c(p[0],"value",S.getEnd,S.getStart,m,g,v,T,x,w,b,!1,!1);C.start=d,C.current=d,C.to=f,A.push(C);var M=new l(t,A,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],L=l.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},,function(t,e,i){i(364),i(365),i(366),i(367),i(368),i(369),i(370),i(371),i(372)},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=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(115),CameraManager:i(441)}},function(t,e,i){var n=i(115),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new l(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(37),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;r=s(u,h,t+1/3),o=s(u,h,t),a=s(u,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,s,u),g:n(e,r,u),b:n(i,o,u)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(37);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){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(46),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(126),o=i(34),a=i(503),h=i(504),u=i(507),l=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null};for(var n=0;n<=16;n++)this.blendModes.push({func:[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],equation:WebGLRenderingContext.FUNC_ADD});this.blendModes[1].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.DST_ALPHA],this.blendModes[2].func=[WebGLRenderingContext.DST_COLOR,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_COLOR],this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=null==u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null==o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this},deleteFramebuffer:function(t){return this},deleteProgram:function(t){return this},deleteBuffer:function(t){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){this.gl;var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;uthis.vertexCapacity&&this.flush();var w=this.renderer.config.resolution,b=this.vertexViewF32,T=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,S=r+a,C=o+h,M=m[0],E=m[1],_=m[2],L=m[3],P=d*M+f*_,k=d*E+f*L,F=p*M+g*_,R=p*E+g*L,O=v*M+y*_+m[4],D=v*E+y*L+m[5],I=r*P+o*F+O,B=r*k+o*R+D,Y=r*P+C*F+O,X=r*k+C*R+D,z=S*P+C*F+O,N=S*k+C*R+D,W=S*P+o*F+O,G=S*k+o*R+D,U=u.getTintAppendFloatAlphaAndSwap(l,c);x&&(I=(I*w|0)/w,B=(B*w|0)/w,Y=(Y*w|0)/w,X=(X*w|0)/w,z=(z*w|0)/w,N=(N*w|0)/w,W=(W*w|0)/w,G=(G*w|0)/w),b[A+0]=I,b[A+1]=B,T[A+2]=U,b[A+3]=Y,b[A+4]=X,T[A+5]=U,b[A+6]=z,b[A+7]=N,T[A+8]=U,b[A+9]=I,b[A+10]=B,T[A+11]=U,b[A+12]=z,b[A+13]=N,T[A+14]=U,b[A+15]=W,b[A+16]=G,T[A+17]=U,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.renderer.config.resolution,A=this.vertexViewF32,S=this.vertexViewU32,C=this.vertexCount*this.vertexComponentCount,M=w[0],E=w[1],_=w[2],L=w[3],P=p*M+g*_,k=p*E+g*L,F=v*M+y*_,R=v*E+y*L,O=m*M+x*_+w[4],D=m*E+x*L+w[5],I=r*P+o*F+O,B=r*k+o*R+D,Y=a*P+h*F+O,X=a*k+h*R+D,z=l*P+c*F+O,N=l*k+c*R+D,W=u.getTintAppendFloatAlphaAndSwap(d,f);b&&(I=(I*T|0)/T,B=(B*T|0)/T,Y=(Y*T|0)/T,X=(X*T|0)/T,z=(z*T|0)/T,N=(N*T|0)/T),A[C+0]=I,A[C+1]=B,S[C+2]=W,A[C+3]=Y,A[C+4]=X,S[C+5]=W,A[C+6]=z,A[C+7]=N,S[C+8]=W,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,y,m,x,w,b){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=u,T[2].y=l,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,v,y,m,x,!1,w,b)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v,y){this.renderer.setPipeline(this);for(var m,x,w,b,T,A,S,C,M,E,_,L,P,k,F,R,O,D=this.renderer.config.resolution,I=o.length,B=this.polygonCache,Y=this.vertexViewF32,X=this.vertexViewU32,z=0,N=v[0],W=v[1],G=v[2],U=v[3],V=l*N+c*G,j=l*W+c*U,H=d*N+f*G,q=d*W+f*U,K=p*N+g*G+v[4],J=p*W+g*U+v[5],Z=u.getTintAppendFloatAlphaAndSwap(a,h),Q=0;Qthis.vertexCapacity&&this.flush(),z=this.vertexCount*this.vertexComponentCount,L=(A=B[w+0])*V+(S=B[w+1])*H+K,P=A*j+S*q+J,k=(C=B[b+0])*V+(M=B[b+1])*H+K,F=C*j+M*q+J,R=(E=B[T+0])*V+(_=B[T+1])*H+K,O=E*j+_*q+J,y&&(L=(L*D|0)/D,P=(P*D|0)/D,k=(k*D|0)/D,F=(F*D|0)/D,R=(R*D|0)/D,O=(O*D|0)/D),Y[z+0]=L,Y[z+1]=P,X[z+2]=Z,Y[z+3]=k,Y[z+4]=F,X[z+5]=Z,Y[z+6]=R,Y[z+7]=O,X[z+8]=Z,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m){var x,w;this.renderer.setPipeline(this);for(var b,T,A,S,C=r.length,M=this.polygonCache,E=this.vertexViewF32,_=this.vertexViewU32,L=u.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),b=M[k-1]||M[F-1],T=M[k],E[(A=this.vertexCount*this.vertexComponentCount)+0]=b[6],E[A+1]=b[7],_[A+2]=L(b[8],h),E[A+3]=b[0],E[A+4]=b[1],_[A+5]=L(b[2],h),E[A+6]=T[9],E[A+7]=T[10],_[A+8]=L(T[11],h),E[A+9]=b[0],E[A+10]=b[1],_[A+11]=L(b[2],h),E[A+12]=b[6],E[A+13]=b[7],_[A+14]=L(b[8],h),E[A+15]=T[3],E[A+16]=T[4],_[A+17]=L(T[5],h),this.vertexCount+=6;M.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var A=this.renderer.config.resolution,S=b[0],C=b[1],M=b[2],E=b[3],_=g*S+v*M,L=g*C+v*E,P=y*S+m*M,k=y*C+m*E,F=x*S+w*M+b[4],R=x*C+w*E+b[5],O=this.vertexViewF32,D=this.vertexViewU32,I=a-r,B=h-o,Y=Math.sqrt(I*I+B*B),X=l*(h-o)/Y,z=l*(r-a)/Y,N=c*(h-o)/Y,W=c*(r-a)/Y,G=a-N,U=h-W,V=r-X,j=o-z,H=a+N,q=h+W,K=r+X,J=o+z,Z=G*_+U*P+F,Q=G*L+U*k+R,$=V*_+j*P+F,tt=V*L+j*k+R,et=H*_+q*P+F,it=H*L+q*k+R,nt=K*_+J*P+F,st=K*L+J*k+R,rt=u.getTintAppendFloatAlphaAndSwap,ot=rt(d,p),at=rt(f,p),ht=this.vertexCount*this.vertexComponentCount;return T&&(Z=(Z*A|0)/A,Q=(Q*A|0)/A,$=($*A|0)/A,tt=(tt*A|0)/A,et=(et*A|0)/A,it=(it*A|0)/A,nt=(nt*A|0)/A,st=(st*A|0)/A),O[ht+0]=Z,O[ht+1]=Q,D[ht+2]=at,O[ht+3]=$,O[ht+4]=tt,D[ht+5]=ot,O[ht+6]=et,O[ht+7]=it,D[ht+8]=at,O[ht+9]=$,O[ht+10]=tt,D[ht+11]=ot,O[ht+12]=nt,O[ht+13]=st,D[ht+14]=ot,O[ht+15]=et,O[ht+16]=it,D[ht+17]=at,this.vertexCount+=6,[Z,Q,f,$,tt,d,et,it,f,nt,st,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i=e.scrollX*t.scrollFactorX,n=e.scrollY*t.scrollFactorY,r=t.x-i,o=t.y-n,a=t.scaleX,h=t.scaleY,u=-t.rotation,l=t.commandBuffer,y=1,m=1,x=0,w=0,b=1,T=e.matrix.matrix,A=null,S=0,C=0,M=0,E=0,_=0,L=0,P=0,k=0,F=0,R=null,O=Math.sin,D=Math.cos,I=O(u),B=D(u),Y=B*a,X=-I*a,z=I*h,N=B*h,W=r,G=o,U=T[0],V=T[1],j=T[2],H=T[3],q=Y*U+X*j,K=Y*V+X*H,J=z*U+N*j,Z=z*V+N*H,Q=W*U+G*j+T[4],$=W*V+G*H+T[5],tt=e.roundPixels;v.length=0;for(var et=0,it=l.length;et0){var nt=A.points[0],st=A.points[A.points.length-1];A.points.push(nt),A=new d(st.x,st.y,st.width,st.rgb,st.alpha),v.push(A)}break;case s.FILL_PATH:for(var rt=0,ot=v.length;rt=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+y,h-m,u-x),(v+=h+p)+h>r&&(v=f,y+=u+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+l)/(s+l)),m=Math.floor((v-u+l)/(r+l)),x=y*m,w=e.x,b=s-w,T=s-(g-f-w),A=e.y,S=r-A,C=r-(v-p-A);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=u,E=u,_=0,L=e.sourceIndex,P=0;P0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(540),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(541),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(38),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(620),DynamicBitmapText:i(621),Graphics:i(622),Group:i(623),Image:i(624),Particles:i(625),PathFollower:i(626),Sprite3D:i(627),Sprite:i(628),StaticBitmapText:i(629),Text:i(630),TileSprite:i(631),Zone:i(632)},Creators:{Blitter:i(633),DynamicBitmapText:i(634),Graphics:i(635),Group:i(636),Image:i(637),Particles:i(638),Sprite3D:i(639),Sprite:i(640),StaticBitmapText:i(641),Text:i(642),TileSprite:i(643),Zone:i(644)}};n.Mesh=i(89),n.Quad=i(141),n.Factories.Mesh=i(648),n.Factories.Quad=i(649),n.Creators.Mesh=i(650),n.Creators.Quad=i(651),n.Light=i(290),i(291),i(652),t.exports=n},function(t,e,i){var n=i(0),s=i(87),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(t,e){var i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){var s,r;for(s=0;s-1&&this._list.splice(o,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(545),s=i(546),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,l=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,A=null,S=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-u+e.frame.y),C.rotate(e.rotation),C.scale(e.scaleX,e.scaleY);for(var P=0;P0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode),t.currentAlpha;for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,u=0;u0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,u=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,w=0,b=0,T=0,A=0,S=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,L=a.cutY,P=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(564),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(567),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e,i){var n=this.x-t.x,s=this.y-t.y,r=n*n+s*s;if(0!==r){var o=Math.sqrt(r);r0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(0),s=(i(42),new n({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}}));t.exports=s},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(42),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i,n){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),u=i(280),l=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(36),r=i(43),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(609),s=i(610),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,w=y.canvasData,b=-m,T=-x;l.globalAlpha=v,l.save(),l.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),l.rotate(g.rotation),l.scale(g.scaleX,g.scaleY),l.drawImage(y.source.image,w.sx,w.sy,w.sWidth,w.sHeight,b,T,w.dWidth,w.dHeight),l.restore()}}l.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;e.resolution,t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(616),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){for(var i in void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,u,l=i.getImageData(0,0,s,o).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(38);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(38);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(646),s=i(647),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(t,e,i,n){}},function(t,e,i){var n=i(89);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,key,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(89);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(654),n.Circumference=i(181),n.CircumferencePoint=i(105),n.Clone=i(655),n.Contains=i(32),n.ContainsPoint=i(656),n.ContainsRect=i(657),n.CopyFrom=i(658),n.Equals=i(659),n.GetBounds=i(660),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(661),n.OffsetPoint=i(662),n.Random=i(106),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(90),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(674),n.Clone=i(675),n.CopyFrom=i(676),n.Equals=i(677),n.GetMidPoint=i(678),n.GetNormal=i(679),n.GetPoint=i(300),n.GetPoints=i(109),n.Height=i(680),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(681),n.NormalY=i(682),n.Offset=i(683),n.PerpSlope=i(684),n.Random=i(111),n.ReflectAngle=i(685),n.Rotate=i(686),n.RotateAroundPoint=i(687),n.RotateAroundXY=i(143),n.SetToAngle=i(688),n.Slope=i(689),n.Width=i(690),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(692),n.Clone=i(693),n.CopyFrom=i(694),n.Equals=i(695),n.Floor=i(696),n.GetCentroid=i(697),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(698),n.Interpolate=i(699),n.Invert=i(700),n.Negative=i(701),n.Project=i(702),n.ProjectUnit=i(703),n.SetMagnitude=i(704),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(36);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var u=[];for(i=0;i1&&(this.sortGameObjects(u),this.topOnly&&u.splice(1)),this._drag[t.id]=u,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var l=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),l[0]?(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&l[0]&&(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(757),JustUp:i(758),DownDuration:i(759),UpDuration:i(760)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(782),Distance:i(790),Easing:i(793),Fuzzy:i(794),Interpolation:i(800),Pow2:i(803),Snap:i(805),Average:i(809),Bernstein:i(320),Between:i(226),CatmullRom:i(123),CeilTo:i(810),Clamp:i(60),DegToRad:i(36),Difference:i(811),Factorial:i(321),FloatBetween:i(273),FloorTo:i(812),FromPercent:i(64),GetSpeed:i(813),IsEven:i(814),IsEvenStrict:i(815),Linear:i(225),MaxAdd:i(816),MinSub:i(817),Percent:i(818),RadToDeg:i(216),RandomXY:i(819),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(113),RoundAwayFromZero:i(323),RoundTo:i(820),SinCosTableGenerator:i(821),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(822),Wrap:i(42),Vector2:i(6),Vector3:i(51),Vector4:i(120),Matrix3:i(208),Matrix4:i(119),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(783),BetweenY:i(784),BetweenPoints:i(785),BetweenPointsY:i(786),Reverse:i(787),RotateTo:i(788),ShortestBetween:i(789),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(806),Floor:i(807),To:i(808)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=u(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(l(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(839),s=i(841),r=i(335);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(842);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){var n=i(846);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},,,,,,,,,,function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(84),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this._queue=[]},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(86),BaseSoundManager:i(85),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(87),Map:i(114),ProcessQueue:i(332),RTree:i(333),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(97),Parsers:i(892),Formats:i(19),ImageCollection:i(347),ParseToTilemap:i(154),Tile:i(45),Tilemap:i(351),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(101),LayerData:i(75),MapData:i(76),ObjectLayer:i(349),DynamicTilemapLayer:i(352),StaticTilemapLayer:i(353)}},function(t,e,i){var n=i(15),s=i(35);t.exports=function(t,e,i,r,o,a,h,u){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var l=n(t,e,i,r,null,u),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(44),s=i(35),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(101);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(o,1),r.destroy()}for(s=0;s=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(182),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,u=null,l=null,c=s(t,e,i,r,null,o),d=0;d>>0},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;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],u=s[4],l=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+y)*w,this.y=(e*o+i*l+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,v=(d*c-l*f)*g,y=(u*f-l*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(121),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(494))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),u=i(37),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(37),o=i(6),a=i(119),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(647),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},,,,,function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(34),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(97),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(343),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(344),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(342),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(98),TileToWorldXY:i(889),TileToWorldY:i(99),WeightedRandomize:i(890),WorldToTileX:i(39),WorldToTileXY:i(891),WorldToTileY:i(40)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||b-y||S>-m||A-y||T>-m||b-y||S>-m||A-v&&S*n+C*r+h>-y&&(S+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],u=n[4],l=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*l-a*u)*c,y=(r*u-s*l)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,b=this.scrollX,T=this.scrollY,A=t+(b*m-T*x)*w,S=e+(b*x+T*m)*w;return i.x=A*d+S*p+v,i.y=A*f+S*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;el&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom,this.roundPixels&&(this._shakeOffsetX|=0,this._shakeOffsetY|=0))}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=u},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(118),r=i(204),o=i(205),a=i(206),h=i(61),u=i(81),l=i(6),c=i(51),d=i(119),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(83),r=i(527),o=i(528),a=i(231),h=i(252),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(544),h=i(545),u=i(546),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(549),s=i(552),r=i(0),o=i(12),a=i(130),h=i(2),u=i(86),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=l},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(553),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(114),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),u=i(4),l=i(16),c=i(565),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(570),a=i(86),h=i(571),u=i(610),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;su){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var y=l[c].length?c:c+1,m=l.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h]+" ")}r0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(u[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(u[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&l(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(619),u=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,u){var l=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=l,this.setTexture(h,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=l*l+c*c,g=l*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,w=t.y1,b=0;b=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-180,180)}},,,function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(375),Call:i(376),GetFirst:i(377),GridAlign:i(378),IncAlpha:i(395),IncX:i(396),IncXY:i(397),IncY:i(398),PlaceOnCircle:i(399),PlaceOnEllipse:i(400),PlaceOnLine:i(401),PlaceOnRectangle:i(402),PlaceOnTriangle:i(403),PlayAnimation:i(404),RandomCircle:i(405),RandomEllipse:i(406),RandomLine:i(407),RandomRectangle:i(408),RandomTriangle:i(409),Rotate:i(410),RotateAround:i(411),RotateAroundDistance:i(412),ScaleX:i(413),ScaleXY:i(414),ScaleY:i(415),SetAlpha:i(416),SetBlendMode:i(417),SetDepth:i(418),SetHitArea:i(419),SetOrigin:i(420),SetRotation:i(421),SetScale:i(422),SetScaleX:i(423),SetScaleY:i(424),SetTint:i(425),SetVisible:i(426),SetX:i(427),SetXY:i(428),SetY:i(429),ShiftPosition:i(430),Shuffle:i(431),SmootherStep:i(432),SmoothStep:i(433),Spread:i(434),ToggleVisible:i(435)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(46),r=i(25),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(46),r=i(49);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(47),s=i(48);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(49),s=i(26),r=i(48),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(28),r=i(48),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(30),r=i(47),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=u),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=u[0],u[0].prevFrame=o;var v=1/(u.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(113),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(118),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*u,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*u,e[5]=g*s+v*a+y*l,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*u,e[8]=m*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=u+v,y[6]=l-g,y[1]=u-v,y[4]=1-(h+f),y[7]=d+p,y[2]=l+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,A=s*l-o*h,S=r*l-o*u,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,L=d*m-p*v,P=f*m-p*y,F=x*P-w*L+b*_+T*E-A*M+S*C;return F?(F=1/F,i[0]=(h*P-u*L+l*_)*F,i[1]=(u*E-a*P-l*M)*F,i[2]=(a*L-h*E+l*C)*F,i[3]=(r*L-s*P-o*_)*F,i[4]=(n*P-r*E+o*M)*F,i[5]=(s*E-n*L-o*C)*F,i[6]=(v*S-y*A+m*T)*F,i[7]=(y*b-g*S-m*w)*F,i[8]=(g*A-v*b+m*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(484)(t))},function(t,e,i){var n=i(116);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u={r:i=Math.floor(i*=255),g:i,b:i,color:0},l=s%6;return 0===l?(u.g=h,u.b=o):1===l?(u.r=a,u.b=o):2===l?(u.r=o,u.b=h):3===l?(u.r=o,u.g=a):4===l?(u.r=h,u.g=o):5===l&&(u.g=o,u.b=a),u.color=n(u.r,u.g,u.b),u}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===S(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h,u,l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&(u=c,(h=l).next.i!==u.i&&h.prev.i!==u.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,u)&&x(h,u)&&x(u,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,u))){var d=w(l,c);return l=r(l,l.next),d=r(d,d.next),o(l,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=l&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function w(t,e){var i=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),u=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(512),r=i(236),o=new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,o=t.lights.cull(e),a=Math.min(o.length,10),h=e.matrix,u={x:0,y:0},l=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(a<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setTexture2D(s.source.glTexture,0),n.setPipeline(this),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,a=(o.config.resolution,this.maxQuads),h=e.scrollX,u=e.scrollY,l=e.matrix.matrix,c=l[0],d=l[1],f=l[2],p=l[3],g=l[4],v=l[5],y=Math.sin,m=Math.cos,x=this.vertexComponentCount,w=this.vertexCapacity,b=t.defaultFrame.source.glTexture;this.setTexture2D(b,0);for(var T=0;T=w&&(this.flush(),this.setTexture2D(b,0));for(var P=0;P=w&&(this.flush(),this.setTexture2D(b,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=(this.renderer.config.resolution,t.getRenderList()),o=r.length,h=e.matrix.matrix,u=h[0],l=h[1],c=h[2],d=h[3],f=h[4],p=h[5],g=e.scrollX*t.scrollFactorX,v=e.scrollY*t.scrollFactorY,y=Math.ceil(o/this.maxQuads),m=0,x=t.x-g,w=t.y-v,b=0;b=this.vertexCapacity&&this.flush()}m+=T,o-=T,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=(this.renderer.config.resolution,e.matrix.matrix),h=t.frame,u=h.texture.source[h.sourceIndex].glTexture,l=!!u.isRenderTexture,c=t.flipX,d=t.flipY^l,f=h.uvs,p=h.width*(c?-1:1),g=h.height*(d?-1:1),v=-t.displayOriginX+h.x+h.width*(c?1:0),y=-t.displayOriginY+h.y+h.height*(d?1:0),m=v+p,x=y+g,w=t.x-e.scrollX*t.scrollFactorX,b=t.y-e.scrollY*t.scrollFactorY,T=t.scaleX,A=t.scaleY,S=-t.rotation,C=t._alphaTL,M=t._alphaTR,E=t._alphaBL,_=t._alphaBR,L=t._tintTL,P=t._tintTR,F=t._tintBL,k=t._tintBR,R=Math.sin(S),O=Math.cos(S),D=O*T,I=-R*T,B=R*A,Y=O*A,X=w,z=b,N=o[0],W=o[1],G=o[2],U=o[3],V=D*N+I*G,H=D*W+I*U,j=B*N+Y*G,q=B*W+Y*U,K=X*N+z*G+o[4],J=X*W+z*U+o[5],Z=v*V+y*j+K,Q=v*H+y*q+J,$=v*V+x*j+K,tt=v*H+x*q+J,et=m*V+x*j+K,it=m*H+x*q+J,nt=m*V+y*j+K,st=m*H+y*q+J,rt=n(L,C),ot=n(P,M),at=n(F,E),ht=n(k,_);this.setTexture2D(u,0),s[(i=this.vertexCount*this.vertexComponentCount)+0]=Z,s[i+1]=Q,s[i+2]=f.x0,s[i+3]=f.y0,r[i+4]=rt,s[i+5]=$,s[i+6]=tt,s[i+7]=f.x1,s[i+8]=f.y1,r[i+9]=at,s[i+10]=et,s[i+11]=it,s[i+12]=f.x2,s[i+13]=f.y2,r[i+14]=ht,s[i+15]=Z,s[i+16]=Q,s[i+17]=f.x0,s[i+18]=f.y0,r[i+19]=rt,s[i+20]=et,s[i+21]=it,s[i+22]=f.x2,s[i+23]=f.y2,r[i+24]=ht,s[i+25]=nt,s[i+26]=st,s[i+27]=f.x3,s[i+28]=f.y3,r[i+29]=ot,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,u=t.alphas,l=this.vertexViewF32,c=this.vertexViewU32,d=(this.renderer.config.resolution,e.matrix.matrix),f=t.frame,p=t.texture.source[f.sourceIndex].glTexture,g=t.x-e.scrollX*t.scrollFactorX,v=t.y-e.scrollY*t.scrollFactorY,y=t.scaleX,m=t.scaleY,x=-t.rotation,w=Math.sin(x),b=Math.cos(x),T=b*y,A=-w*y,S=w*m,C=b*m,M=g,E=v,_=d[0],L=d[1],P=d[2],F=d[3],k=T*_+A*P,R=T*L+A*F,O=S*_+C*P,D=S*L+C*F,I=M*_+E*P+d[4],B=M*L+E*F+d[5],Y=0;this.setTexture2D(p,0),Y=this.vertexCount*this.vertexComponentCount;for(var X=0,z=0;Xthis.vertexCapacity&&this.flush();var i,n,s,r,o,h,u,l,c=t.text,d=c.length,f=a.getTintAppendFloatAlpha,p=this.vertexViewF32,g=this.vertexViewU32,v=(this.renderer.config.resolution,e.matrix.matrix),y=e.width+50,m=e.height+50,x=t.frame,w=t.texture.source[x.sourceIndex],b=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,A=t.fontData,S=A.lineHeight,C=t.fontSize/A.size,M=A.chars,E=t.alpha,_=f(t._tintTL,E),L=f(t._tintTR,E),P=f(t._tintBL,E),F=f(t._tintBR,E),k=t.x,R=t.y,O=x.cutX,D=x.cutY,I=w.width,B=w.height,Y=w.glTexture,X=0,z=0,N=0,W=0,G=null,U=0,V=0,H=0,j=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=null,nt=0,st=k-b+x.x,rt=R-T+x.y,ot=-t.rotation,at=t.scaleX,ht=t.scaleY,ut=Math.sin(ot),lt=Math.cos(ot),ct=lt*at,dt=-ut*at,ft=ut*ht,pt=lt*ht,gt=st,vt=rt,yt=v[0],mt=v[1],xt=v[2],wt=v[3],bt=ct*yt+dt*xt,Tt=ct*mt+dt*wt,At=ft*yt+pt*xt,St=ft*mt+pt*wt,Ct=gt*yt+vt*xt+v[4],Mt=gt*mt+vt*wt+v[5],Et=0;this.setTexture2D(Y,0);for(var _t=0;_ty||n<-50||n>m)&&(s<-50||s>y||r<-50||r>m)&&(o<-50||o>y||h<-50||h>m)&&(u<-50||u>y||l<-50||l>m)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),p[(Et=this.vertexCount*this.vertexComponentCount)+0]=i,p[Et+1]=n,p[Et+2]=Q,p[Et+3]=tt,g[Et+4]=_,p[Et+5]=s,p[Et+6]=r,p[Et+7]=Q,p[Et+8]=et,g[Et+9]=P,p[Et+10]=o,p[Et+11]=h,p[Et+12]=$,p[Et+13]=et,g[Et+14]=F,p[Et+15]=i,p[Et+16]=n,p[Et+17]=Q,p[Et+18]=tt,g[Et+19]=_,p[Et+20]=o,p[Et+21]=h,p[Et+22]=$,p[Et+23]=et,g[Et+24]=F,p[Et+25]=u,p[Et+26]=l,p[Et+27]=$,p[Et+28]=tt,g[Et+29]=L,this.vertexCount+=6))}}else X=0,N=0,z+=S,it=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,u,l,c,d,f,p,g,v,y=t.displayCallback,m=t.text,x=m.length,w=a.getTintAppendFloatAlpha,b=this.vertexViewF32,T=this.vertexViewU32,A=this.renderer,S=(A.config.resolution,e.matrix.matrix),C=t.frame,M=t.texture.source[C.sourceIndex],E=e.scrollX*t.scrollFactorX,_=e.scrollY*t.scrollFactorY,L=t.scrollX,P=t.scrollY,F=t.fontData,k=F.lineHeight,R=t.fontSize/F.size,O=F.chars,D=t.alpha,I=w(t._tintTL,D),B=w(t._tintTR,D),Y=w(t._tintBL,D),X=w(t._tintBR,D),z=t.x,N=t.y,W=C.cutX,G=C.cutY,U=M.width,V=M.height,H=M.glTexture,j=0,q=0,K=0,J=0,Z=null,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,ut=0,lt=null,ct=0,dt=z+C.x,ft=N+C.y,pt=-t.rotation,gt=t.scaleX,vt=t.scaleY,yt=Math.sin(pt),mt=Math.cos(pt),xt=mt*gt,wt=-yt*gt,bt=yt*vt,Tt=mt*vt,At=dt,St=ft,Ct=S[0],Mt=S[1],Et=S[2],_t=S[3],Lt=xt*Ct+wt*Et,Pt=xt*Mt+wt*_t,Ft=bt*Ct+Tt*Et,kt=bt*Mt+Tt*_t,Rt=At*Ct+St*Et+S[4],Ot=At*Mt+St*_t+S[5],Dt=t.cropWidth>0||t.cropHeight>0,It=0;this.setTexture2D(H,0),Dt&&A.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Bt=0;Btthis.vertexCapacity&&this.flush(),b[(It=this.vertexCount*this.vertexComponentCount)+0]=i,b[It+1]=n,b[It+2]=ot,b[It+3]=ht,T[It+4]=I,b[It+5]=s,b[It+6]=r,b[It+7]=ot,b[It+8]=ut,T[It+9]=Y,b[It+10]=o,b[It+11]=h,b[It+12]=at,b[It+13]=ut,T[It+14]=X,b[It+15]=i,b[It+16]=n,b[It+17]=ot,b[It+18]=ht,T[It+19]=I,b[It+20]=o,b[It+21]=h,b[It+22]=at,b[It+23]=ut,T[It+24]=X,b[It+25]=u,b[It+26]=l,b[It+27]=at,b[It+28]=ht,T[It+29]=B,this.vertexCount+=6}}}else j=0,K=0,q+=k,lt=null;Dt&&A.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,u=t.alpha,l=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,l=-l;var _,L=this.vertexViewF32,P=this.vertexViewU32,F=(this.renderer.config.resolution,E.matrix.matrix),k=o*(c?1:0)-g,R=a*(d?1:0)-v,O=k+o*(c?-1:1),D=R+a*(d?-1:1),I=s-E.scrollX*f,B=r-E.scrollY*p,Y=Math.sin(l),X=Math.cos(l),z=X*h,N=-Y*h,W=Y*u,G=X*u,U=I,V=B,H=F[0],j=F[1],q=F[2],K=F[3],J=z*H+N*q,Z=z*j+N*K,Q=W*H+G*q,$=W*j+G*K,tt=U*H+V*q+F[4],et=U*j+V*K+F[5],it=k*J+R*Q+tt,nt=k*Z+R*$+et,st=k*J+D*Q+tt,rt=k*Z+D*$+et,ot=O*J+D*Q+tt,at=O*Z+D*$+et,ht=O*J+R*Q+tt,ut=O*Z+R*$+et,lt=y/i+C,ct=m/n+M,dt=(y+x)/i+C,ft=(m+w)/n+M;this.setTexture2D(e,0),L[(_=this.vertexCount*this.vertexComponentCount)+0]=it,L[_+1]=nt,L[_+2]=lt,L[_+3]=ct,P[_+4]=b,L[_+5]=st,L[_+6]=rt,L[_+7]=lt,L[_+8]=ft,P[_+9]=T,L[_+10]=ot,L[_+11]=at,L[_+12]=dt,L[_+13]=ft,P[_+14]=A,L[_+15]=it,L[_+16]=nt,L[_+17]=lt,L[_+18]=ct,P[_+19]=b,L[_+20]=ot,L[_+21]=at,L[_+22]=dt,L[_+23]=ft,P[_+24]=A,L[_+25]=ht,L[_+26]=ut,L[_+27]=dt,L[_+28]=ct,P[_+29]=S,this.vertexCount+=6},batchGraphics:function(){}});t.exports=u},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),u=i(8),l=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=0;l0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(524),u=i(525),l=i(526),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(83),s=i(4),r=i(529),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(84),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(84),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(84),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context?this.context.suspend():this.context.close(),this.context=null,s.prototype.destroy.call(this)}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var A=y+g-s,S=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,l=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,w=0,b=1,T=0,A=0,S=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(l-h,c-u),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,A=(65280&x)>>>8,S=255&x,v.strokeStyle="rgba("+T+","+A+","+S+","+y+")",v.lineWidth=b,C+=3;break;case n.FILL_STYLE:w=g[C+1],m=g[C+2],T=(16711680&w)>>>16,A=(65280&w)>>>8,S=255&w,v.fillStyle="rgba("+T+","+A+","+S+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(42),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(655),Ellipse:i(267),Intersects:i(293),Line:i(675),Point:i(693),Polygon:i(707),Rectangle:i(305),Triangle:i(736)}},function(t,e,i){t.exports={CircleToCircle:i(665),CircleToRectangle:i(666),GetRectangleIntersection:i(667),LineToCircle:i(295),LineToLine:i(89),LineToRectangle:i(668),PointToLine:i(296),PointToLineSegment:i(669),RectangleToRectangle:i(294),RectangleToTriangle:i(670),RectangleToValues:i(671),TriangleToCircle:i(672),TriangleToLine:i(673),TriangleToTriangle:i(674)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=r*r+o*o,l=r,c=o;if(u>0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(50),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),d=u+l+c;e||(e=d/i);for(var f=0;fu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return null;var l=u.findAudioURL(r,i);return l?!a.webAudio||o&&o.disableWebAudio?new h(e,l,t.path,n,r.sound.locked):new u(e,l,t.path,s,r.sound.context):null},o.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(91),r=i(0),o=i(58),a=i(327),h=i(328),u=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=u},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(827),Angular:i(828),Bounce:i(829),Debug:i(830),Drag:i(831),Enable:i(832),Friction:i(833),Gravity:i(834),Immovable:i(835),Mass:i(836),Size:i(837),Velocity:i(838)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(d.x,d.y,u.right,u.y)-d.radius):d.y>u.bottom&&(d.xu.right&&(a=h(d.x,d.y,u.right,u.bottom)-d.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*Math.cos(o),b=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),A=((g-m)*x+2*m*b)/(g+m),S=(2*g*x+(m-g)*b)/(g+m);return t.immovable||(t.velocity.x=(A*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+A*Math.sin(o))*t.bounce.y,f=t.velocity.x,p=t.velocity.y),e.immovable||(e.velocity.x=(S*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+S*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,u+=d}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,g=e.getTilesWithinWorldXY(a,h,u,l);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,u,l,d,f,p,g,v,y,m;for(u=l=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(33),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u-1}return!1}},function(t,e,i){var n=i(44),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(346),o=i(347),a=i(352);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,u,l);break;case n.CSV:c=r(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),u=i(899),l=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=u(c),l(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(35),r=i(354),o=i(23),a=i(19),h=i(75),u=i(322),l=i(355),c=i(44),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[u])return this.tilesets[u].setTileSize(i,n),this.tilesets[u].setSpacing(s,r),this.tilesets[u].setImage(h),this.tilesets[u];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var l=new f(t,o,i,n,s,r);return l.setImage(h),this.tilesets.push(l),l},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new l(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,u){if(void 0===a&&(a=e.tileWidth),void 0===u&&(u=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var l,d=new h({name:t,tileWidth:a,tileHeight:u,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),u=i(156),l=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),A=[],S=u("value",f),C=c(p[0],"value",S.getEnd,S.getStart,m,g,v,T,x,w,b,!1,!1);C.start=d,C.current=d,C.to=f,A.push(C);var M=new l(t,A,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],L=l.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},,function(t,e,i){i(366),i(367),i(368),i(369),i(370),i(371),i(372),i(373),i(374)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(114),CameraManager:i(443)}},function(t,e,i){var n=i(114),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new l(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;r=s(u,h,t+1/3),o=s(u,h,t),a=s(u,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,s,u),g:n(e,r,u),b:n(i,o,u)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(45),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(125),o=i(42),a=i(505),h=i(506),u=i(509),l=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(){return this},deleteFramebuffer:function(){return this},deleteProgram:function(){return this},deleteBuffer:function(){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;uthis.vertexCapacity&&this.flush();this.renderer.config.resolution;var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,A=o+h,S=m[0],C=m[1],M=m[2],E=m[3],_=d*S+f*M,L=d*C+f*E,P=p*S+g*M,F=p*C+g*E,k=v*S+y*M+m[4],R=v*C+y*E+m[5],O=r*_+o*P+k,D=r*L+o*F+R,I=r*_+A*P+k,B=r*L+A*F+R,Y=T*_+A*P+k,X=T*L+A*F+R,z=T*_+o*P+k,N=T*L+o*F+R,W=u.getTintAppendFloatAlphaAndSwap(l,c);x[b+0]=O,x[b+1]=D,w[b+2]=W,x[b+3]=I,x[b+4]=B,w[b+5]=W,x[b+6]=Y,x[b+7]=X,w[b+8]=W,x[b+9]=O,x[b+10]=D,w[b+11]=W,x[b+12]=Y,x[b+13]=X,w[b+14]=W,x[b+15]=z,x[b+16]=N,w[b+17]=W,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var b=this.vertexViewF32,T=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,S=w[0],C=w[1],M=w[2],E=w[3],_=p*S+g*M,L=p*C+g*E,P=v*S+y*M,F=v*C+y*E,k=m*S+x*M+w[4],R=m*C+x*E+w[5],O=r*_+o*P+k,D=r*L+o*F+R,I=a*_+h*P+k,B=a*L+h*F+R,Y=l*_+c*P+k,X=l*L+c*F+R,z=u.getTintAppendFloatAlphaAndSwap(d,f);b[A+0]=O,b[A+1]=D,T[A+2]=z,b[A+3]=I,b[A+4]=B,T[A+5]=z,b[A+6]=Y,b[A+7]=X,T[A+8]=z,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,y,m,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=u,b[2].y=l,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,y,m,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v){this.renderer.setPipeline(this);this.renderer.config.resolution;for(var y,m,x,w,b,T,A,S,C,M,E,_,L,P,F,k,R,O=o.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,Y=0,X=v[0],z=v[1],N=v[2],W=v[3],G=l*X+c*N,U=l*z+c*W,V=d*X+f*N,H=d*z+f*W,j=p*X+g*N+v[4],q=p*z+g*W+v[5],K=u.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,_=(T=D[x+0])*G+(A=D[x+1])*V+j,L=T*U+A*H+q,P=(S=D[w+0])*G+(C=D[w+1])*V+j,F=S*U+C*H+q,k=(M=D[b+0])*G+(E=D[b+1])*V+j,R=M*U+E*H+q,I[Y+0]=_,I[Y+1]=L,B[Y+2]=K,I[Y+3]=P,I[Y+4]=F,B[Y+5]=K,I[Y+6]=k,I[Y+7]=R,B[Y+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var w,b,T,A,S=r.length,C=this.polygonCache,M=this.vertexViewF32,E=this.vertexViewU32,_=u.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=C[P-1]||C[F-1],b=C[P],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],E[T+2]=_(w[8],h),M[T+3]=w[0],M[T+4]=w[1],E[T+5]=_(w[2],h),M[T+6]=b[9],M[T+7]=b[10],E[T+8]=_(b[11],h),M[T+9]=w[0],M[T+10]=w[1],E[T+11]=_(w[2],h),M[T+12]=w[6],M[T+13]=w[7],E[T+14]=_(w[8],h),M[T+15]=b[3],M[T+16]=b[4],E[T+17]=_(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var T=b[0],A=b[1],S=b[2],C=b[3],M=g*T+v*S,E=g*A+v*C,_=y*T+m*S,L=y*A+m*C,P=x*T+w*S+b[4],F=x*A+w*C+b[5],k=this.vertexViewF32,R=this.vertexViewU32,O=a-r,D=h-o,I=Math.sqrt(O*O+D*D),B=l*(h-o)/I,Y=l*(r-a)/I,X=c*(h-o)/I,z=c*(r-a)/I,N=a-X,W=h-z,G=r-B,U=o-Y,V=a+X,H=h+z,j=r+B,q=o+Y,K=N*M+W*_+P,J=N*E+W*L+F,Z=G*M+U*_+P,Q=G*E+U*L+F,$=V*M+H*_+P,tt=V*E+H*L+F,et=j*M+q*_+P,it=j*E+q*L+F,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return k[ot+0]=K,k[ot+1]=J,R[ot+2]=rt,k[ot+3]=Z,k[ot+4]=Q,R[ot+5]=st,k[ot+6]=$,k[ot+7]=tt,R[ot+8]=rt,k[ot+9]=Z,k[ot+10]=Q,R[ot+11]=st,k[ot+12]=et,k[ot+13]=it,R[ot+14]=st,k[ot+15]=$,k[ot+16]=tt,R[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i,n,r=e.scrollX*t.scrollFactorX,o=e.scrollY*t.scrollFactorY,a=t.x-r,h=t.y-o,u=t.scaleX,l=t.scaleY,y=-t.rotation,m=t.commandBuffer,x=1,w=1,b=0,T=0,A=1,S=e.matrix.matrix,C=null,M=0,E=0,_=0,L=0,P=0,F=0,k=0,R=0,O=0,D=null,I=Math.sin,B=Math.cos,Y=I(y),X=B(y),z=X*u,N=-Y*u,W=Y*l,G=X*l,U=a,V=h,H=S[0],j=S[1],q=S[2],K=S[3],J=z*H+N*q,Z=z*j+N*K,Q=W*H+G*q,$=W*j+G*K,tt=U*H+V*q+S[4],et=U*j+V*K+S[5];v.length=0;for(var it=0,nt=m.length;it0){var st=C.points[0],rt=C.points[C.points.length-1];C.points.push(st),C=new d(rt.x,rt.y,rt.width,rt.rgb,rt.alpha),v.push(C)}break;case s.FILL_PATH:for(i=0,n=v.length;i=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+y,h-m,u-x),(v+=h+p)+h>r&&(v=f,y+=u+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+l)/(s+l)),m=Math.floor((v-u+l)/(r+l)),x=y*m,w=e.x,b=s-w,T=s-(g-f-w),A=e.y,S=r-A,C=r-(v-p-A);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=u,E=u,_=0,L=e.sourceIndex,P=0;P0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(542),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(543),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(37),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(622),DynamicBitmapText:i(623),Graphics:i(624),Group:i(625),Image:i(626),Particles:i(627),PathFollower:i(628),Sprite3D:i(629),Sprite:i(630),StaticBitmapText:i(631),Text:i(632),TileSprite:i(633),Zone:i(634)},Creators:{Blitter:i(635),DynamicBitmapText:i(636),Graphics:i(637),Group:i(638),Image:i(639),Particles:i(640),Sprite3D:i(641),Sprite:i(642),StaticBitmapText:i(643),Text:i(644),TileSprite:i(645),Zone:i(646)}};n.Mesh=i(88),n.Quad=i(141),n.Factories.Mesh=i(650),n.Factories.Quad=i(651),n.Creators.Mesh=i(652),n.Creators.Quad=i(653),n.Light=i(290),i(291),i(654),t.exports=n},function(t,e,i){var n=i(0),s=i(86),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(547),s=i(548),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,l=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,A=null,S=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-u+e.frame.y),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var P=0;P0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode);for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,u=0;u0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,u=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,w=0,b=0,T=0,A=0,S=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,L=a.cutY,P=0,F=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.translate(-e.displayOriginX,-e.displayOriginY),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var k=0;k0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(568),s=i(569),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(50),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),u=i(280),l=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(41),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(611),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,w=y.canvasData,b=-m,T=-x;l.globalAlpha=v,l.save(),l.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),l.rotate(g.rotation),l.scale(g.scaleX,g.scaleY),l.drawImage(y.source.image,w.sx,w.sy,w.sWidth,w.sHeight,b,T,w.dWidth,w.dHeight),l.restore()}}l.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(615),s=i(616),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(618),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,u,l=i.getImageData(0,0,s,o).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(648),s=i(649),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(656),n.Circumference=i(181),n.CircumferencePoint=i(104),n.Clone=i(657),n.Contains=i(32),n.ContainsPoint=i(658),n.ContainsRect=i(659),n.CopyFrom=i(660),n.Equals=i(661),n.GetBounds=i(662),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(663),n.OffsetPoint=i(664),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(41);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(676),n.Clone=i(677),n.CopyFrom=i(678),n.Equals=i(679),n.GetMidPoint=i(680),n.GetNormal=i(681),n.GetPoint=i(300),n.GetPoints=i(108),n.Height=i(682),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(683),n.NormalY=i(684),n.Offset=i(685),n.PerpSlope=i(686),n.Random=i(110),n.ReflectAngle=i(687),n.Rotate=i(688),n.RotateAroundPoint=i(689),n.RotateAroundXY=i(143),n.SetToAngle=i(690),n.Slope=i(691),n.Width=i(692),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(694),n.Clone=i(695),n.CopyFrom=i(696),n.Equals=i(697),n.Floor=i(698),n.GetCentroid=i(699),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(700),n.Interpolate=i(701),n.Invert=i(702),n.Negative=i(703),n.Project=i(704),n.ProjectUnit=i(705),n.SetMagnitude=i(706),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var u=[];for(i=0;i1&&(this.sortGameObjects(u),this.topOnly&&u.splice(1)),this._drag[t.id]=u,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var l=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),l[0]?(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&l[0]&&(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(759),JustUp:i(760),DownDuration:i(761),UpDuration:i(762)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(784),Distance:i(792),Easing:i(795),Fuzzy:i(796),Interpolation:i(802),Pow2:i(805),Snap:i(807),Average:i(811),Bernstein:i(320),Between:i(226),CatmullRom:i(122),CeilTo:i(812),Clamp:i(60),DegToRad:i(35),Difference:i(813),Factorial:i(321),FloatBetween:i(273),FloorTo:i(814),FromPercent:i(64),GetSpeed:i(815),IsEven:i(816),IsEvenStrict:i(817),Linear:i(225),MaxAdd:i(818),MinSub:i(819),Percent:i(820),RadToDeg:i(216),RandomXY:i(821),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(112),RoundAwayFromZero:i(323),RoundTo:i(822),SinCosTableGenerator:i(823),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(824),Wrap:i(50),Vector2:i(6),Vector3:i(51),Vector4:i(119),Matrix3:i(208),Matrix4:i(118),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(785),BetweenY:i(786),BetweenPoints:i(787),BetweenPointsY:i(788),Reverse:i(789),RotateTo:i(790),ShortestBetween:i(791),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(808),Floor:i(809),To:i(810)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=u(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(l(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(841),s=i(843),r=i(337);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(332);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},function(t,e,i){var n=i(333);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},,,,,,,,,,function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(83),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(85),BaseSoundManager:i(84),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(86),Map:i(113),ProcessQueue:i(334),RTree:i(335),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(892),Formats:i(19),ImageCollection:i(349),ParseToTilemap:i(154),Tile:i(44),Tilemap:i(353),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(351),DynamicTilemapLayer:i(354),StaticTilemapLayer:i(355)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,u){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var l=n(t,e,i,r,null,u),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(43),s=i(34),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Renderer.WebGL.Utils - * @since 3.0.0 - */ -module.exports = { - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats - * @since 3.0.0 - * - * @param {number} r - [description] - * @param {number} g - [description] - * @param {number} b - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintFromFloats: function (r, g, b, a) - { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlpha: function (rgb, a) - { - var ua = ((a * 255.0)|0) & 0xFF; - return ((ua << 24) | rgb) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap - * @since 3.0.0 - * - * @param {number} rgb - [description] - * @param {number} a - [description] - * - * @return {number} [description] - */ - getTintAppendFloatAlphaAndSwap: function (rgb, a) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB - * @since 3.0.0 - * - * @param {number} rgb - [description] - * - * @return {number} [description] - */ - getFloatsFromUintRGB: function (rgb) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; - }, - - /** - * [description] - * - * @function Phaser.Renderer.WebGL.Utils.getComponentCount - * @since 3.0.0 - * - * @param {number} attributes - [description] - * - * @return {number} [description] - */ - getComponentCount: function (attributes) - { - var count = 0; - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - - if (element.type === WebGLRenderingContext.FLOAT) - { - count += element.size; - } - else - { - count += 1; // We'll force any other type to be 32 bit. for now - } - } - - return count; - } - -}; - - -/***/ }), -/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4806,7 +4676,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(98); +var GetTileAt = __webpack_require__(97); var GetTilesWithin = __webpack_require__(15); /** @@ -4862,7 +4732,7 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 36 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4892,7 +4762,7 @@ module.exports = DegToRad; /***/ }), -/* 37 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4902,7 +4772,7 @@ module.exports = DegToRad; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(117); +var GetColor = __webpack_require__(116); var GetColor32 = __webpack_require__(199); /** @@ -5406,7 +5276,7 @@ module.exports = Color; /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5418,7 +5288,7 @@ module.exports = Color; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var SpriteRender = __webpack_require__(443); +var SpriteRender = __webpack_require__(445); /** * @classdesc @@ -5560,7 +5430,7 @@ module.exports = Sprite; /***/ }), -/* 39 */ +/* 38 */ /***/ (function(module, exports) { /** @@ -6101,7 +5971,7 @@ module.exports = Common; /***/ }), -/* 40 */ +/* 39 */ /***/ (function(module, exports) { /** @@ -6152,7 +6022,7 @@ module.exports = WorldToTileX; /***/ }), -/* 41 */ +/* 40 */ /***/ (function(module, exports) { /** @@ -6203,39 +6073,7 @@ module.exports = WorldToTileY; /***/ }), -/* 42 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Math.Wrap - * @since 3.0.0 - * - * @param {number} value - [description] - * @param {number} min - [description] - * @param {number} max - [description] - * - * @return {number} [description] - */ -var Wrap = function (value, min, max) -{ - var range = max - min; - - return (min + ((((value - min) % range) + range) % range)); -}; - -module.exports = Wrap; - - -/***/ }), -/* 43 */ +/* 41 */ /***/ (function(module, exports) { /** @@ -6269,7 +6107,138 @@ module.exports = DistanceBetween; /***/ }), -/* 44 */ +/* 42 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Renderer.WebGL.Utils + * @since 3.0.0 + */ +module.exports = { + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats + * @since 3.0.0 + * + * @param {number} r - [description] + * @param {number} g - [description] + * @param {number} b - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintFromFloats: function (r, g, b, a) + { + var ur = ((r * 255.0)|0) & 0xFF; + var ug = ((g * 255.0)|0) & 0xFF; + var ub = ((b * 255.0)|0) & 0xFF; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlpha: function (rgb, a) + { + var ua = ((a * 255.0)|0) & 0xFF; + return ((ua << 24) | rgb) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap + * @since 3.0.0 + * + * @param {number} rgb - [description] + * @param {number} a - [description] + * + * @return {number} [description] + */ + getTintAppendFloatAlphaAndSwap: function (rgb, a) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB + * @since 3.0.0 + * + * @param {number} rgb - [description] + * + * @return {number} [description] + */ + getFloatsFromUintRGB: function (rgb) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + }, + + /** + * [description] + * + * @function Phaser.Renderer.WebGL.Utils.getComponentCount + * @since 3.0.0 + * + * @param {number} attributes - [description] + * @param {WebGLRenderingContext} glContext - [description] + * + * @return {number} [description] + */ + getComponentCount: function (attributes, glContext) + { + var count = 0; + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + + if (element.type === glContext.FLOAT) + { + count += element.size; + } + else + { + count += 1; // We'll force any other type to be 32 bit. for now + } + } + + return count; + } + +}; + + +/***/ }), +/* 43 */ /***/ (function(module, exports) { /** @@ -6304,7 +6273,7 @@ module.exports = SetTileCollision; /***/ }), -/* 45 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7126,7 +7095,7 @@ module.exports = Tile; /***/ }), -/* 46 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -7307,7 +7276,7 @@ module.exports = { /***/ }), -/* 47 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -7335,7 +7304,7 @@ module.exports = GetCenterX; /***/ }), -/* 48 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -7368,7 +7337,7 @@ module.exports = SetCenterX; /***/ }), -/* 49 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -7401,7 +7370,7 @@ module.exports = SetCenterY; /***/ }), -/* 50 */ +/* 49 */ /***/ (function(module, exports) { /** @@ -7428,6 +7397,38 @@ var GetCenterY = function (gameObject) module.exports = GetCenterY; +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - [description] + * @param {number} min - [description] + * @param {number} max - [description] + * + * @return {number} [description] + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { @@ -8349,7 +8350,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(53); var GetPoint = __webpack_require__(307); var GetPoints = __webpack_require__(308); -var Random = __webpack_require__(112); +var Random = __webpack_require__(111); /** * @classdesc @@ -9141,11 +9142,11 @@ var Body = {}; module.exports = Body; -var Vertices = __webpack_require__(94); -var Vector = __webpack_require__(95); -var Sleeping = __webpack_require__(339); -var Common = __webpack_require__(39); -var Bounds = __webpack_require__(96); +var Vertices = __webpack_require__(93); +var Vector = __webpack_require__(94); +var Sleeping = __webpack_require__(341); +var Common = __webpack_require__(38); +var Bounds = __webpack_require__(95); var Axes = __webpack_require__(848); (function() { @@ -10496,6 +10497,7 @@ var Set = new Class({ */ dump: function () { + // eslint-disable-next-line no-console console.group('Set'); for (var i = 0; i < this.entries.length; i++) @@ -10504,6 +10506,7 @@ var Set = new Class({ console.log(entry); } + // eslint-disable-next-line no-console console.groupEnd(); }, @@ -10665,14 +10668,14 @@ var Set = new Class({ { var newSet = new Set(); - set.values.forEach(function (value) + set.entries.forEach(function (value) { - newSet.add(value); + newSet.set(value); }); this.entries.forEach(function (value) { - newSet.add(value); + newSet.set(value); }); return newSet; @@ -10696,7 +10699,7 @@ var Set = new Class({ { if (set.contains(value)) { - newSet.add(value); + newSet.set(value); } }); @@ -10721,7 +10724,7 @@ var Set = new Class({ { if (!set.contains(value)) { - newSet.add(value); + newSet.set(value); } }); @@ -10814,7 +10817,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(32); var GetPoint = __webpack_require__(179); var GetPoints = __webpack_require__(180); -var Random = __webpack_require__(106); +var Random = __webpack_require__(105); /** * @classdesc @@ -11230,7 +11233,7 @@ module.exports = Length; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(122); +var FromPoints = __webpack_require__(121); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -11969,7 +11972,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(492))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(494))) /***/ }), /* 68 */ @@ -12029,7 +12032,7 @@ var GetFastValue = __webpack_require__(1); var GetValue = __webpack_require__(4); var Range = __webpack_require__(272); var Set = __webpack_require__(61); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * @classdesc @@ -12863,7 +12866,7 @@ module.exports = Group; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var ImageRender = __webpack_require__(565); +var ImageRender = __webpack_require__(567); /** * @classdesc @@ -12951,7 +12954,7 @@ module.exports = Image; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(573); +var EaseMap = __webpack_require__(575); /** * [description] @@ -13535,7 +13538,7 @@ module.exports = MapData; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); @@ -14323,9 +14326,9 @@ module.exports = Shuffle; var Class = __webpack_require__(0); var GameObject = __webpack_require__(2); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); var Vector2 = __webpack_require__(6); -var Vector4 = __webpack_require__(120); +var Vector4 = __webpack_require__(119); /** * @classdesc @@ -14690,401 +14693,6 @@ module.exports = init(); /***/ }), /* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var Utils = __webpack_require__(34); - -/** - * @classdesc - * [description] - * - * @class WebGLPipeline - * @memberOf Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - [description] - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = config.game.config.resolution; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = config.game.config.width * this.resolution; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = config.game.config.height * this.resolution; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {int} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {int} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * [description] - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {int} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} [description] - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} resolution - [description] - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - bind: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onRender: function (scene, camera) - { - // called for each camera - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - flush: function () - { - if (this.flushLocked) return this; - this.flushLocked = true; - - var gl = this.gl; - var vertexCount = this.vertexCount; - var vertexBuffer = this.vertexBuffer; - var vertexData = this.vertexData; - var topology = this.topology; - var vertexSize = this.vertexSize; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 84 */ /***/ (function(module, exports) { /** @@ -15190,7 +14798,7 @@ module.exports = { /***/ }), -/* 85 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15198,7 +14806,6 @@ module.exports = { * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var NOOP = __webpack_require__(3); @@ -15220,12 +14827,8 @@ var NOOP = __webpack_require__(3); * @param {Phaser.Game} game - Reference to the current game instance. */ var BaseSoundManager = new Class({ - Extends: EventEmitter, - - initialize: - - function BaseSoundManager (game) + initialize: function BaseSoundManager (game) { EventEmitter.call(this); @@ -15243,7 +14846,7 @@ var BaseSoundManager = new Class({ * An array containing all added sounds. * * @name Phaser.Sound.BaseSoundManager#sounds - * @type {array} + * @type {Phaser.Sound.BaseSound[]} * @default [] * @private * @since 3.0.0 @@ -15303,7 +14906,6 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.pauseOnBlur = true; - game.events.on('blur', function () { if (this.pauseOnBlur) @@ -15311,7 +14913,6 @@ var BaseSoundManager = new Class({ this.onBlur(); } }, this); - game.events.on('focus', function () { if (this.pauseOnBlur) @@ -15319,7 +14920,6 @@ var BaseSoundManager = new Class({ this.onFocus(); } }, this); - game.events.once('destroy', this.destroy, this); /** @@ -15351,6 +14951,7 @@ var BaseSoundManager = new Class({ * * @name Phaser.Sound.BaseSoundManager#locked * @type {boolean} + * @readOnly * @since 3.0.0 */ this.locked = this.locked || false; @@ -15362,10 +14963,10 @@ var BaseSoundManager = new Class({ * @name Phaser.Sound.BaseSoundManager#unlocked * @type {boolean} * @default false + * @private * @since 3.0.0 */ this.unlocked = false; - if (this.locked) { this.unlock(); @@ -15378,45 +14979,43 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#add * @override * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {ISound} The new sound instance. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * + * @return {Phaser.Sound.BaseSound} The new sound instance. */ add: NOOP, + /** + * Audio sprite sound type. + * + * @typedef {Phaser.Sound.BaseSound} AudioSpriteSound + * + * @property {object} spritemap - Local reference to 'spritemap' object form json file generated by audiosprite tool. + */ /** * Adds a new audio sprite sound into the sound manager. * * @method Phaser.Sound.BaseSoundManager#addAudioSprite * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {IAudioSpriteSound} The new audio sprite sound instance. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * + * @return {AudioSpriteSound} The new audio sprite sound instance. */ addAudioSprite: function (key, config) { var sound = this.add(key, config); - - /** - * Local reference to 'spritemap' object form json file generated by audiosprite tool. - * - * @property {object} spritemap - */ sound.spritemap = this.game.cache.json.get(key).spritemap; - for (var markerName in sound.spritemap) { if (!sound.spritemap.hasOwnProperty(markerName)) { continue; } - var marker = sound.spritemap[markerName]; - sound.addMarker({ name: markerName, start: marker.start, @@ -15424,7 +15023,6 @@ var BaseSoundManager = new Class({ config: config }); } - return sound; }, @@ -15434,18 +15032,16 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#play * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig | ISoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. - * + * @param {SoundConfig|SoundMarker} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object. + * * @return {boolean} Whether the sound started playing successfully. */ play: function (key, extra) { var sound = this.add(key); - sound.once('ended', sound.destroy, sound); - if (extra) { if (extra.name) @@ -15470,19 +15066,17 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#playAudioSprite * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. * @param {string} spriteName - The name of the sound sprite to play. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * * @return {boolean} Whether the audio sprite sound started playing successfully. */ playAudioSprite: function (key, spriteName, config) { var sound = this.addAudioSprite(key); - sound.once('ended', sound.destroy, sound); - return sound.play(spriteName, config); }, @@ -15492,9 +15086,9 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#remove * @since 3.0.0 - * - * @param {ISound} sound - The sound object to remove. - * + * + * @param {Phaser.Sound.BaseSound} sound - The sound object to remove. + * * @return {boolean} True if the sound was removed successfully, otherwise false. */ remove: function (sound) @@ -15515,9 +15109,9 @@ var BaseSoundManager = new Class({ * * @method Phaser.Sound.BaseSoundManager#removeByKey * @since 3.0.0 - * + * * @param {string} key - The key to match when removing sound objects. - * + * * @return {number} The number of matching sound objects that were removed. */ removeByKey: function (key) @@ -15638,7 +15232,7 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ @@ -15655,7 +15249,6 @@ var BaseSoundManager = new Class({ */ this.emit('unlocked', this); } - for (var i = this.sounds.length - 1; i >= 0; i--) { if (this.sounds[i].pendingRemove) @@ -15663,7 +15256,6 @@ var BaseSoundManager = new Class({ this.sounds.splice(i, 1); } } - this.sounds.forEach(function (sound) { sound.update(time, delta); @@ -15679,12 +15271,10 @@ var BaseSoundManager = new Class({ destroy: function () { this.removeAllListeners(); - this.forEachActiveSound(function (sound) { sound.destroy(); }); - this.sounds.length = 0; this.sounds = null; this.game = null; @@ -15696,14 +15286,13 @@ var BaseSoundManager = new Class({ * @method Phaser.Sound.BaseSoundManager#forEachActiveSound * @private * @since 3.0.0 - * + * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void * @param [scope] - Callback context. */ forEachActiveSound: function (callbackfn, scope) { var _this = this; - this.sounds.forEach(function (sound, index) { if (!sound.pendingRemove) @@ -15712,23 +15301,12 @@ var BaseSoundManager = new Class({ } }); } - }); - -/** - * Global playback rate. - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSoundManager.prototype, 'rate', { - get: function () { return this._rate; }, - set: function (value) { this._rate = value; @@ -15744,23 +15322,12 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', { */ this.emit('rate', this, value); } - }); - -/** - * Global detune. - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSoundManager.prototype, 'detune', { - get: function () { return this._detune; }, - set: function (value) { this._detune = value; @@ -15776,14 +15343,12 @@ Object.defineProperty(BaseSoundManager.prototype, 'detune', { */ this.emit('detune', this, value); } - }); - module.exports = BaseSoundManager; /***/ }), -/* 86 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15791,7 +15356,6 @@ module.exports = BaseSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var Extend = __webpack_require__(23); @@ -15799,7 +15363,7 @@ var NOOP = __webpack_require__(3); /** * @classdesc - * [description] + * Class containing all the shared state and behaviour of a sound object, independent of the implementation. * * @class BaseSound * @extends EventEmitter @@ -15810,15 +15374,11 @@ var NOOP = __webpack_require__(3); * * @param {Phaser.Sound.BaseSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {object} config - An optional config object containing default sound settings. + * @param {SoundConfig} [config] - An optional config object containing default sound settings. */ var BaseSound = new Class({ - Extends: EventEmitter, - - initialize: - - function BaseSound (manager, key, config) + initialize: function BaseSound (manager, key, config) { EventEmitter.call(this); @@ -15903,7 +15463,8 @@ var BaseSound = new Class({ * Default values will be set by properties' setters. * * @name Phaser.Sound.BaseSound#config - * @type {object} + * @type {SoundConfig} + * @private * @since 3.0.0 */ this.config = { @@ -15918,7 +15479,7 @@ var BaseSound = new Class({ * It could be default config or marker config. * * @name Phaser.Sound.BaseSound#currentConfig - * @type {object} + * @type {SoundConfig} * @private * @since 3.0.0 */ @@ -15992,18 +15553,10 @@ var BaseSound = new Class({ * @since 3.0.0 */ this.loop = false; - - /** - * [description] - * - * @name Phaser.Sound.BaseSound#config - * @type {object} - * @since 3.0.0 - */ this.config = Extend(this.config, config); /** - * Object containing markers definitions (Object.) + * Object containing markers definitions (Object.). * * @name Phaser.Sound.BaseSound#markers * @type {object} @@ -16018,7 +15571,7 @@ var BaseSound = new Class({ * 'null' if whole sound is playing. * * @name Phaser.Sound.BaseSound#currentMarker - * @type {?ISoundMarker} + * @type {SoundMarker} * @default null * @readOnly * @since 3.0.0 @@ -16044,34 +15597,26 @@ var BaseSound = new Class({ * @method Phaser.Sound.BaseSound#addMarker * @since 3.0.0 * - * @param {ISoundMarker} marker - Marker object + * @param {SoundMarker} marker - Marker object. * - * @return {boolean} Whether the marker was added successfully + * @return {boolean} Whether the marker was added successfully. */ addMarker: function (marker) { - if (!marker) + if (!marker || !marker.name || typeof marker.name !== 'string') { - console.error('addMarker - Marker object has to be provided!'); return false; } - - if (!marker.name || typeof marker.name !== 'string') - { - console.error('addMarker - Marker has to have a valid name!'); - return false; - } - if (this.markers[marker.name]) { + // eslint-disable-next-line no-console console.error('addMarker - Marker with name \'' + marker.name + '\' already exists for sound \'' + this.key + '\'!'); return false; } - marker = Extend(true, { name: '', start: 0, - duration: this.totalDuration, + duration: this.totalDuration - (marker.start || 0), config: { mute: false, volume: 1, @@ -16082,9 +15627,7 @@ var BaseSound = new Class({ delay: 0 } }, marker); - this.markers[marker.name] = marker; - return true; }, @@ -16094,32 +15637,23 @@ var BaseSound = new Class({ * @method Phaser.Sound.BaseSound#updateMarker * @since 3.0.0 * - * @param {ISoundMarker} marker - Marker object with updated values. + * @param {SoundMarker} marker - Marker object with updated values. * * @return {boolean} Whether the marker was updated successfully. */ updateMarker: function (marker) { - if (!marker) + if (!marker || !marker.name || typeof marker.name !== 'string') { - console.error('updateMarker - Marker object has to be provided!'); return false; } - - if (!marker.name || typeof marker.name !== 'string') - { - console.error('updateMarker - Marker has to have a valid name!'); - return false; - } - if (!this.markers[marker.name]) { + // eslint-disable-next-line no-console console.error('updateMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return false; } - this.markers[marker.name] = Extend(true, this.markers[marker.name], marker); - return true; }, @@ -16131,20 +15665,16 @@ var BaseSound = new Class({ * * @param {string} markerName - The name of the marker to remove. * - * @return {ISoundMarker|null} Removed marker object or 'null' if there was no marker with provided name. + * @return {SoundMarker|null} Removed marker object or 'null' if there was no marker with provided name. */ removeMarker: function (markerName) { var marker = this.markers[markerName]; - if (!marker) { - console.error('removeMarker - Marker with name \'' + marker.name + '\' does not exist for sound \'' + this.key + '\'!'); return null; } - this.markers[markerName] = null; - return marker; }, @@ -16157,26 +15687,24 @@ var BaseSound = new Class({ * @since 3.0.0 * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) { if (markerName === void 0) { markerName = ''; } - if (typeof markerName === 'object') { config = markerName; markerName = ''; } - if (typeof markerName !== 'string') { + // eslint-disable-next-line no-console console.error('Sound marker name has to be a string!'); return false; } - if (!markerName) { this.currentMarker = null; @@ -16187,20 +15715,18 @@ var BaseSound = new Class({ { if (!this.markers[markerName]) { + // eslint-disable-next-line no-console console.error('No marker with name \'' + markerName + '\' found for sound \'' + this.key + '\'!'); return false; } - this.currentMarker = this.markers[markerName]; this.currentConfig = this.currentMarker.config; this.duration = this.currentMarker.duration; } - this.resetConfig(); this.currentConfig = Extend(this.currentConfig, config); this.isPlaying = true; this.isPaused = false; - return true; }, @@ -16209,7 +15735,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -16218,10 +15744,8 @@ var BaseSound = new Class({ { return false; } - this.isPlaying = false; this.isPaused = true; - return true; }, @@ -16230,7 +15754,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -16239,10 +15763,8 @@ var BaseSound = new Class({ { return false; } - this.isPlaying = true; this.isPaused = false; - return true; }, @@ -16251,7 +15773,7 @@ var BaseSound = new Class({ * * @method Phaser.Sound.BaseSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -16302,7 +15824,7 @@ var BaseSound = new Class({ * @override * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ @@ -16320,7 +15842,6 @@ var BaseSound = new Class({ { return; } - this.pendingRemove = true; this.manager = null; this.key = ''; @@ -16345,25 +15866,14 @@ var BaseSound = new Class({ var cent = 1.0005777895065548; // Math.pow(2, 1/1200); var totalDetune = this.currentConfig.detune + this.manager.detune; var detuneRate = Math.pow(cent, totalDetune); - this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate; } }); - -/** - * Playback rate. - * - * @name Phaser.Sound.BaseSound#rate - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(BaseSound.prototype, 'rate', { - get: function () { return this.currentConfig.rate; }, - set: function (value) { this.currentConfig.rate = value; @@ -16377,21 +15887,11 @@ Object.defineProperty(BaseSound.prototype, 'rate', { this.emit('rate', this, value); } }); - -/** - * Detuning of sound. - * - * @name Phaser.Sound.BaseSound#detune - * @property {number} detune - * @since 3.0.0 - */ Object.defineProperty(BaseSound.prototype, 'detune', { - get: function () { return this.currentConfig.detune; }, - set: function (value) { this.currentConfig.detune = value; @@ -16405,12 +15905,11 @@ Object.defineProperty(BaseSound.prototype, 'detune', { this.emit('detune', this, value); } }); - module.exports = BaseSound; /***/ }), -/* 87 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17325,7 +16824,7 @@ module.exports = List; /***/ }), -/* 88 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -17497,7 +16996,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 89 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17509,7 +17008,7 @@ module.exports = TWEEN_CONST; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var MeshRender = __webpack_require__(645); +var MeshRender = __webpack_require__(647); /** * @classdesc @@ -17657,7 +17156,7 @@ module.exports = Mesh; /***/ }), -/* 90 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17733,7 +17232,7 @@ module.exports = LineToLine; /***/ }), -/* 91 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -17796,7 +17295,7 @@ module.exports = XHRSettings; /***/ }), -/* 92 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17807,7 +17306,7 @@ module.exports = XHRSettings; var Class = __webpack_require__(0); var Components = __webpack_require__(326); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * @classdesc @@ -17893,7 +17392,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 93 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17911,11 +17410,11 @@ var Bodies = {}; module.exports = Bodies; -var Vertices = __webpack_require__(94); -var Common = __webpack_require__(39); +var Vertices = __webpack_require__(93); +var Common = __webpack_require__(38); var Body = __webpack_require__(59); -var Bounds = __webpack_require__(96); -var Vector = __webpack_require__(95); +var Bounds = __webpack_require__(95); +var Vector = __webpack_require__(94); var decomp = __webpack_require__(937); (function() { @@ -18230,7 +17729,7 @@ var decomp = __webpack_require__(937); /***/ }), -/* 94 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18247,8 +17746,8 @@ var Vertices = {}; module.exports = Vertices; -var Vector = __webpack_require__(95); -var Common = __webpack_require__(39); +var Vector = __webpack_require__(94); +var Common = __webpack_require__(38); (function() { @@ -18694,7 +18193,7 @@ var Common = __webpack_require__(39); /***/ }), -/* 95 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -18938,7 +18437,7 @@ module.exports = Vector; })(); /***/ }), -/* 96 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -19064,7 +18563,7 @@ module.exports = Bounds; /***/ }), -/* 97 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19080,7 +18579,7 @@ module.exports = Bounds; module.exports = { CalculateFacesAt: __webpack_require__(150), - CalculateFacesWithin: __webpack_require__(35), + CalculateFacesWithin: __webpack_require__(34), Copy: __webpack_require__(863), CreateFromTiles: __webpack_require__(864), CullTiles: __webpack_require__(865), @@ -19089,22 +18588,22 @@ module.exports = { FindByIndex: __webpack_require__(868), FindTile: __webpack_require__(869), ForEachTile: __webpack_require__(870), - GetTileAt: __webpack_require__(98), + GetTileAt: __webpack_require__(97), GetTileAtWorldXY: __webpack_require__(871), GetTilesWithin: __webpack_require__(15), GetTilesWithinShape: __webpack_require__(872), GetTilesWithinWorldXY: __webpack_require__(873), - HasTileAt: __webpack_require__(341), + HasTileAt: __webpack_require__(343), HasTileAtWorldXY: __webpack_require__(874), IsInLayerBounds: __webpack_require__(74), PutTileAt: __webpack_require__(151), PutTileAtWorldXY: __webpack_require__(875), PutTilesAt: __webpack_require__(876), Randomize: __webpack_require__(877), - RemoveTileAt: __webpack_require__(342), + RemoveTileAt: __webpack_require__(344), RemoveTileAtWorldXY: __webpack_require__(878), RenderDebug: __webpack_require__(879), - ReplaceByIndex: __webpack_require__(340), + ReplaceByIndex: __webpack_require__(342), SetCollision: __webpack_require__(880), SetCollisionBetween: __webpack_require__(881), SetCollisionByExclusion: __webpack_require__(882), @@ -19114,19 +18613,19 @@ module.exports = { SetTileLocationCallback: __webpack_require__(886), Shuffle: __webpack_require__(887), SwapByIndex: __webpack_require__(888), - TileToWorldX: __webpack_require__(99), + TileToWorldX: __webpack_require__(98), TileToWorldXY: __webpack_require__(889), - TileToWorldY: __webpack_require__(100), + TileToWorldY: __webpack_require__(99), WeightedRandomize: __webpack_require__(890), - WorldToTileX: __webpack_require__(40), + WorldToTileX: __webpack_require__(39), WorldToTileXY: __webpack_require__(891), - WorldToTileY: __webpack_require__(41) + WorldToTileY: __webpack_require__(40) }; /***/ }), -/* 98 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19182,7 +18681,7 @@ module.exports = GetTileAt; /***/ }), -/* 99 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -19226,7 +18725,7 @@ module.exports = TileToWorldX; /***/ }), -/* 100 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -19270,7 +18769,7 @@ module.exports = TileToWorldY; /***/ }), -/* 101 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19662,7 +19161,7 @@ module.exports = Tileset; /***/ }), -/* 102 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -19725,7 +19224,7 @@ module.exports = GetNewValue; /***/ }), -/* 103 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19738,8 +19237,8 @@ var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(102); -var GetProps = __webpack_require__(355); +var GetNewValue = __webpack_require__(101); +var GetProps = __webpack_require__(357); var GetTargets = __webpack_require__(155); var GetValue = __webpack_require__(4); var GetValueOp = __webpack_require__(156); @@ -19856,7 +19355,7 @@ module.exports = TweenBuilder; /***/ }), -/* 104 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19898,7 +19397,7 @@ module.exports = Merge; /***/ }), -/* 105 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19935,7 +19434,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 106 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19977,7 +19476,7 @@ module.exports = Random; /***/ }), -/* 107 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20052,7 +19551,7 @@ module.exports = GetPoint; /***/ }), -/* 108 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20088,7 +19587,7 @@ module.exports = Random; /***/ }), -/* 109 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20146,7 +19645,7 @@ module.exports = GetPoints; /***/ }), -/* 110 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20185,7 +19684,7 @@ module.exports = Random; /***/ }), -/* 111 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20223,7 +19722,7 @@ module.exports = Random; /***/ }), -/* 112 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20277,7 +19776,7 @@ module.exports = Random; /***/ }), -/* 113 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -20314,7 +19813,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 114 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20538,6 +20037,7 @@ var Map = new Class({ { var entries = this.entries; + // eslint-disable-next-line no-console console.group('Map'); for (var key in entries) @@ -20545,6 +20045,7 @@ var Map = new Class({ console.log(key, entries[key]); } + // eslint-disable-next-line no-console console.groupEnd(); }, @@ -20639,7 +20140,7 @@ module.exports = Map; /***/ }), -/* 115 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20649,10 +20150,10 @@ module.exports = Map; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); var Rectangle = __webpack_require__(8); var TransformMatrix = __webpack_require__(185); -var ValueToColor = __webpack_require__(116); +var ValueToColor = __webpack_require__(115); var Vector2 = __webpack_require__(6); /** @@ -21967,6 +21468,12 @@ var Camera = new Class({ { this._shakeOffsetX = (Math.random() * intensity * this.width * 2 - intensity * this.width) * this.zoom; this._shakeOffsetY = (Math.random() * intensity * this.height * 2 - intensity * this.height) * this.zoom; + + if (this.roundPixels) + { + this._shakeOffsetX |= 0; + this._shakeOffsetY |= 0; + } } } }, @@ -21991,7 +21498,7 @@ module.exports = Camera; /***/ }), -/* 116 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22047,7 +21554,7 @@ module.exports = ValueToColor; /***/ }), -/* 117 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -22077,7 +21584,7 @@ module.exports = GetColor; /***/ }), -/* 118 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22087,7 +21594,7 @@ module.exports = GetColor; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(119); +var Matrix4 = __webpack_require__(118); var RandomXYZ = __webpack_require__(204); var RandomXYZW = __webpack_require__(205); var RotateVec3 = __webpack_require__(206); @@ -22095,7 +21602,7 @@ var Set = __webpack_require__(61); var Sprite3D = __webpack_require__(81); var Vector2 = __webpack_require__(6); var Vector3 = __webpack_require__(51); -var Vector4 = __webpack_require__(120); +var Vector4 = __webpack_require__(119); // Local cache vars var tmpVec3 = new Vector3(); @@ -22974,8 +22481,8 @@ var Camera = new Class({ { if (out === undefined) { out = new Vector2(); } - //TODO: optimize this with a simple distance calculation: - //https://developer.valvesoftware.com/wiki/Field_of_View + // TODO: optimize this with a simple distance calculation: + // https://developer.valvesoftware.com/wiki/Field_of_View if (this.billboardMatrixDirty) { @@ -23145,7 +22652,7 @@ module.exports = Camera; /***/ }), -/* 119 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24586,7 +24093,7 @@ module.exports = Matrix4; /***/ }), -/* 120 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25114,7 +24621,7 @@ module.exports = Vector4; /***/ }), -/* 121 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -25246,7 +24753,7 @@ module.exports = Smoothing(); /***/ }), -/* 122 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25329,7 +24836,7 @@ module.exports = FromPoints; /***/ }), -/* 123 */ +/* 122 */ /***/ (function(module, exports) { /** @@ -25366,7 +24873,7 @@ module.exports = CatmullRom; /***/ }), -/* 124 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -25428,7 +24935,7 @@ module.exports = AddToDOM; /***/ }), -/* 125 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25629,7 +25136,7 @@ module.exports = init(); /***/ }), -/* 126 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -25658,6 +25165,401 @@ var IsSizePowerOfTwo = function (width, height) module.exports = IsSizePowerOfTwo; +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Utils = __webpack_require__(42); + +/** + * @classdesc + * [description] + * + * @class WebGLPipeline + * @memberOf Phaser.Renderer.WebGL + * @constructor + * @since 3.0.0 + * + * @param {object} config - [description] + */ +var WebGLPipeline = new Class({ + + initialize: + + function WebGLPipeline (config) + { + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = 'WebGLPipeline'; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = config.game; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = config.game.canvas; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = config.game.config.resolution; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = config.game.config.width * this.resolution; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = config.game.config.height * this.resolution; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = config.gl; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = config.vertexCapacity; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = config.renderer; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {object} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = config.vertexSize; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {integer} + * @since 3.0.0 + */ + this.topology = config.topology; + + /** + * [description] + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} [description] + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - [description] + * @param {number} height - [description] + * @param {number} resolution - [description] + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + bind: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else + { + gl.disableVertexAttribArray(location); + } + } + + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + flush: function () + { + if (this.flushLocked) { return this; } + + this.flushLocked = true; + + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {Phaser.Renderer.WebGL.WebGLPipeline} [description] + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + } + +}); + +module.exports = WebGLPipeline; + + /***/ }), /* 127 */ /***/ (function(module, exports) { @@ -26283,9 +26185,9 @@ module.exports = { */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(84); -var GetPhysicsPlugins = __webpack_require__(525); -var GetScenePlugins = __webpack_require__(526); +var CONST = __webpack_require__(83); +var GetPhysicsPlugins = __webpack_require__(527); +var GetScenePlugins = __webpack_require__(528); var Plugins = __webpack_require__(231); var Settings = __webpack_require__(252); @@ -27423,9 +27325,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GetBitmapTextSize = __webpack_require__(265); -var ParseFromAtlas = __webpack_require__(542); -var ParseRetroFont = __webpack_require__(543); -var Render = __webpack_require__(544); +var ParseFromAtlas = __webpack_require__(544); +var ParseRetroFont = __webpack_require__(545); +var Render = __webpack_require__(546); /** * @classdesc @@ -27688,13 +27590,13 @@ module.exports = BitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(547); -var Bob = __webpack_require__(550); +var BlitterRender = __webpack_require__(549); +var Bob = __webpack_require__(552); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(130); var GameObject = __webpack_require__(2); -var List = __webpack_require__(87); +var List = __webpack_require__(86); /** * @classdesc @@ -27950,7 +27852,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GetBitmapTextSize = __webpack_require__(265); -var Render = __webpack_require__(551); +var Render = __webpack_require__(553); /** * @classdesc @@ -28327,7 +28229,7 @@ module.exports = DynamicBitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(115); +var Camera = __webpack_require__(114); var Class = __webpack_require__(0); var Commands = __webpack_require__(127); var Components = __webpack_require__(12); @@ -28335,7 +28237,7 @@ var Ellipse = __webpack_require__(267); var GameObject = __webpack_require__(2); var GetValue = __webpack_require__(4); var MATH_CONST = __webpack_require__(16); -var Render = __webpack_require__(563); +var Render = __webpack_require__(565); /** * @classdesc @@ -29464,7 +29366,7 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(68); var GetPoint = __webpack_require__(268); var GetPoints = __webpack_require__(269); -var Random = __webpack_require__(110); +var Random = __webpack_require__(109); /** * @classdesc @@ -29867,10 +29769,10 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GravityWell = __webpack_require__(568); -var List = __webpack_require__(87); -var ParticleEmitter = __webpack_require__(569); -var Render = __webpack_require__(608); +var GravityWell = __webpack_require__(570); +var List = __webpack_require__(86); +var ParticleEmitter = __webpack_require__(571); +var Render = __webpack_require__(610); /** * @classdesc @@ -30322,16 +30224,16 @@ module.exports = GetRandomElement; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(123); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); -var GetTextSize = __webpack_require__(611); +var GetTextSize = __webpack_require__(613); var GetValue = __webpack_require__(4); var RemoveFromDOM = __webpack_require__(229); -var TextRender = __webpack_require__(612); -var TextStyle = __webpack_require__(615); +var TextRender = __webpack_require__(614); +var TextStyle = __webpack_require__(617); /** * @classdesc @@ -31277,7 +31179,8 @@ var Text = new Class({ } context.save(); - //context.scale(resolution, resolution); + + // context.scale(resolution, resolution); if (style.backgroundColor) { @@ -31428,7 +31331,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var GetPowerOfTwo = __webpack_require__(288); -var TileSpriteRender = __webpack_require__(617); +var TileSpriteRender = __webpack_require__(619); /** * @classdesc @@ -31596,7 +31499,9 @@ var TileSprite = new Class({ this.updateTileTexture(); - scene.sys.game.renderer.onContextRestored(function (renderer) { + scene.sys.game.renderer.onContextRestored(function (renderer) + { + var gl = renderer.gl; this.tileTexture = null; this.dirty = true; this.tileTexture = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.canvasBuffer, this.potWidth, this.potHeight); @@ -31675,7 +31580,7 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(89); +var Mesh = __webpack_require__(88); /** * @classdesc @@ -31716,37 +31621,37 @@ var Quad = new Class({ // | \ // 1----2 - var vertices = [ + var vertices = [ 0, 0, // tl 0, 0, // bl 0, 0, // br 0, 0, // tl 0, 0, // br - 0, 0 // tr + 0, 0 // tr ]; - var uv = [ + var uv = [ 0, 0, // tl 0, 1, // bl 1, 1, // br 0, 0, // tl 1, 1, // br - 1, 0 // tr + 1, 0 // tr ]; - var colors = [ + var colors = [ 0xffffff, // tl 0xffffff, // bl 0xffffff, // br 0xffffff, // tl 0xffffff, // br - 0xffffff // tr + 0xffffff // tr ]; - var alphas = [ + var alphas = [ 1, // tl 1, // bl 1, // br 1, // tl 1, // br - 1 // tr + 1 // tr ]; Mesh.call(this, scene, x, y, vertices, uv, colors, alphas, texture, frame); @@ -32576,7 +32481,7 @@ module.exports = GetURL; */ var Extend = __webpack_require__(23); -var XHRSettings = __webpack_require__(91); +var XHRSettings = __webpack_require__(90); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -32633,7 +32538,7 @@ var Composite = {}; module.exports = Composite; var Events = __webpack_require__(162); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); var Body = __webpack_require__(59); (function() { @@ -33313,7 +33218,7 @@ var Body = __webpack_require__(59); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(98); +var GetTileAt = __webpack_require__(97); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -33388,10 +33293,10 @@ module.exports = CalculateFacesAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); var CalculateFacesAt = __webpack_require__(150); -var SetTileCollision = __webpack_require__(44); +var SetTileCollision = __webpack_require__(43); /** * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index @@ -33508,7 +33413,7 @@ module.exports = SetLayerCollisionIndex; var Formats = __webpack_require__(19); var LayerData = __webpack_require__(75); var MapData = __webpack_require__(76); -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); /** * Parses a 2D array of tile indexes into a new MapData object with a single layer. @@ -33599,8 +33504,8 @@ module.exports = Parse2DArray; var Formats = __webpack_require__(19); var MapData = __webpack_require__(76); -var Parse = __webpack_require__(343); -var Tilemap = __webpack_require__(351); +var Parse = __webpack_require__(345); +var Tilemap = __webpack_require__(353); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -33948,7 +33853,7 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var GameObjectCreator = __webpack_require__(14); var GameObjectFactory = __webpack_require__(9); -var TWEEN_CONST = __webpack_require__(88); +var TWEEN_CONST = __webpack_require__(87); /** * @classdesc @@ -34715,7 +34620,7 @@ var Tween = new Class({ ms -= tweenData.delay; ms -= tweenData.t1; - var repeats = Math.floor(ms / tweenData.t2); + // var repeats = Math.floor(ms / tweenData.t2); // remainder ms = ((ms / tweenData.t2) % 1) * tweenData.t2; @@ -34734,7 +34639,12 @@ var Tween = new Class({ tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); - // console.log(tweenData.key, 'Seek', tweenData.target[tweenData.key], 'to', tweenData.current, 'pro', tweenData.progress, 'marker', marker, progress); + // console.log(tweenData.key, 'Seek', tweenData.target[tweenData.key], 'to', tweenData.current, 'pro', tweenData.progress, 'marker', toPosition, progress); + + // if (tweenData.current === 0) + // { + // console.log('zero', tweenData.start, tweenData.end, v, 'progress', progress); + // } tweenData.target[tweenData.key] = tweenData.current; } @@ -35375,7 +35285,7 @@ module.exports = TweenData; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathWrap = __webpack_require__(42); +var MathWrap = __webpack_require__(50); /** * [description] @@ -35405,7 +35315,7 @@ module.exports = Wrap; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); /** * [description] @@ -35441,7 +35351,7 @@ var Events = {}; module.exports = Events; -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -35559,12 +35469,12 @@ var Constraint = {}; module.exports = Constraint; -var Vertices = __webpack_require__(94); -var Vector = __webpack_require__(95); -var Sleeping = __webpack_require__(339); -var Bounds = __webpack_require__(96); +var Vertices = __webpack_require__(93); +var Vector = __webpack_require__(94); +var Sleeping = __webpack_require__(341); +var Bounds = __webpack_require__(95); var Axes = __webpack_require__(848); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -36098,51 +36008,51 @@ module.exports = IsPlainObject; module.exports = { - Angle: __webpack_require__(373), - Call: __webpack_require__(374), - GetFirst: __webpack_require__(375), - GridAlign: __webpack_require__(376), - IncAlpha: __webpack_require__(393), - IncX: __webpack_require__(394), - IncXY: __webpack_require__(395), - IncY: __webpack_require__(396), - PlaceOnCircle: __webpack_require__(397), - PlaceOnEllipse: __webpack_require__(398), - PlaceOnLine: __webpack_require__(399), - PlaceOnRectangle: __webpack_require__(400), - PlaceOnTriangle: __webpack_require__(401), - PlayAnimation: __webpack_require__(402), - RandomCircle: __webpack_require__(403), - RandomEllipse: __webpack_require__(404), - RandomLine: __webpack_require__(405), - RandomRectangle: __webpack_require__(406), - RandomTriangle: __webpack_require__(407), - Rotate: __webpack_require__(408), - RotateAround: __webpack_require__(409), - RotateAroundDistance: __webpack_require__(410), - ScaleX: __webpack_require__(411), - ScaleXY: __webpack_require__(412), - ScaleY: __webpack_require__(413), - SetAlpha: __webpack_require__(414), - SetBlendMode: __webpack_require__(415), - SetDepth: __webpack_require__(416), - SetHitArea: __webpack_require__(417), - SetOrigin: __webpack_require__(418), - SetRotation: __webpack_require__(419), - SetScale: __webpack_require__(420), - SetScaleX: __webpack_require__(421), - SetScaleY: __webpack_require__(422), - SetTint: __webpack_require__(423), - SetVisible: __webpack_require__(424), - SetX: __webpack_require__(425), - SetXY: __webpack_require__(426), - SetY: __webpack_require__(427), - ShiftPosition: __webpack_require__(428), - Shuffle: __webpack_require__(429), - SmootherStep: __webpack_require__(430), - SmoothStep: __webpack_require__(431), - Spread: __webpack_require__(432), - ToggleVisible: __webpack_require__(433) + Angle: __webpack_require__(375), + Call: __webpack_require__(376), + GetFirst: __webpack_require__(377), + GridAlign: __webpack_require__(378), + IncAlpha: __webpack_require__(395), + IncX: __webpack_require__(396), + IncXY: __webpack_require__(397), + IncY: __webpack_require__(398), + PlaceOnCircle: __webpack_require__(399), + PlaceOnEllipse: __webpack_require__(400), + PlaceOnLine: __webpack_require__(401), + PlaceOnRectangle: __webpack_require__(402), + PlaceOnTriangle: __webpack_require__(403), + PlayAnimation: __webpack_require__(404), + RandomCircle: __webpack_require__(405), + RandomEllipse: __webpack_require__(406), + RandomLine: __webpack_require__(407), + RandomRectangle: __webpack_require__(408), + RandomTriangle: __webpack_require__(409), + Rotate: __webpack_require__(410), + RotateAround: __webpack_require__(411), + RotateAroundDistance: __webpack_require__(412), + ScaleX: __webpack_require__(413), + ScaleXY: __webpack_require__(414), + ScaleY: __webpack_require__(415), + SetAlpha: __webpack_require__(416), + SetBlendMode: __webpack_require__(417), + SetDepth: __webpack_require__(418), + SetHitArea: __webpack_require__(419), + SetOrigin: __webpack_require__(420), + SetRotation: __webpack_require__(421), + SetScale: __webpack_require__(422), + SetScaleX: __webpack_require__(423), + SetScaleY: __webpack_require__(424), + SetTint: __webpack_require__(425), + SetVisible: __webpack_require__(426), + SetX: __webpack_require__(427), + SetXY: __webpack_require__(428), + SetY: __webpack_require__(429), + ShiftPosition: __webpack_require__(430), + Shuffle: __webpack_require__(431), + SmootherStep: __webpack_require__(432), + SmoothStep: __webpack_require__(433), + Spread: __webpack_require__(434), + ToggleVisible: __webpack_require__(435) }; @@ -36339,9 +36249,9 @@ module.exports = ALIGN_CONST; */ var GetBottom = __webpack_require__(24); -var GetCenterX = __webpack_require__(47); +var GetCenterX = __webpack_require__(46); var SetBottom = __webpack_require__(25); -var SetCenterX = __webpack_require__(48); +var SetCenterX = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -36465,8 +36375,8 @@ module.exports = BottomRight; */ var CenterOn = __webpack_require__(173); -var GetCenterX = __webpack_require__(47); -var GetCenterY = __webpack_require__(50); +var GetCenterX = __webpack_require__(46); +var GetCenterY = __webpack_require__(49); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -36504,8 +36414,8 @@ module.exports = Center; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetCenterX = __webpack_require__(48); -var SetCenterY = __webpack_require__(49); +var SetCenterX = __webpack_require__(47); +var SetCenterY = __webpack_require__(48); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -36539,9 +36449,9 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetLeft = __webpack_require__(26); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetLeft = __webpack_require__(27); /** @@ -36581,9 +36491,9 @@ module.exports = LeftCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetRight = __webpack_require__(28); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetRight = __webpack_require__(29); /** @@ -36623,9 +36533,9 @@ module.exports = RightCenter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(47); +var GetCenterX = __webpack_require__(46); var GetTop = __webpack_require__(30); -var SetCenterX = __webpack_require__(48); +var SetCenterX = __webpack_require__(47); var SetTop = __webpack_require__(31); /** @@ -36749,7 +36659,7 @@ module.exports = TopRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CircumferencePoint = __webpack_require__(105); +var CircumferencePoint = __webpack_require__(104); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); var Point = __webpack_require__(5); @@ -36791,7 +36701,7 @@ module.exports = GetPoint; */ var Circumference = __webpack_require__(181); -var CircumferencePoint = __webpack_require__(105); +var CircumferencePoint = __webpack_require__(104); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -36870,7 +36780,7 @@ module.exports = Circumference; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoint = __webpack_require__(107); +var GetPoint = __webpack_require__(106); var Perimeter = __webpack_require__(78); // Return an array of points from the perimeter of the rectangle @@ -37533,6 +37443,7 @@ var MarchingAnts = function (rect, step, quantity, out) switch (face) { + // Top face case 0: x += step; @@ -38905,7 +38816,7 @@ module.exports = AnimationFrame; var Animation = __webpack_require__(192); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(114); +var CustomMap = __webpack_require__(113); var EventEmitter = __webpack_require__(13); var GetValue = __webpack_require__(4); var Pad = __webpack_require__(195); @@ -39577,7 +39488,7 @@ module.exports = Pad; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(114); +var CustomMap = __webpack_require__(113); var EventEmitter = __webpack_require__(13); /** @@ -39977,7 +39888,7 @@ module.exports = CacheManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Converts a hex string into a Phaser Color object. @@ -40061,7 +39972,7 @@ module.exports = GetColor32; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); var IntegerToRGB = __webpack_require__(201); /** @@ -40142,7 +40053,7 @@ module.exports = IntegerToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -40172,7 +40083,7 @@ module.exports = ObjectToColor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -40296,7 +40207,7 @@ module.exports = RandomXYZW; */ var Vector3 = __webpack_require__(51); -var Matrix4 = __webpack_require__(119); +var Matrix4 = __webpack_require__(118); var Quaternion = __webpack_require__(207); var tmpMat4 = new Matrix4(); @@ -41701,7 +41612,7 @@ module.exports = Matrix3; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(118); +var Camera = __webpack_require__(117); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -41888,7 +41799,7 @@ module.exports = OrthographicCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(118); +var Camera = __webpack_require__(117); var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); @@ -42454,7 +42365,7 @@ module.exports = CubicBezierInterpolation; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(4); var RadToDeg = __webpack_require__(216); var Vector2 = __webpack_require__(6); @@ -43071,7 +42982,7 @@ module.exports = RadToDeg; var Class = __webpack_require__(0); var Curve = __webpack_require__(66); -var FromPoints = __webpack_require__(122); +var FromPoints = __webpack_require__(121); var Rectangle = __webpack_require__(8); var Vector2 = __webpack_require__(6); @@ -43295,7 +43206,7 @@ module.exports = LineCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(123); +var CatmullRom = __webpack_require__(122); var Class = __webpack_require__(0); var Curve = __webpack_require__(66); var Vector2 = __webpack_require__(6); @@ -43571,26 +43482,26 @@ module.exports = CanvasInterpolation; * @namespace Phaser.Display.Color */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); -Color.ColorToRGBA = __webpack_require__(480); +Color.ColorToRGBA = __webpack_require__(482); Color.ComponentToHex = __webpack_require__(221); -Color.GetColor = __webpack_require__(117); +Color.GetColor = __webpack_require__(116); Color.GetColor32 = __webpack_require__(199); Color.HexStringToColor = __webpack_require__(198); -Color.HSLToColor = __webpack_require__(481); -Color.HSVColorWheel = __webpack_require__(483); +Color.HSLToColor = __webpack_require__(483); +Color.HSVColorWheel = __webpack_require__(485); Color.HSVToRGB = __webpack_require__(223); Color.HueToComponent = __webpack_require__(222); Color.IntegerToColor = __webpack_require__(200); Color.IntegerToRGB = __webpack_require__(201); -Color.Interpolate = __webpack_require__(484); +Color.Interpolate = __webpack_require__(486); Color.ObjectToColor = __webpack_require__(202); -Color.RandomRGB = __webpack_require__(485); +Color.RandomRGB = __webpack_require__(487); Color.RGBStringToColor = __webpack_require__(203); -Color.RGBToHSV = __webpack_require__(486); -Color.RGBToString = __webpack_require__(487); -Color.ValueToColor = __webpack_require__(116); +Color.RGBToHSV = __webpack_require__(488); +Color.RGBToString = __webpack_require__(489); +Color.ValueToColor = __webpack_require__(115); module.exports = Color; @@ -43680,7 +43591,7 @@ var HueToComponent = function (p, q, t) module.export = HueToComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(482)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(484)(module))) /***/ }), /* 223 */ @@ -43692,7 +43603,7 @@ module.export = HueToComponent; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetColor = __webpack_require__(117); +var GetColor = __webpack_require__(116); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -45471,16 +45382,16 @@ var ModelViewProjection = { vm[2] = 0.0; vm[3] = 0.0; vm[4] = matrix2D[2]; - vm[5] = matrix2D[3]; - vm[6] = 0.0; + vm[5] = matrix2D[3]; + vm[6] = 0.0; vm[7] = 0.0; vm[8] = matrix2D[4]; - vm[9] = matrix2D[5]; - vm[10] = 1.0; + vm[9] = matrix2D[5]; + vm[10] = 1.0; vm[11] = 0.0; - vm[12] = 0.0; - vm[13] = 0.0; - vm[14] = 0.0; + vm[12] = 0.0; + vm[13] = 0.0; + vm[14] = 0.0; vm[15] = 1.0; this.viewMatrixDirty = true; @@ -45610,10 +45521,8 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(510); +var ShaderSourceFS = __webpack_require__(512); var TextureTintPipeline = __webpack_require__(236); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); var LIGHT_COUNT = 10; @@ -45694,18 +45603,19 @@ var ForwardDiffuseLightPipeline = new Class({ var cameraMatrix = camera.matrix; var point = {x: 0, y: 0}; var height = renderer.height; + var index; - for (var index = 0; index < LIGHT_COUNT; ++index) + for (index = 0; index < LIGHT_COUNT; ++index) { renderer.setFloat1(program, 'uLights[' + index + '].radius', 0); // reset lights } - if (lightCount <= 0) return this; + if (lightCount <= 0) { return this; } renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom); renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b); - for (var index = 0; index < lightCount; ++index) + for (index = 0; index < lightCount; ++index) { var light = lights[index]; var lightName = 'uLights[' + index + '].'; @@ -46009,10 +45919,10 @@ module.exports = ForwardDiffuseLightPipeline; var Class = __webpack_require__(0); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(511); -var ShaderSourceVS = __webpack_require__(512); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); +var ShaderSourceFS = __webpack_require__(513); +var ShaderSourceVS = __webpack_require__(514); +var Utils = __webpack_require__(42); +var WebGLPipeline = __webpack_require__(126); /** * @classdesc @@ -46050,9 +45960,9 @@ var TextureTintPipeline = new Class({ fragShader: (overrideFragmentShader ? overrideFragmentShader : ShaderSourceFS), vertexCapacity: 6 * 2000, - vertexSize: - Float32Array.BYTES_PER_ELEMENT * 2 + - Float32Array.BYTES_PER_ELEMENT * 2 + + vertexSize: + Float32Array.BYTES_PER_ELEMENT * 2 + + Float32Array.BYTES_PER_ELEMENT * 2 + Uint8Array.BYTES_PER_ELEMENT * 4, attributes: [ @@ -46127,13 +46037,16 @@ var TextureTintPipeline = new Class({ * @since 3.1.0 * * @param {WebGLTexture} texture - [description] - * @param {int} textureUnit - [description] + * @param {integer} textureUnit - [description] * * @return {Phaser.Renderer.WebGL.TextureTintPipeline} [description] */ setTexture2D: function (texture, unit) { - if (!texture) return this; + if (!texture) + { + return this; + } var batches = this.batches; @@ -46193,27 +46106,32 @@ var TextureTintPipeline = new Class({ */ flush: function () { - if (this.flushLocked) return this; + if (this.flushLocked) + { + return this; + } + this.flushLocked = true; var gl = this.gl; var renderer = this.renderer; var vertexCount = this.vertexCount; - var vertexBuffer = this.vertexBuffer; - var vertexData = this.vertexData; var topology = this.topology; var vertexSize = this.vertexSize; var batches = this.batches; var batchCount = batches.length; var batchVertexCount = 0; var batch = null; - var nextBatch = null; + var batchNext; + var textureIndex; + var nTexture; - if (batchCount === 0 || vertexCount === 0) + if (batchCount === 0 || vertexCount === 0) { this.flushLocked = false; return this; } + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); for (var index = 0; index < batches.length - 1; ++index) @@ -46223,20 +46141,22 @@ var TextureTintPipeline = new Class({ if (batch.textures.length > 0) { - for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) { - var nTexture = batch.textures[textureIndex]; + nTexture = batch.textures[textureIndex]; + if (nTexture) { renderer.setTexture2D(nTexture, 1 + textureIndex); } } + gl.activeTexture(gl.TEXTURE0); } batchVertexCount = batchNext.first - batch.first; - if (batch.texture === null || batchVertexCount <= 0) continue; + if (batch.texture === null || batchVertexCount <= 0) { continue; } renderer.setTexture2D(batch.texture, 0); gl.drawArrays(topology, batch.first, batchVertexCount); @@ -46247,14 +46167,16 @@ var TextureTintPipeline = new Class({ if (batch.textures.length > 0) { - for (var textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) { - var nTexture = batch.textures[textureIndex]; + nTexture = batch.textures[textureIndex]; + if (nTexture) { renderer.setTexture2D(nTexture, 1 + textureIndex); } } + gl.activeTexture(gl.TEXTURE0); } @@ -46322,7 +46244,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function (tilemap) { if (tilemap.vertexCount > 0) { @@ -46366,12 +46288,10 @@ var TextureTintPipeline = new Class({ var emitters = emitterManager.emitters.list; var emitterCount = emitters.length; - var getTint = Utils.getTintAppendFloatAlpha; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; var cameraScrollY = camera.scrollY; @@ -46457,18 +46377,6 @@ var TextureTintPipeline = new Class({ var ty3 = xw * mvb + y * mvd + mvf; var vertexOffset = this.vertexCount * vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; @@ -46532,8 +46440,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var list = blitter.getRenderList(); var length = list.length; var cameraMatrix = camera.matrix.matrix; @@ -46559,39 +46466,27 @@ var TextureTintPipeline = new Class({ var bob = list[batchOffset + index]; var frame = bob.frame; var alpha = bob.alpha; - var tint = getTint(0xffffff, bob.alpha); + var tint = getTint(0xffffff, alpha); var uvs = frame.uvs; var flipX = bob.flipX; var flipY = bob.flipY; - var width = frame.width * (flipX ? -1.0 : 1.0); + var width = frame.width * (flipX ? -1.0 : 1.0); var height = frame.height * (flipY ? -1.0 : 1.0); var x = blitterX + bob.x + frame.x + (frame.width * ((flipX) ? 1.0 : 0.0)); var y = blitterY + bob.y + frame.y + (frame.height * ((flipY) ? 1.0 : 0.0)); - var xw = x + width; + var xw = x + width; var yh = y + height; var tx0 = x * a + y * c + e; var ty0 = x * b + y * d + f; var tx1 = xw * a + yh * c + e; var ty1 = xw * b + yh * d + f; - - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } // Bind Texture if texture wasn't bound. // This needs to be here because of multiple // texture atlas. this.setTexture2D(frame.texture.source[frame.sourceIndex].glTexture, 0); - var vertexOffset = this.vertexCount * this.vertexComponentCount; + var vertexOffset = this.vertexCount * this.vertexComponentCount; vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; @@ -46664,8 +46559,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; var texture = frame.texture.source[frame.sourceIndex].glTexture; @@ -46720,58 +46614,46 @@ var TextureTintPipeline = new Class({ var ty2 = xw * mvb + yh * mvd + mvf; var tx3 = xw * mva + y * mvc + mve; var ty3 = xw * mvb + y * mvd + mvf; - var tint0 = getTint(tintTL, alphaTL); - var tint1 = getTint(tintTR, alphaTR); - var tint2 = getTint(tintBL, alphaBL); - var tint3 = getTint(tintBR, alphaBR); + var vTintTL = getTint(tintTL, alphaTL); + var vTintTR = getTint(tintTR, alphaTR); + var vTintBL = getTint(tintBL, alphaBL); + var vTintBR = getTint(tintBR, alphaBR); var vertexOffset = 0; this.setTexture2D(texture, 0); vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = uvs.x0; vertexViewF32[vertexOffset + 3] = uvs.y0; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = uvs.x1; vertexViewF32[vertexOffset + 8] = uvs.y1; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = uvs.x2; vertexViewF32[vertexOffset + 13] = uvs.y2; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = uvs.x0; vertexViewF32[vertexOffset + 18] = uvs.y0; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = uvs.x2; vertexViewF32[vertexOffset + 23] = uvs.y2; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = uvs.x3; vertexViewF32[vertexOffset + 28] = uvs.y3; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; }, @@ -46805,15 +46687,8 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; - var a = cameraMatrix[0]; - var b = cameraMatrix[1]; - var c = cameraMatrix[2]; - var d = cameraMatrix[3]; - var e = cameraMatrix[4]; - var f = cameraMatrix[5]; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; var translateX = mesh.x - camera.scrollX * mesh.scrollFactorX; @@ -46854,12 +46729,6 @@ var TextureTintPipeline = new Class({ var tx = x * mva + y * mvc + mve; var ty = x * mvb + y * mvd + mvf; - if (roundPixels) - { - tx = ((tx * resolution)|0) / resolution; - tx = ((tx * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx; vertexViewF32[vertexOffset + 1] = ty; vertexViewF32[vertexOffset + 2] = uvs[index + 0]; @@ -46897,8 +46766,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; var cameraHeight = camera.height + 50; @@ -46913,10 +46781,10 @@ var TextureTintPipeline = new Class({ var scale = (bitmapText.fontSize / fontData.size); var chars = fontData.chars; var alpha = bitmapText.alpha; - var tint0 = getTint(bitmapText._tintTL, alpha); - var tint1 = getTint(bitmapText._tintTR, alpha); - var tint2 = getTint(bitmapText._tintBL, alpha); - var tint3 = getTint(bitmapText._tintBR, alpha); + var vTintTL = getTint(bitmapText._tintTL, alpha); + var vTintTR = getTint(bitmapText._tintTR, alpha); + var vTintBL = getTint(bitmapText._tintBL, alpha); + var vTintBR = getTint(bitmapText._tintBR, alpha); var srcX = bitmapText.x; var srcY = bitmapText.y; var textureX = frame.cutX; @@ -46937,6 +46805,16 @@ var TextureTintPipeline = new Class({ var y = 0; var xw = 0; var yh = 0; + + var tx0; + var ty0; + var tx1; + var ty1; + var tx2; + var ty2; + var tx3; + var ty3; + var umin = 0; var umax = 0; var vmin = 0; @@ -47005,7 +46883,7 @@ var TextureTintPipeline = new Class({ { var kerningOffset = glyph.kerning[lastCharCode]; x += (kerningOffset !== undefined) ? kerningOffset : 0; - } + } xAdvance += glyph.xAdvance; indexCount += 1; @@ -47018,6 +46896,9 @@ var TextureTintPipeline = new Class({ continue; } + x -= bitmapText.displayOriginX; + y -= bitmapText.displayOriginY; + xw = x + glyphW * scale; yh = y + glyphH * scale; tx0 = x * mva + y * mvc + mve; @@ -47049,48 +46930,36 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; vertexViewF32[vertexOffset + 3] = vmin; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = umin; vertexViewF32[vertexOffset + 8] = vmax; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = umax; vertexViewF32[vertexOffset + 13] = vmax; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = umin; vertexViewF32[vertexOffset + 18] = vmin; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = umax; vertexViewF32[vertexOffset + 23] = vmax; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = umax; vertexViewF32[vertexOffset + 28] = vmin; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; } @@ -47121,8 +46990,7 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; var textureSource = bitmapText.texture.source[frame.sourceIndex]; @@ -47135,10 +47003,10 @@ var TextureTintPipeline = new Class({ var scale = (bitmapText.fontSize / fontData.size); var chars = fontData.chars; var alpha = bitmapText.alpha; - var tint0 = getTint(bitmapText._tintTL, alpha); - var tint1 = getTint(bitmapText._tintTR, alpha); - var tint2 = getTint(bitmapText._tintBL, alpha); - var tint3 = getTint(bitmapText._tintBR, alpha); + var vTintTL = getTint(bitmapText._tintTL, alpha); + var vTintTR = getTint(bitmapText._tintTR, alpha); + var vTintBL = getTint(bitmapText._tintBL, alpha); + var vTintBR = getTint(bitmapText._tintBR, alpha); var srcX = bitmapText.x; var srcY = bitmapText.y; var textureX = frame.cutX; @@ -47158,6 +47026,14 @@ var TextureTintPipeline = new Class({ var x = 0; var y = 0; var xw = 0; + var tx0; + var ty0; + var tx1; + var ty1; + var tx2; + var ty2; + var tx3; + var ty3; var yh = 0; var umin = 0; var umax = 0; @@ -47199,12 +47075,12 @@ var TextureTintPipeline = new Class({ if (crop) { renderer.pushScissor( - bitmapText.x, - bitmapText.y, - bitmapText.cropWidth * bitmapText.scaleX, + bitmapText.x, + bitmapText.y, + bitmapText.cropWidth * bitmapText.scaleX, bitmapText.cropHeight * bitmapText.scaleY ); - } + } for (var index = 0; index < textLength; ++index) { @@ -47257,21 +47133,21 @@ var TextureTintPipeline = new Class({ if (displayCallback) { - var output = displayCallback({ - color: 0, - tint: { - topLeft: tint0, - topRight: tint1, - bottomLeft: tint2, - bottomRight: tint3 - }, - index: index, - charCode: charCode, - x: x, - y: y, - scale: scale, - rotation: 0, - data: glyph.data + var output = displayCallback({ + color: 0, + tint: { + topLeft: vTintTL, + topRight: vTintTR, + bottomLeft: vTintBL, + bottomRight: vTintBR + }, + index: index, + charCode: charCode, + x: x, + y: y, + scale: scale, + rotation: 0, + data: glyph.data }); x = output.x; @@ -47281,25 +47157,27 @@ var TextureTintPipeline = new Class({ if (output.color) { - tint0 = output.color; - tint1 = output.color; - tint2 = output.color; - tint3 = output.color; + vTintTL = output.color; + vTintTR = output.color; + vTintBL = output.color; + vTintBR = output.color; } else { - tint0 = output.tint.topLeft; - tint1 = output.tint.topRight; - tint2 = output.tint.bottomLeft; - tint3 = output.tint.bottomRight; + vTintTL = output.tint.topLeft; + vTintTR = output.tint.topRight; + vTintBL = output.tint.bottomLeft; + vTintBR = output.tint.bottomRight; } - tint0 = getTint(tint0, alpha); - tint1 = getTint(tint1, alpha); - tint2 = getTint(tint2, alpha); - tint3 = getTint(tint3, alpha); + vTintTL = getTint(vTintTL, alpha); + vTintTR = getTint(vTintTR, alpha); + vTintBL = getTint(vTintBL, alpha); + vTintBR = getTint(vTintBR, alpha); } + x -= bitmapText.displayOriginX; + y -= bitmapText.displayOriginY; x *= scale; y *= scale; x -= cameraScrollX; @@ -47344,48 +47222,36 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = umin; vertexViewF32[vertexOffset + 3] = vmin; - vertexViewU32[vertexOffset + 4] = tint0; + vertexViewU32[vertexOffset + 4] = vTintTL; vertexViewF32[vertexOffset + 5] = tx1; vertexViewF32[vertexOffset + 6] = ty1; vertexViewF32[vertexOffset + 7] = umin; vertexViewF32[vertexOffset + 8] = vmax; - vertexViewU32[vertexOffset + 9] = tint1; + vertexViewU32[vertexOffset + 9] = vTintBL; vertexViewF32[vertexOffset + 10] = tx2; vertexViewF32[vertexOffset + 11] = ty2; vertexViewF32[vertexOffset + 12] = umax; vertexViewF32[vertexOffset + 13] = vmax; - vertexViewU32[vertexOffset + 14] = tint2; + vertexViewU32[vertexOffset + 14] = vTintBR; vertexViewF32[vertexOffset + 15] = tx0; vertexViewF32[vertexOffset + 16] = ty0; vertexViewF32[vertexOffset + 17] = umin; vertexViewF32[vertexOffset + 18] = vmin; - vertexViewU32[vertexOffset + 19] = tint0; + vertexViewU32[vertexOffset + 19] = vTintTL; vertexViewF32[vertexOffset + 20] = tx2; vertexViewF32[vertexOffset + 21] = ty2; vertexViewF32[vertexOffset + 22] = umax; vertexViewF32[vertexOffset + 23] = vmax; - vertexViewU32[vertexOffset + 24] = tint2; + vertexViewU32[vertexOffset + 24] = vTintBR; vertexViewF32[vertexOffset + 25] = tx3; vertexViewF32[vertexOffset + 26] = ty3; vertexViewF32[vertexOffset + 27] = umax; vertexViewF32[vertexOffset + 28] = vmin; - vertexViewU32[vertexOffset + 29] = tint3; + vertexViewU32[vertexOffset + 29] = vTintTR; this.vertexCount += 6; } @@ -47421,9 +47287,9 @@ var TextureTintPipeline = new Class({ text.scrollFactorX, text.scrollFactorY, text.displayOriginX, text.displayOriginY, 0, 0, text.canvasTexture.width, text.canvasTexture.height, - getTint(text._tintTL, text._alphaTL), - getTint(text._tintTR, text._alphaTR), - getTint(text._tintBL, text._alphaBL), + getTint(text._tintTL, text._alphaTL), + getTint(text._tintTR, text._alphaTR), + getTint(text._tintBL, text._alphaBL), getTint(text._tintBR, text._alphaBR), 0, 0, camera @@ -47483,7 +47349,7 @@ var TextureTintPipeline = new Class({ 0, 0, camera ); - } + } }, /** @@ -47502,7 +47368,7 @@ var TextureTintPipeline = new Class({ this.batchTexture( tileSprite, tileSprite.tileTexture, - tileSprite.frame.width, tileSprite.frame.height, + tileSprite.frame.width, tileSprite.frame.height, tileSprite.x, tileSprite.y, tileSprite.width, tileSprite.height, tileSprite.scaleX, tileSprite.scaleY, @@ -47511,11 +47377,11 @@ var TextureTintPipeline = new Class({ tileSprite.scrollFactorX, tileSprite.scrollFactorY, tileSprite.originX * tileSprite.width, tileSprite.originY * tileSprite.height, 0, 0, tileSprite.width, tileSprite.height, - getTint(tileSprite._tintTL, tileSprite._alphaTL), - getTint(tileSprite._tintTR, tileSprite._alphaTR), - getTint(tileSprite._tintBL, tileSprite._alphaBL), + getTint(tileSprite._tintTL, tileSprite._alphaTL), + getTint(tileSprite._tintTR, tileSprite._alphaTR), + getTint(tileSprite._tintBL, tileSprite._alphaBL), getTint(tileSprite._tintBR, tileSprite._alphaBR), - tileSprite.tilePositionX / tileSprite.frame.width, + tileSprite.tilePositionX / tileSprite.frame.width, tileSprite.tilePositionY / tileSprite.frame.height, camera ); @@ -47529,8 +47395,8 @@ var TextureTintPipeline = new Class({ * * @param {Phaser.GameObjects.GameObject} gameObject - [description] * @param {WebGLTexture} texture - [description] - * @param {int} textureWidth - [description] - * @param {int} textureHeight - [description] + * @param {integer} textureWidth - [description] + * @param {integer} textureHeight - [description] * @param {float} srcX - [description] * @param {float} srcY - [description] * @param {float} srcWidth - [description] @@ -47548,10 +47414,10 @@ var TextureTintPipeline = new Class({ * @param {float} frameY - [description] * @param {float} frameWidth - [description] * @param {float} frameHeight - [description] - * @param {int} tintTL - [description] - * @param {int} tintTR - [description] - * @param {int} tintBL - [description] - * @param {int} tintBR - [description] + * @param {integer} tintTL - [description] + * @param {integer} tintTR - [description] + * @param {integer} tintBL - [description] + * @param {integer} tintBR - [description] * @param {float} uOffset - [description] * @param {float} vOffset - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] @@ -47582,12 +47448,10 @@ var TextureTintPipeline = new Class({ flipY = flipY ^ (texture.isRenderTexture ? 1 : 0); rotation = -rotation; - var getTint = Utils.getTintAppendFloatAlpha; var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var roundPixels = camera.roundPixels; - var resolution = renderer.config.resolution; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); var height = srcHeight * (flipY ? -1.0 : 1.0); @@ -47635,18 +47499,6 @@ var TextureTintPipeline = new Class({ vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewF32[vertexOffset + 2] = u0; @@ -47690,7 +47542,7 @@ var TextureTintPipeline = new Class({ * @param {Phaser.GameObjects.Graphics} graphics - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchGraphics: function (graphics, camera) + batchGraphics: function () { // Stub } @@ -48474,11 +48326,12 @@ var GamepadManager = new Class({ * * @method Phaser.Input.Gamepad.GamepadManager#removePad * @since 3.0.0 + * @todo Code this feature * * @param {[type]} index - [description] * @param {[type]} pad - [description] */ - removePad: function (index, pad) + removePad: function () { // TODO }, @@ -49053,9 +48906,9 @@ var EventEmitter = __webpack_require__(13); var Key = __webpack_require__(243); var KeyCodes = __webpack_require__(128); var KeyCombo = __webpack_require__(244); -var KeyMap = __webpack_require__(522); -var ProcessKeyDown = __webpack_require__(523); -var ProcessKeyUp = __webpack_require__(524); +var KeyMap = __webpack_require__(524); +var ProcessKeyDown = __webpack_require__(525); +var ProcessKeyUp = __webpack_require__(526); /** * @classdesc @@ -49680,8 +49533,8 @@ module.exports = Key; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(519); -var ResetKeyCombo = __webpack_require__(521); +var ProcessKeyCombo = __webpack_require__(521); +var ResetKeyCombo = __webpack_require__(523); /** * @classdesc @@ -49949,7 +49802,7 @@ module.exports = KeyCombo; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(125); +var Features = __webpack_require__(124); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md @@ -50600,7 +50453,7 @@ var Pointer = new Class({ * @param {[type]} event - [description] * @param {[type]} time - [description] */ - touchmove: function (event, time) + touchmove: function (event) { this.event = event; @@ -50623,7 +50476,7 @@ var Pointer = new Class({ * @param {[type]} event - [description] * @param {[type]} time - [description] */ - move: function (event, time) + move: function (event) { if (event.buttons) { @@ -51157,7 +51010,7 @@ module.exports = TransformXY; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(84); +var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Scene = __webpack_require__(250); @@ -52399,9 +52252,9 @@ module.exports = UppercaseFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CONST = __webpack_require__(84); +var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); -var InjectionMap = __webpack_require__(527); +var InjectionMap = __webpack_require__(529); /** * Takes a Scene configuration object and returns a fully formed Systems object. @@ -52489,6 +52342,7 @@ var WebAudioSoundManager = __webpack_require__(258); * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. * * @function Phaser.Sound.SoundManagerCreator + * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. @@ -52527,9 +52381,8 @@ module.exports = SoundManagerCreator; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSoundManager = __webpack_require__(85); +var BaseSoundManager = __webpack_require__(84); var HTML5AudioSound = __webpack_require__(255); /** @@ -52541,16 +52394,12 @@ var HTML5AudioSound = __webpack_require__(255); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. */ var HTML5AudioSoundManager = new Class({ - Extends: BaseSoundManager, - - initialize: - - function HTML5AudioSoundManager (game) + initialize: function HTML5AudioSoundManager (game) { /** * Flag indicating whether if there are no idle instances of HTML5 Audio tag, @@ -52606,7 +52455,6 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 */ this.onBlurPausedSounds = []; - this.locked = 'ontouchstart' in window; /** @@ -52645,7 +52493,6 @@ var HTML5AudioSoundManager = new Class({ * @since 3.0.0 */ this._volume = 1; - BaseSoundManager.call(this, game); }, @@ -52654,10 +52501,10 @@ var HTML5AudioSoundManager = new Class({ * * @method Phaser.Sound.HTML5AudioSoundManager#add * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * * @return {Phaser.Sound.HTML5AudioSound} The new sound instance. */ add: function (key, config) @@ -52796,11 +52643,11 @@ var HTML5AudioSoundManager = new Class({ * @method Phaser.Sound.HTML5AudioSoundManager#isLocked * @protected * @since 3.0.0 - * + * * @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action. * @param {string} prop - Name of the method to be called or property to be assigned a value to. * @param {*} [value] - An optional parameter that either holds an array of arguments to be passed to the method call or value to be set to the property. - * + * * @return {boolean} Whether the sound manager is locked. */ isLocked: function (sound, prop, value) @@ -52817,21 +52664,11 @@ var HTML5AudioSoundManager = new Class({ return false; } }); - -/** - * Global mute setting. - * - * @name Phaser.Sound.HTML5AudioSoundManager#mute - * @type {boolean} - * @since 3.0.0 - */ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { - get: function () { return this._mute; }, - set: function (value) { this._mute = value; @@ -52847,23 +52684,12 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Global volume setting. - * - * @name Phaser.Sound.HTML5AudioSoundManager#volume - * @type {number} - * @since 3.0.0 - */ Object.defineProperty(HTML5AudioSoundManager.prototype, 'volume', { - get: function () { return this._volume; }, - set: function (value) { this._volume = value; @@ -52879,9 +52705,7 @@ Object.defineProperty(HTML5AudioSoundManager.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - module.exports = HTML5AudioSoundManager; @@ -52894,9 +52718,8 @@ module.exports = HTML5AudioSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSound = __webpack_require__(86); +var BaseSound = __webpack_require__(85); /** * @classdesc @@ -52908,18 +52731,14 @@ var BaseSound = __webpack_require__(86); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var HTML5AudioSound = new Class({ - Extends: BaseSound, - - initialize: - - function HTML5AudioSound (manager, key, config) + initialize: function HTML5AudioSound (manager, key, config) { if (config === void 0) { config = {}; } @@ -52934,9 +52753,9 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 */ this.tags = manager.game.cache.audio.get(key); - if (!this.tags) { + // eslint-disable-next-line no-console console.error('No audio loaded in cache with key: \'' + key + '\'!'); return; } @@ -52976,11 +52795,8 @@ var HTML5AudioSound = new Class({ * @since 3.0.0 */ this.previousTime = 0; - this.duration = this.tags[0].duration; - this.totalDuration = this.tags[0].duration; - BaseSound.call(this, manager, key, config); }, @@ -52991,10 +52807,10 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#play * @since 3.0.0 - * + * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. - * + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) @@ -53003,7 +52819,6 @@ var HTML5AudioSound = new Class({ { return false; } - if (!BaseSound.prototype.play.call(this, markerName, config)) { return false; @@ -53020,7 +52835,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('play', this); - return true; }, @@ -53029,7 +52843,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -53038,12 +52852,10 @@ var HTML5AudioSound = new Class({ { return false; } - if (this.startTime > 0) { return false; } - if (!BaseSound.prototype.pause.call(this)) { return false; @@ -53059,7 +52871,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('pause', this); - return true; }, @@ -53068,7 +52879,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -53077,12 +52888,10 @@ var HTML5AudioSound = new Class({ { return false; } - if (this.startTime > 0) { return false; } - if (!BaseSound.prototype.resume.call(this)) { return false; @@ -53099,7 +52908,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('resume', this); - return true; }, @@ -53108,7 +52916,7 @@ var HTML5AudioSound = new Class({ * * @method Phaser.Sound.HTML5AudioSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -53117,7 +52925,6 @@ var HTML5AudioSound = new Class({ { return false; } - if (!BaseSound.prototype.stop.call(this)) { return false; @@ -53131,7 +52938,6 @@ var HTML5AudioSound = new Class({ * @param {Phaser.Sound.HTML5AudioSound} sound - Reference to the sound that emitted event. */ this.emit('stop', this); - return true; }, @@ -53141,7 +52947,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag * @private * @since 3.0.0 - * + * * @return {boolean} Whether the sound was assigned an audio tag successfully. */ pickAndPlayAudioTag: function () @@ -53151,18 +52957,15 @@ var HTML5AudioSound = new Class({ this.reset(); return false; } - var seek = this.currentConfig.seek; var delay = this.currentConfig.delay; var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek; this.previousTime = offset; this.audio.currentTime = offset; this.applyConfig(); - if (delay === 0) { this.startTime = 0; - if (this.audio.paused) { this.playCatchPromise(); @@ -53171,15 +52974,12 @@ var HTML5AudioSound = new Class({ else { this.startTime = window.performance.now() + delay * 1000; - if (!this.audio.paused) { this.audio.pause(); } } - this.resetConfig(); - return true; }, @@ -53193,7 +52993,7 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#pickAudioTag * @private * @since 3.0.0 - * + * * @return {boolean} Whether the sound was assigned an audio tag successfully. */ pickAudioTag: function () @@ -53205,7 +53005,6 @@ var HTML5AudioSound = new Class({ for (var i = 0; i < this.tags.length; i++) { var audio = this.tags[i]; - if (audio.dataset.used === 'false') { audio.dataset.used = 'true'; @@ -53213,14 +53012,11 @@ var HTML5AudioSound = new Class({ return true; } } - if (!this.manager.override) { return false; } - var otherSounds = []; - this.manager.forEachActiveSound(function (sound) { if (sound.key === this.key && sound.audio) @@ -53228,7 +53024,6 @@ var HTML5AudioSound = new Class({ otherSounds.push(sound); } }, this); - otherSounds.sort(function (a1, a2) { if (a1.loop === a2.loop) @@ -53238,15 +53033,12 @@ var HTML5AudioSound = new Class({ } return a1.loop ? 1 : -1; }); - var selectedSound = otherSounds[0]; - this.audio = selectedSound.audio; selectedSound.reset(); selectedSound.audio = null; selectedSound.startTime = 0; selectedSound.previousTime = 0; - return true; }, @@ -53261,9 +53053,9 @@ var HTML5AudioSound = new Class({ playCatchPromise: function () { var playPromise = this.audio.play(); - if (playPromise) { + // eslint-disable-next-line no-unused-vars playPromise.catch(function (reason) { }); } }, @@ -53336,10 +53128,11 @@ var HTML5AudioSound = new Class({ * @method Phaser.Sound.HTML5AudioSound#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ + // eslint-disable-next-line no-unused-vars update: function (time, delta) { if (!this.isPlaying) @@ -53463,20 +53256,11 @@ var HTML5AudioSound = new Class({ } } }); - -/** - * Mute setting. - * - * @name Phaser.Sound.HTML5AudioSound#mute - * @type {boolean} - */ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { - get: function () { return this.currentConfig.mute; }, - set: function (value) { this.currentConfig.mute = value; @@ -53493,22 +53277,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Volume setting. - * - * @name Phaser.Sound.HTML5AudioSound#volume - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { - get: function () { return this.currentConfig.volume; }, - set: function (value) { this.currentConfig.volume = value; @@ -53525,22 +53299,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - -/** - * Playback rate. - * - * @name Phaser.Sound.HTML5AudioSound#rate - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'rate', { - get: function () { return Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').get.call(this); }, - set: function (value) { this.currentConfig.rate = value; @@ -53550,22 +53314,12 @@ Object.defineProperty(HTML5AudioSound.prototype, 'rate', { } Object.getOwnPropertyDescriptor(BaseSound.prototype, 'rate').set.call(this, value); } - }); - -/** - * Detuning of sound. - * - * @name Phaser.Sound.HTML5AudioSound#detune - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { - get: function () { return Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').get.call(this); }, - set: function (value) { this.currentConfig.detune = value; @@ -53575,17 +53329,8 @@ Object.defineProperty(HTML5AudioSound.prototype, 'detune', { } Object.getOwnPropertyDescriptor(BaseSound.prototype, 'detune').set.call(this, value); } - }); - -/** - * Current position of playing sound. - * - * @name Phaser.Sound.HTML5AudioSound#seek - * @type {number} - */ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { - get: function () { if (this.isPlaying) @@ -53602,7 +53347,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { return 0; } }, - set: function (value) { if (this.manager.isLocked(this, 'seek', value)) @@ -53635,21 +53379,11 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', { } } }); - -/** - * Property indicating whether or not - * the sound or current sound marker will loop. - * - * @name Phaser.Sound.HTML5AudioSound#loop - * @type {boolean} - */ Object.defineProperty(HTML5AudioSound.prototype, 'loop', { - get: function () { return this.currentConfig.loop; }, - set: function (value) { this.currentConfig.loop = value; @@ -53669,9 +53403,7 @@ Object.defineProperty(HTML5AudioSound.prototype, 'loop', { */ this.emit('loop', this, value); } - }); - module.exports = HTML5AudioSound; @@ -53684,8 +53416,7 @@ module.exports = HTML5AudioSound; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - -var BaseSoundManager = __webpack_require__(85); +var BaseSoundManager = __webpack_require__(84); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var NoAudioSound = __webpack_require__(257); @@ -53701,7 +53432,7 @@ var NOOP = __webpack_require__(3); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSoundManager - * @extends EventEmitter + * @extends Phaser.Sound.BaseSoundManager * @memberOf Phaser.Sound * @constructor * @author Pavle Goloskokovic (http://prunegames.com) @@ -53710,224 +53441,62 @@ var NOOP = __webpack_require__(3); * @param {Phaser.Game} game - Reference to the current game instance. */ var NoAudioSoundManager = new Class({ - Extends: EventEmitter, - - initialize: - - function NoAudioSoundManager (game) + initialize: function NoAudioSoundManager (game) { EventEmitter.call(this); - - /** - * Reference to the current game instance. - * - * @name Phaser.Sound.NoAudioSoundManager#game - * @type {Phaser.Game} - * @since 3.0.0 - */ this.game = game; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#sounds - * @type {array} - * @default [] - * @since 3.0.0 - */ this.sounds = []; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#mute - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.mute = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#volume - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.volume = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.rate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.detune = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#pauseOnBlur - * @type {boolean} - * @default true - * @since 3.0.0 - */ this.pauseOnBlur = true; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSoundManager#locked - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.locked = false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#add - * @since 3.0.0 - * - * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {ISound} The new sound instance. - */ add: function (key, config) { var sound = new NoAudioSound(this, key, config); - this.sounds.push(sound); - return sound; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#addAudioSprite - * @since 3.0.0 - * - * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * - * @return {IAudioSpriteSound} The new audio sprite sound instance. - */ addAudioSprite: function (key, config) { var sound = this.add(key, config); sound.spritemap = {}; return sound; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#play - * @since 3.0.0 - * - * @return {boolean} No Audio methods always return `false`. - */ - play: function () + // eslint-disable-next-line no-unused-vars + play: function (key, extra) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#playAudioSprite - * @since 3.0.0 - * - * @return {boolean} No Audio methods always return `false`. - */ - playAudioSprite: function () + // eslint-disable-next-line no-unused-vars + playAudioSprite: function (key, spriteName, config) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#remove - * @since 3.0.0 - * - * @param {ISound} sound - The sound object to remove. - * - * @return {boolean} True if the sound was removed successfully, otherwise false. - */ remove: function (sound) { return BaseSoundManager.prototype.remove.call(this, sound); }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#removeByKey - * @since 3.0.0 - * - * @param {string} key - The key to match when removing sound objects. - * - * @return {number} The number of matching sound objects that were removed. - */ removeByKey: function (key) { return BaseSoundManager.prototype.removeByKey.call(this, key); }, - pauseAll: NOOP, - resumeAll: NOOP, - stopAll: NOOP, - update: NOOP, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#destroy - * @since 3.0.0 - */ destroy: function () { BaseSoundManager.prototype.destroy.call(this); }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSoundManager#forEachActiveSound - * @since 3.0.0 - * - * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param [scope] - Callback context. - */ forEachActiveSound: function (callbackfn, scope) { BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope); } - }); - module.exports = NoAudioSoundManager; @@ -53940,8 +53509,7 @@ module.exports = NoAudioSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - -var BaseSound = __webpack_require__(86); +var BaseSound = __webpack_require__(85); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); var Extend = __webpack_require__(23); @@ -53956,103 +53524,29 @@ var Extend = __webpack_require__(23); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSound - * @extends EventEmitter + * @extends Phaser.Sound.BaseSound * @memberOf Phaser.Sound * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var NoAudioSound = new Class({ - Extends: EventEmitter, - - initialize: - - function NoAudioSound (manager, key, config) + initialize: function NoAudioSound (manager, key, config) { if (config === void 0) { config = {}; } - EventEmitter.call(this); - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#manager - * @type {Phaser.Sound.NoAudioSoundManager} - * @since 3.0.0 - */ this.manager = manager; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#key - * @type {string} - * @since 3.0.0 - */ this.key = key; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.isPlaying = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#isPaused - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.isPaused = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#totalRate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.totalRate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.duration = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#totalDuration - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.totalDuration = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#config - * @type {object} - * @since 3.0.0 - */ this.config = Extend({ mute: false, volume: 1, @@ -54062,213 +53556,55 @@ var NoAudioSound = new Class({ loop: false, delay: 0 }, config); - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#currentConfig - * @type {[type]} - * @since 3.0.0 - */ this.currentConfig = this.config; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#mute - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.mute = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#volume - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.volume = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ this.rate = 1; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.detune = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#seek - * @type {number} - * @default 0 - * @since 3.0.0 - */ this.seek = 0; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#loop - * @type {boolean} - * @default false - * @since 3.0.0 - */ this.loop = false; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#markers - * @type {object} - * @default {} - * @since 3.0.0 - */ this.markers = {}; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#currentMarker - * @type {?[type]} - * @default null - * @since 3.0.0 - */ this.currentMarker = null; - - /** - * [description] - * - * @name Phaser.Sound.NoAudioSound#pendingRemove - * @type {boolean} - * @default null - * @since 3.0.0 - */ this.pendingRemove = false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#addMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - addMarker: function () + // eslint-disable-next-line no-unused-vars + addMarker: function (marker) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#updateMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - updateMarker: function () + // eslint-disable-next-line no-unused-vars + updateMarker: function (marker) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#removeMarker - * @since 3.0.0 - * - * @return {boolean} False - */ - removeMarker: function () + // eslint-disable-next-line no-unused-vars + removeMarker: function (markerName) { return null; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#play - * @since 3.0.0 - * - * @return {boolean} False - */ - play: function () + // eslint-disable-next-line no-unused-vars + play: function (markerName, config) { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#pause - * @since 3.0.0 - * - * @return {boolean} False - */ pause: function () { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#resume - * @since 3.0.0 - * - * @return {boolean} False - */ resume: function () { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#stop - * @since 3.0.0 - * - * @return {boolean} False - */ stop: function () { return false; }, - - /** - * [description] - * - * @method Phaser.Sound.NoAudioSound#destroy - * @since 3.0.0 - */ destroy: function () { this.manager.remove(this); - BaseSound.prototype.destroy.call(this); } - }); - module.exports = NoAudioSound; @@ -54281,9 +53617,8 @@ module.exports = NoAudioSound; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSoundManager = __webpack_require__(85); +var BaseSoundManager = __webpack_require__(84); var WebAudioSound = __webpack_require__(259); /** @@ -54296,22 +53631,19 @@ var WebAudioSound = __webpack_require__(259); * @constructor * @author Pavle Goloskokovic (http://prunegames.com) * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. */ var WebAudioSoundManager = new Class({ - Extends: BaseSoundManager, - - initialize: - - function WebAudioSoundManager (game) + initialize: function WebAudioSoundManager (game) { /** * The AudioContext being used for playback. * * @name Phaser.Sound.WebAudioSoundManager#context * @type {AudioContext} + * @private * @since 3.0.0 */ this.context = this.createAudioContext(game); @@ -54321,6 +53653,7 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#masterMuteNode * @type {GainNode} + * @private * @since 3.0.0 */ this.masterMuteNode = this.context.createGain(); @@ -54330,12 +53663,11 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#masterVolumeNode * @type {GainNode} + * @private * @since 3.0.0 */ this.masterVolumeNode = this.context.createGain(); - this.masterMuteNode.connect(this.masterVolumeNode); - this.masterVolumeNode.connect(this.context.destination); /** @@ -54343,19 +53675,11 @@ var WebAudioSoundManager = new Class({ * * @name Phaser.Sound.WebAudioSoundManager#destination * @type {AudioNode} + * @private * @since 3.0.0 */ this.destination = this.masterMuteNode; - - /** - * Is the Sound Manager touch locked? - * - * @name Phaser.Sound.WebAudioSoundManager#locked - * @type {boolean} - * @since 3.0.0 - */ this.locked = this.context.state === 'suspended' && 'ontouchstart' in window; - BaseSoundManager.call(this, game); }, @@ -54369,21 +53693,19 @@ var WebAudioSoundManager = new Class({ * @method Phaser.Sound.WebAudioSoundManager#createAudioContext * @private * @since 3.0.0 - * + * * @param {Phaser.Game} game - Reference to the current game instance. - * + * * @return {AudioContext} The AudioContext instance to be used for playback. */ createAudioContext: function (game) { var audioConfig = game.config.audio; - if (audioConfig && audioConfig.context) { audioConfig.context.resume(); return audioConfig.context; } - return new AudioContext(); }, @@ -54392,18 +53714,16 @@ var WebAudioSoundManager = new Class({ * * @method Phaser.Sound.WebAudioSoundManager#add * @since 3.0.0 - * + * * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config] - An optional config object containing default sound settings. - * + * @param {SoundConfig} [config] - An optional config object containing default sound settings. + * * @return {Phaser.Sound.WebAudioSound} The new sound instance. */ add: function (key, config) { var sound = new WebAudioSound(this, key, config); - this.sounds.push(sound); - return sound; }, @@ -54419,7 +53739,6 @@ var WebAudioSoundManager = new Class({ unlock: function () { var _this = this; - var unlock = function () { _this.context.resume().then(function () @@ -54429,7 +53748,6 @@ var WebAudioSoundManager = new Class({ _this.unlocked = true; }); }; - document.body.addEventListener('touchstart', unlock, false); document.body.addEventListener('touchend', unlock, false); }, @@ -54469,30 +53787,28 @@ var WebAudioSoundManager = new Class({ */ destroy: function () { - BaseSoundManager.prototype.destroy.call(this); this.destination = null; this.masterVolumeNode.disconnect(); this.masterVolumeNode = null; this.masterMuteNode.disconnect(); this.masterMuteNode = null; - this.context.suspend(); + if (this.game.config.audio && this.game.config.audio.context) + { + this.context.suspend(); + } + else + { + this.context.close(); + } this.context = null; + BaseSoundManager.prototype.destroy.call(this); } }); - -/** - * Global mute setting. - * - * @name Phaser.Sound.WebAudioSoundManager#mute - * @type {boolean} - */ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { - get: function () { return this.masterMuteNode.gain.value === 0; }, - set: function (value) { this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0); @@ -54504,22 +53820,12 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Global volume setting. - * - * @name Phaser.Sound.WebAudioSoundManager#volume - * @type {number} - */ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { - get: function () { return this.masterVolumeNode.gain.value; }, - set: function (value) { this.masterVolumeNode.gain.setValueAtTime(value, 0); @@ -54531,9 +53837,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - module.exports = WebAudioSoundManager; @@ -54546,9 +53850,8 @@ module.exports = WebAudioSoundManager; * @copyright 2018 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ - var Class = __webpack_require__(0); -var BaseSound = __webpack_require__(86); +var BaseSound = __webpack_require__(85); /** * @classdesc @@ -54563,15 +53866,11 @@ var BaseSound = __webpack_require__(86); * * @param {Phaser.Sound.WebAudioSoundManager} manager - Reference to the current sound manager instance. * @param {string} key - Asset key for the sound. - * @param {ISoundConfig} [config={}] - An optional config object containing default sound settings. + * @param {SoundConfig} [config={}] - An optional config object containing default sound settings. */ var WebAudioSound = new Class({ - Extends: BaseSound, - - initialize: - - function WebAudioSound (manager, key, config) + initialize: function WebAudioSound (manager, key, config) { if (config === void 0) { config = {}; } @@ -54584,9 +53883,9 @@ var WebAudioSound = new Class({ * @since 3.0.0 */ this.audioBuffer = manager.game.cache.audio.get(key); - if (!this.audioBuffer) { + // eslint-disable-next-line no-console console.error('No audio loaded in cache with key: \'' + key + '\'!'); return; } @@ -54597,6 +53896,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#source * @type {AudioBufferSourceNode} + * @private * @default null * @since 3.0.0 */ @@ -54607,6 +53907,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#loopSource * @type {AudioBufferSourceNode} + * @private * @default null * @since 3.0.0 */ @@ -54617,6 +53918,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#muteNode * @type {GainNode} + * @private * @since 3.0.0 */ this.muteNode = manager.context.createGain(); @@ -54626,6 +53928,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#volumeNode * @type {GainNode} + * @private * @since 3.0.0 */ this.volumeNode = manager.context.createGain(); @@ -54636,6 +53939,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#playTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ @@ -54647,6 +53951,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#startTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ @@ -54658,6 +53963,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#loopTime * @type {number} + * @private * @default 0 * @since 3.0.0 */ @@ -54670,6 +53976,7 @@ var WebAudioSound = new Class({ * @name Phaser.Sound.WebAudioSound#rateUpdates * @type {array} * @private + * @default [] * @since 3.0.0 */ this.rateUpdates = []; @@ -54680,6 +53987,7 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#hasEnded * @type {boolean} + * @private * @default false * @since 3.0.0 */ @@ -54691,33 +53999,15 @@ var WebAudioSound = new Class({ * * @name Phaser.Sound.WebAudioSound#hasLooped * @type {boolean} + * @private * @default false * @since 3.0.0 */ this.hasLooped = false; - this.muteNode.connect(this.volumeNode); - this.volumeNode.connect(manager.destination); - - /** - * [description] - * - * @name Phaser.Sound.WebAudioSound#duration - * @type {number} - * @since 3.0.0 - */ this.duration = this.audioBuffer.duration; - - /** - * [description] - * - * @name Phaser.Sound.WebAudioSound#totalDuration - * @type {number} - * @since 3.0.0 - */ this.totalDuration = this.audioBuffer.duration; - BaseSound.call(this, manager, key, config); }, @@ -54728,10 +54018,10 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#play * @since 3.0.0 - * + * * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound. - * @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. - * + * @param {SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * * @return {boolean} Whether the sound started playing successfully. */ play: function (markerName, config) @@ -54750,7 +54040,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('play', this); - return true; }, @@ -54759,7 +54048,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#pause * @since 3.0.0 - * + * * @return {boolean} Whether the sound was paused successfully. */ pause: function () @@ -54768,7 +54057,6 @@ var WebAudioSound = new Class({ { return false; } - if (!BaseSound.prototype.pause.call(this)) { return false; @@ -54783,7 +54071,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('pause', this); - return true; }, @@ -54792,7 +54079,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#resume * @since 3.0.0 - * + * * @return {boolean} Whether the sound was resumed successfully. */ resume: function () @@ -54801,7 +54088,6 @@ var WebAudioSound = new Class({ { return false; } - if (!BaseSound.prototype.resume.call(this)) { return false; @@ -54815,7 +54101,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('resume', this); - return true; }, @@ -54824,7 +54109,7 @@ var WebAudioSound = new Class({ * * @method Phaser.Sound.WebAudioSound#stop * @since 3.0.0 - * + * * @return {boolean} Whether the sound was stopped successfully. */ stop: function () @@ -54842,7 +54127,6 @@ var WebAudioSound = new Class({ * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. */ this.emit('stop', this); - return true; }, @@ -54892,17 +54176,15 @@ var WebAudioSound = new Class({ * @method Phaser.Sound.WebAudioSound#createBufferSource * @private * @since 3.0.0 - * + * * @return {AudioBufferSourceNode} */ createBufferSource: function () { var _this = this; - var source = this.manager.context.createBufferSource(); source.buffer = this.audioBuffer; source.connect(this.muteNode); - source.onended = function (ev) { if (ev.target === _this.source) @@ -54920,7 +54202,6 @@ var WebAudioSound = new Class({ // else was stopped }; - return source; }, @@ -54939,7 +54220,6 @@ var WebAudioSound = new Class({ this.source.disconnect(); this.source = null; } - this.playTime = 0; this.startTime = 0; this.stopAndRemoveLoopBufferSource(); @@ -54960,7 +54240,6 @@ var WebAudioSound = new Class({ this.loopSource.disconnect(); this.loopSource = null; } - this.loopTime = 0; }, @@ -54987,10 +54266,11 @@ var WebAudioSound = new Class({ * @method Phaser.Sound.WebAudioSound#update * @protected * @since 3.0.0 - * + * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. * @param {number} delta - The delta time elapsed since the last frame. */ + // eslint-disable-next-line no-unused-vars update: function (time, delta) { if (this.hasEnded) @@ -55122,20 +54402,11 @@ var WebAudioSound = new Class({ + (this.duration - lastRateUpdateCurrentTime) / lastRateUpdate.rate; } }); - -/** - * Mute setting. - * - * @name Phaser.Sound.WebAudioSound#mute - * @type {boolean} - */ Object.defineProperty(WebAudioSound.prototype, 'mute', { - get: function () { return this.muteNode.gain.value === 0; }, - set: function (value) { this.currentConfig.mute = value; @@ -55148,22 +54419,12 @@ Object.defineProperty(WebAudioSound.prototype, 'mute', { */ this.emit('mute', this, value); } - }); - -/** - * Volume setting. - * - * @name Phaser.Sound.WebAudioSound#volume - * @type {number} - */ Object.defineProperty(WebAudioSound.prototype, 'volume', { - get: function () { return this.volumeNode.gain.value; }, - set: function (value) { this.currentConfig.volume = value; @@ -55176,17 +54437,8 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', { */ this.emit('volume', this, value); } - }); - -/** - * Current position of playing sound. - * - * @name Phaser.Sound.WebAudioSound#seek - * @type {number} - */ Object.defineProperty(WebAudioSound.prototype, 'seek', { - get: function () { if (this.isPlaying) @@ -55206,7 +54458,6 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { return 0; } }, - set: function (value) { if (this.manager.context.currentTime < this.startTime) @@ -55231,23 +54482,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', { this.emit('seek', this, value); } } - }); - -/** - * Property indicating whether or not - * the sound or current sound marker will loop. - * - * @name Phaser.Sound.WebAudioSound#loop - * @type {boolean} - */ Object.defineProperty(WebAudioSound.prototype, 'loop', { - get: function () { return this.currentConfig.loop; }, - set: function (value) { this.currentConfig.loop = value; @@ -55267,9 +54507,7 @@ Object.defineProperty(WebAudioSound.prototype, 'loop', { */ this.emit('loop', this, value); } - }); - module.exports = WebAudioSound; @@ -55285,7 +54523,7 @@ module.exports = WebAudioSound; var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); var EventEmitter = __webpack_require__(13); var GenerateTexture = __webpack_require__(211); var GetValue = __webpack_require__(4); @@ -55967,8 +55205,8 @@ var TextureManager = new Class({ // if (textureFrame.trimmed) // { - // x -= this.sprite.texture.trim.x; - // y -= this.sprite.texture.trim.y; + // x -= this.sprite.texture.trim.x; + // y -= this.sprite.texture.trim.y; // } var context = this._tempContext; @@ -56075,15 +55313,15 @@ module.exports = TextureManager; module.exports = { - Canvas: __webpack_require__(528), - Image: __webpack_require__(529), - JSONArray: __webpack_require__(530), - JSONHash: __webpack_require__(531), - Pyxel: __webpack_require__(532), - SpriteSheet: __webpack_require__(533), - SpriteSheetFromAtlas: __webpack_require__(534), - StarlingXML: __webpack_require__(535), - UnityYAML: __webpack_require__(536) + Canvas: __webpack_require__(530), + Image: __webpack_require__(531), + JSONArray: __webpack_require__(532), + JSONHash: __webpack_require__(533), + Pyxel: __webpack_require__(534), + SpriteSheet: __webpack_require__(535), + SpriteSheetFromAtlas: __webpack_require__(536), + StarlingXML: __webpack_require__(537), + UnityYAML: __webpack_require__(538) }; @@ -56533,7 +55771,7 @@ module.exports = Texture; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(126); +var IsSizePowerOfTwo = __webpack_require__(125); var ScaleModes = __webpack_require__(62); /** @@ -57013,10 +56251,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) var letters = xml.getElementsByTagName('char'); - var x = 0; - var y = 0; - var cx = 0; - var cy = 0; var adjustForTrim = (frame !== undefined && frame.trimmed); if (adjustForTrim) @@ -57025,8 +56259,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) var left = frame.width; } - var diff = 0; - for (var i = 0; i < letters.length; i++) { var node = letters[i]; @@ -57041,18 +56273,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame) if (adjustForTrim) { - // if (gx + gw > frame.width) - // { - // diff = frame.width - (gx + gw); - // gw -= diff; - // } - - // if (gy + gh > frame.height) - // { - // diff = frame.height - (gy + gh); - // gh -= diff; - // } - if (gx < left) { left = gx; @@ -57127,21 +56347,21 @@ module.exports = ParseXMLBitmapFont; var Ellipse = __webpack_require__(135); -Ellipse.Area = __webpack_require__(554); +Ellipse.Area = __webpack_require__(556); Ellipse.Circumference = __webpack_require__(270); Ellipse.CircumferencePoint = __webpack_require__(136); -Ellipse.Clone = __webpack_require__(555); +Ellipse.Clone = __webpack_require__(557); Ellipse.Contains = __webpack_require__(68); -Ellipse.ContainsPoint = __webpack_require__(556); -Ellipse.ContainsRect = __webpack_require__(557); -Ellipse.CopyFrom = __webpack_require__(558); -Ellipse.Equals = __webpack_require__(559); -Ellipse.GetBounds = __webpack_require__(560); +Ellipse.ContainsPoint = __webpack_require__(558); +Ellipse.ContainsRect = __webpack_require__(559); +Ellipse.CopyFrom = __webpack_require__(560); +Ellipse.Equals = __webpack_require__(561); +Ellipse.GetBounds = __webpack_require__(562); Ellipse.GetPoint = __webpack_require__(268); Ellipse.GetPoints = __webpack_require__(269); -Ellipse.Offset = __webpack_require__(561); -Ellipse.OffsetPoint = __webpack_require__(562); -Ellipse.Random = __webpack_require__(110); +Ellipse.Offset = __webpack_require__(563); +Ellipse.OffsetPoint = __webpack_require__(564); +Ellipse.Random = __webpack_require__(109); module.exports = Ellipse; @@ -57526,7 +56746,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c break; default: - console.error('Phaser: Invalid Graphics Command ID ' + commandID); + // console.error('Phaser: Invalid Graphics Command ID ' + commandID); break; } } @@ -57720,9 +56940,9 @@ module.exports = FloatBetween; module.exports = { - In: __webpack_require__(574), - Out: __webpack_require__(575), - InOut: __webpack_require__(576) + In: __webpack_require__(576), + Out: __webpack_require__(577), + InOut: __webpack_require__(578) }; @@ -57741,9 +56961,9 @@ module.exports = { module.exports = { - In: __webpack_require__(577), - Out: __webpack_require__(578), - InOut: __webpack_require__(579) + In: __webpack_require__(579), + Out: __webpack_require__(580), + InOut: __webpack_require__(581) }; @@ -57762,9 +56982,9 @@ module.exports = { module.exports = { - In: __webpack_require__(580), - Out: __webpack_require__(581), - InOut: __webpack_require__(582) + In: __webpack_require__(582), + Out: __webpack_require__(583), + InOut: __webpack_require__(584) }; @@ -57783,9 +57003,9 @@ module.exports = { module.exports = { - In: __webpack_require__(583), - Out: __webpack_require__(584), - InOut: __webpack_require__(585) + In: __webpack_require__(585), + Out: __webpack_require__(586), + InOut: __webpack_require__(587) }; @@ -57804,9 +57024,9 @@ module.exports = { module.exports = { - In: __webpack_require__(586), - Out: __webpack_require__(587), - InOut: __webpack_require__(588) + In: __webpack_require__(588), + Out: __webpack_require__(589), + InOut: __webpack_require__(590) }; @@ -57825,9 +57045,9 @@ module.exports = { module.exports = { - In: __webpack_require__(589), - Out: __webpack_require__(590), - InOut: __webpack_require__(591) + In: __webpack_require__(591), + Out: __webpack_require__(592), + InOut: __webpack_require__(593) }; @@ -57844,7 +57064,7 @@ module.exports = { // Phaser.Math.Easing.Linear -module.exports = __webpack_require__(592); +module.exports = __webpack_require__(594); /***/ }), @@ -57861,9 +57081,9 @@ module.exports = __webpack_require__(592); module.exports = { - In: __webpack_require__(593), - Out: __webpack_require__(594), - InOut: __webpack_require__(595) + In: __webpack_require__(595), + Out: __webpack_require__(596), + InOut: __webpack_require__(597) }; @@ -57882,9 +57102,9 @@ module.exports = { module.exports = { - In: __webpack_require__(596), - Out: __webpack_require__(597), - InOut: __webpack_require__(598) + In: __webpack_require__(598), + Out: __webpack_require__(599), + InOut: __webpack_require__(600) }; @@ -57903,9 +57123,9 @@ module.exports = { module.exports = { - In: __webpack_require__(599), - Out: __webpack_require__(600), - InOut: __webpack_require__(601) + In: __webpack_require__(601), + Out: __webpack_require__(602), + InOut: __webpack_require__(603) }; @@ -57924,9 +57144,9 @@ module.exports = { module.exports = { - In: __webpack_require__(602), - Out: __webpack_require__(603), - InOut: __webpack_require__(604) + In: __webpack_require__(604), + Out: __webpack_require__(605), + InOut: __webpack_require__(606) }; @@ -57943,7 +57163,7 @@ module.exports = { // Phaser.Math.Easing.Stepped -module.exports = __webpack_require__(605); +module.exports = __webpack_require__(607); /***/ }), @@ -57994,11 +57214,11 @@ module.exports = HasAny; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); var GetBoolean = __webpack_require__(73); var GetValue = __webpack_require__(4); -var Sprite = __webpack_require__(38); -var TWEEN_CONST = __webpack_require__(88); +var Sprite = __webpack_require__(37); +var TWEEN_CONST = __webpack_require__(87); var Vector2 = __webpack_require__(6); /** @@ -58536,7 +57756,7 @@ module.exports = BuildGameObjectAnimation; */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(34); +var Utils = __webpack_require__(42); /** * @classdesc @@ -58792,7 +58012,7 @@ module.exports = Light; var Class = __webpack_require__(0); var Light = __webpack_require__(290); var LightPipeline = __webpack_require__(235); -var Utils = __webpack_require__(34); +var Utils = __webpack_require__(42); /** * @classdesc @@ -59125,14 +58345,14 @@ module.exports = LightsManager; module.exports = { - Circle: __webpack_require__(653), + Circle: __webpack_require__(655), Ellipse: __webpack_require__(267), Intersects: __webpack_require__(293), - Line: __webpack_require__(673), - Point: __webpack_require__(691), - Polygon: __webpack_require__(705), + Line: __webpack_require__(675), + Point: __webpack_require__(693), + Polygon: __webpack_require__(707), Rectangle: __webpack_require__(305), - Triangle: __webpack_require__(734) + Triangle: __webpack_require__(736) }; @@ -59153,20 +58373,20 @@ module.exports = { module.exports = { - CircleToCircle: __webpack_require__(663), - CircleToRectangle: __webpack_require__(664), - GetRectangleIntersection: __webpack_require__(665), + CircleToCircle: __webpack_require__(665), + CircleToRectangle: __webpack_require__(666), + GetRectangleIntersection: __webpack_require__(667), LineToCircle: __webpack_require__(295), - LineToLine: __webpack_require__(90), - LineToRectangle: __webpack_require__(666), + LineToLine: __webpack_require__(89), + LineToRectangle: __webpack_require__(668), PointToLine: __webpack_require__(296), - PointToLineSegment: __webpack_require__(667), + PointToLineSegment: __webpack_require__(669), RectangleToRectangle: __webpack_require__(294), - RectangleToTriangle: __webpack_require__(668), - RectangleToValues: __webpack_require__(669), - TriangleToCircle: __webpack_require__(670), - TriangleToLine: __webpack_require__(671), - TriangleToTriangle: __webpack_require__(672) + RectangleToTriangle: __webpack_require__(670), + RectangleToValues: __webpack_require__(671), + TriangleToCircle: __webpack_require__(672), + TriangleToLine: __webpack_require__(673), + TriangleToTriangle: __webpack_require__(674) }; @@ -59402,8 +58622,8 @@ module.exports = Decompose; var Class = __webpack_require__(0); var GetPoint = __webpack_require__(300); -var GetPoints = __webpack_require__(109); -var Random = __webpack_require__(111); +var GetPoints = __webpack_require__(108); +var Random = __webpack_require__(110); /** * @classdesc @@ -59738,7 +58958,7 @@ module.exports = GetPoint; */ var MATH_CONST = __webpack_require__(16); -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); var Angle = __webpack_require__(54); /** @@ -60014,40 +59234,40 @@ module.exports = Polygon; var Rectangle = __webpack_require__(8); -Rectangle.Area = __webpack_require__(710); -Rectangle.Ceil = __webpack_require__(711); -Rectangle.CeilAll = __webpack_require__(712); +Rectangle.Area = __webpack_require__(712); +Rectangle.Ceil = __webpack_require__(713); +Rectangle.CeilAll = __webpack_require__(714); Rectangle.CenterOn = __webpack_require__(306); -Rectangle.Clone = __webpack_require__(713); +Rectangle.Clone = __webpack_require__(715); Rectangle.Contains = __webpack_require__(33); -Rectangle.ContainsPoint = __webpack_require__(714); -Rectangle.ContainsRect = __webpack_require__(715); -Rectangle.CopyFrom = __webpack_require__(716); +Rectangle.ContainsPoint = __webpack_require__(716); +Rectangle.ContainsRect = __webpack_require__(717); +Rectangle.CopyFrom = __webpack_require__(718); Rectangle.Decompose = __webpack_require__(297); -Rectangle.Equals = __webpack_require__(717); -Rectangle.FitInside = __webpack_require__(718); -Rectangle.FitOutside = __webpack_require__(719); -Rectangle.Floor = __webpack_require__(720); -Rectangle.FloorAll = __webpack_require__(721); -Rectangle.FromPoints = __webpack_require__(122); +Rectangle.Equals = __webpack_require__(719); +Rectangle.FitInside = __webpack_require__(720); +Rectangle.FitOutside = __webpack_require__(721); +Rectangle.Floor = __webpack_require__(722); +Rectangle.FloorAll = __webpack_require__(723); +Rectangle.FromPoints = __webpack_require__(121); Rectangle.GetAspectRatio = __webpack_require__(145); -Rectangle.GetCenter = __webpack_require__(722); -Rectangle.GetPoint = __webpack_require__(107); +Rectangle.GetCenter = __webpack_require__(724); +Rectangle.GetPoint = __webpack_require__(106); Rectangle.GetPoints = __webpack_require__(182); -Rectangle.GetSize = __webpack_require__(723); -Rectangle.Inflate = __webpack_require__(724); +Rectangle.GetSize = __webpack_require__(725); +Rectangle.Inflate = __webpack_require__(726); Rectangle.MarchingAnts = __webpack_require__(186); -Rectangle.MergePoints = __webpack_require__(725); -Rectangle.MergeRect = __webpack_require__(726); -Rectangle.MergeXY = __webpack_require__(727); -Rectangle.Offset = __webpack_require__(728); -Rectangle.OffsetPoint = __webpack_require__(729); -Rectangle.Overlaps = __webpack_require__(730); +Rectangle.MergePoints = __webpack_require__(727); +Rectangle.MergeRect = __webpack_require__(728); +Rectangle.MergeXY = __webpack_require__(729); +Rectangle.Offset = __webpack_require__(730); +Rectangle.OffsetPoint = __webpack_require__(731); +Rectangle.Overlaps = __webpack_require__(732); Rectangle.Perimeter = __webpack_require__(78); -Rectangle.PerimeterPoint = __webpack_require__(731); -Rectangle.Random = __webpack_require__(108); -Rectangle.Scale = __webpack_require__(732); -Rectangle.Union = __webpack_require__(733); +Rectangle.PerimeterPoint = __webpack_require__(733); +Rectangle.Random = __webpack_require__(107); +Rectangle.Scale = __webpack_require__(734); +Rectangle.Union = __webpack_require__(735); module.exports = Rectangle; @@ -60606,6 +59826,7 @@ var AudioFile = new Class({ }, function (e) { + // eslint-disable-next-line no-console console.error('Error with decoding audio data for \'' + this.key + '\':', e.message); _this.state = CONST.FILE_ERRORED; @@ -60627,7 +59848,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData)) { - console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.'); + // console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.'); return null; } @@ -60635,7 +59856,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings) if (!url) { - console.warn('No supported url provided for audio \'' + key + '\'!'); + // console.warn('No supported url provided for audio \'' + key + '\'!'); return null; } @@ -60824,7 +60045,7 @@ var HTML5AudioFile = new Class({ this.loader.nextFile(this, true); }, - onError: function (event) + onError: function () { for (var i = 0; i < this.data.length; i++) { @@ -61367,7 +60588,7 @@ module.exports = RoundAwayFromZero; */ var ArcadeImage = __webpack_require__(325); -var ArcadeSprite = __webpack_require__(92); +var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var PhysicsGroup = __webpack_require__(327); @@ -61721,18 +60942,18 @@ module.exports = ArcadeImage; module.exports = { - Acceleration: __webpack_require__(825), - Angular: __webpack_require__(826), - Bounce: __webpack_require__(827), - Debug: __webpack_require__(828), - Drag: __webpack_require__(829), - Enable: __webpack_require__(830), - Friction: __webpack_require__(831), - Gravity: __webpack_require__(832), - Immovable: __webpack_require__(833), - Mass: __webpack_require__(834), - Size: __webpack_require__(835), - Velocity: __webpack_require__(836) + Acceleration: __webpack_require__(827), + Angular: __webpack_require__(828), + Bounce: __webpack_require__(829), + Debug: __webpack_require__(830), + Drag: __webpack_require__(831), + Enable: __webpack_require__(832), + Friction: __webpack_require__(833), + Gravity: __webpack_require__(834), + Immovable: __webpack_require__(835), + Mass: __webpack_require__(836), + Size: __webpack_require__(837), + Velocity: __webpack_require__(838) }; @@ -61747,7 +60968,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeSprite = __webpack_require__(92); +var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var GetFastValue = __webpack_require__(1); @@ -61974,7 +61195,7 @@ module.exports = PhysicsGroup; // Phaser.Physics.Arcade.StaticGroup -var ArcadeSprite = __webpack_require__(92); +var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); var Group = __webpack_require__(69); @@ -62079,7 +61300,7 @@ var StaticPhysicsGroup = new Class({ * * @param {object} entries - [description] */ - createMultipleCallback: function (entries) + createMultipleCallback: function () { this.refresh(); }, @@ -62124,19 +61345,21 @@ var Clamp = __webpack_require__(60); var Class = __webpack_require__(0); var Collider = __webpack_require__(331); var CONST = __webpack_require__(58); -var DistanceBetween = __webpack_require__(43); +var DistanceBetween = __webpack_require__(41); var EventEmitter = __webpack_require__(13); +var GetOverlapX = __webpack_require__(332); +var GetOverlapY = __webpack_require__(333); var GetValue = __webpack_require__(4); -var ProcessQueue = __webpack_require__(332); -var ProcessTileCallbacks = __webpack_require__(837); +var ProcessQueue = __webpack_require__(334); +var ProcessTileCallbacks = __webpack_require__(839); var Rectangle = __webpack_require__(8); -var RTree = __webpack_require__(333); -var SeparateTile = __webpack_require__(838); -var SeparateX = __webpack_require__(843); -var SeparateY = __webpack_require__(845); +var RTree = __webpack_require__(335); +var SeparateTile = __webpack_require__(840); +var SeparateX = __webpack_require__(845); +var SeparateY = __webpack_require__(846); var Set = __webpack_require__(61); -var StaticBody = __webpack_require__(336); -var TileIntersectsBody = __webpack_require__(335); +var StaticBody = __webpack_require__(338); +var TileIntersectsBody = __webpack_require__(337); var Vector2 = __webpack_require__(6); /** @@ -62808,7 +62031,7 @@ var World = new Class({ var body; var dynamic = this.bodies; - var static = this.staticBodies; + var staticBodies = this.staticBodies; var pending = this.pendingDestroy; var bodies = dynamic.entries; @@ -62840,7 +62063,7 @@ var World = new Class({ } } - bodies = static.entries; + bodies = staticBodies.entries; len = bodies.length; for (i = 0; i < len; i++) @@ -62874,7 +62097,7 @@ var World = new Class({ else if (body.physicsType === CONST.STATIC_BODY) { staticTree.remove(body); - static.delete(body); + staticBodies.delete(body); } body.world = undefined; @@ -63503,6 +62726,7 @@ var World = new Class({ return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } } + // GROUPS else if (object1.isParent) { @@ -63519,6 +62743,7 @@ var World = new Class({ return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly); } } + // TILEMAP LAYERS else if (object1.isTilemap) { @@ -63661,7 +62886,8 @@ var World = new Class({ { if (children[i].body) { - if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) { + if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)) + { didCollide = true; } } @@ -65870,6 +65096,164 @@ module.exports = Collider; /***/ }), /* 332 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Physics.Arcade.GetOverlapX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - [description] + * @param {Phaser.Physics.Arcade.Body} body2 - [description] + * @param {boolean} overlapOnly - [description] + * @param {number} bias - [description] + * + * @return {number} [description] + */ +var GetOverlapX = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; + + if (body1.deltaX() === 0 && body2.deltaX() === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaX() > body2.deltaX()) + { + // Body1 is moving right and / or Body2 is moving left + overlap = body1.right - body2.x; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.right = true; + body2.touching.none = false; + body2.touching.left = true; + } + } + else if (body1.deltaX() < body2.deltaX()) + { + // Body1 is moving left and/or Body2 is moving right + overlap = body1.x - body2.width - body2.x; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.left = true; + body2.touching.none = false; + body2.touching.right = true; + } + } + + // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapX = overlap; + body2.overlapX = overlap; + + return overlap; +}; + +module.exports = GetOverlapX; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * [description] + * + * @function Phaser.Physics.Arcade.GetOverlapY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - [description] + * @param {Phaser.Physics.Arcade.Body} body2 - [description] + * @param {boolean} overlapOnly - [description] + * @param {number} bias - [description] + * + * @return {number} [description] + */ +var GetOverlapY = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; + + if (body1.deltaY() === 0 && body2.deltaY() === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1.deltaY() > body2.deltaY()) + { + // Body1 is moving down and/or Body2 is moving up + overlap = body1.bottom - body2.y; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.down = true; + body2.touching.none = false; + body2.touching.up = true; + } + } + else if (body1.deltaY() < body2.deltaY()) + { + // Body1 is moving up and/or Body2 is moving down + overlap = body1.y - body2.bottom; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.up = true; + body2.touching.none = false; + body2.touching.down = true; + } + } + + // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapY = overlap; + body2.overlapY = overlap; + + return overlap; +}; + +module.exports = GetOverlapY; + + +/***/ }), +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66067,7 +65451,7 @@ module.exports = ProcessQueue; /***/ }), -/* 333 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66076,7 +65460,7 @@ module.exports = ProcessQueue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(334); +var quickselect = __webpack_require__(336); /** * @classdesc @@ -66676,7 +66060,7 @@ module.exports = rbush; /***/ }), -/* 334 */ +/* 336 */ /***/ (function(module, exports) { /** @@ -66794,7 +66178,7 @@ module.exports = QuickSelect; /***/ }), -/* 335 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -66831,7 +66215,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 336 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66843,7 +66227,6 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); var Vector2 = __webpack_require__(6); @@ -67688,7 +67071,7 @@ module.exports = StaticBody; /***/ }), -/* 337 */ +/* 339 */ /***/ (function(module, exports) { /** @@ -67760,7 +67143,7 @@ module.exports = { /***/ }), -/* 338 */ +/* 340 */ /***/ (function(module, exports) { /** @@ -67823,7 +67206,7 @@ module.exports = { /***/ }), -/* 339 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67958,7 +67341,7 @@ var Events = __webpack_require__(162); /***/ }), -/* 340 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68001,7 +67384,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 341 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68043,7 +67426,7 @@ module.exports = HasTileAt; /***/ }), -/* 342 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68052,7 +67435,7 @@ module.exports = HasTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); var CalculateFacesAt = __webpack_require__(150); @@ -68104,7 +67487,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 343 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68115,9 +67498,9 @@ module.exports = RemoveTileAt; var Formats = __webpack_require__(19); var Parse2DArray = __webpack_require__(153); -var ParseCSV = __webpack_require__(344); -var ParseJSONTiled = __webpack_require__(345); -var ParseWeltmeister = __webpack_require__(350); +var ParseCSV = __webpack_require__(346); +var ParseJSONTiled = __webpack_require__(347); +var ParseWeltmeister = __webpack_require__(352); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -68174,7 +67557,7 @@ module.exports = Parse; /***/ }), -/* 344 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68222,7 +67605,7 @@ module.exports = ParseCSV; /***/ }), -/* 345 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68298,7 +67681,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 346 */ +/* 348 */ /***/ (function(module, exports) { /** @@ -68388,7 +67771,7 @@ module.exports = ParseGID; /***/ }), -/* 347 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68560,7 +67943,7 @@ module.exports = ImageCollection; /***/ }), -/* 348 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68570,7 +67953,7 @@ module.exports = ImageCollection; */ var Pick = __webpack_require__(897); -var ParseGID = __webpack_require__(346); +var ParseGID = __webpack_require__(348); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -68642,7 +68025,7 @@ module.exports = ParseObject; /***/ }), -/* 349 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68748,7 +68131,7 @@ module.exports = ObjectLayer; /***/ }), -/* 350 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68815,7 +68198,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 351 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68825,16 +68208,16 @@ module.exports = ParseWeltmeister; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); -var DynamicTilemapLayer = __webpack_require__(352); +var DegToRad = __webpack_require__(35); +var DynamicTilemapLayer = __webpack_require__(354); var Extend = __webpack_require__(23); var Formats = __webpack_require__(19); var LayerData = __webpack_require__(75); var Rotate = __webpack_require__(322); -var StaticTilemapLayer = __webpack_require__(353); -var Tile = __webpack_require__(45); -var TilemapComponents = __webpack_require__(97); -var Tileset = __webpack_require__(101); +var StaticTilemapLayer = __webpack_require__(355); +var Tile = __webpack_require__(44); +var TilemapComponents = __webpack_require__(96); +var Tileset = __webpack_require__(100); /** * @classdesc @@ -71074,7 +70457,7 @@ module.exports = Tilemap; /***/ }), -/* 352 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71087,7 +70470,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DynamicTilemapLayerRender = __webpack_require__(903); var GameObject = __webpack_require__(2); -var TilemapComponents = __webpack_require__(97); +var TilemapComponents = __webpack_require__(96); /** * @classdesc @@ -72193,7 +71576,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 353 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72206,8 +71589,8 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(2); var StaticTilemapLayerRender = __webpack_require__(906); -var TilemapComponents = __webpack_require__(97); -var Utils = __webpack_require__(34); +var TilemapComponents = __webpack_require__(96); +var Utils = __webpack_require__(42); /** * @classdesc @@ -72403,7 +71786,7 @@ var StaticTilemapLayer = new Class({ * * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object. */ - contextRestore: function (renderer) + contextRestore: function () { this.dirty = true; this.vertexBuffer = null; @@ -72528,13 +71911,13 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (this.vertexBuffer === null) + if (vertexBuffer === null) { - this.vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); } else { - renderer.setVertexBuffer(this.vertexBuffer); + renderer.setVertexBuffer(vertexBuffer); gl.bufferSubData(gl.ARRAY_BUFFER, 0, bufferData); } } @@ -73229,7 +72612,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 354 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73532,7 +72915,7 @@ module.exports = TimerEvent; /***/ }), -/* 355 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73590,7 +72973,7 @@ module.exports = GetProps; /***/ }), -/* 356 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73636,7 +73019,7 @@ module.exports = GetTweens; /***/ }), -/* 357 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73649,7 +73032,7 @@ var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(102); +var GetNewValue = __webpack_require__(101); var GetValue = __webpack_require__(4); var GetValueOp = __webpack_require__(156); var Tween = __webpack_require__(158); @@ -73764,7 +73147,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 358 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73778,12 +73161,12 @@ var Defaults = __webpack_require__(157); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); -var GetNewValue = __webpack_require__(102); +var GetNewValue = __webpack_require__(101); var GetTargets = __webpack_require__(155); -var GetTweens = __webpack_require__(356); +var GetTweens = __webpack_require__(358); var GetValue = __webpack_require__(4); -var Timeline = __webpack_require__(359); -var TweenBuilder = __webpack_require__(103); +var Timeline = __webpack_require__(361); +var TweenBuilder = __webpack_require__(102); /** * [description] @@ -73916,7 +73299,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 359 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73927,8 +73310,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(13); -var TweenBuilder = __webpack_require__(103); -var TWEEN_CONST = __webpack_require__(88); +var TweenBuilder = __webpack_require__(102); +var TWEEN_CONST = __webpack_require__(87); /** * @classdesc @@ -74770,7 +74153,7 @@ module.exports = Timeline; /***/ }), -/* 360 */ +/* 362 */ /***/ (function(module, exports) { /** @@ -74817,7 +74200,7 @@ module.exports = SpliceOne; /***/ }), -/* 361 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75480,8 +74863,8 @@ var Animation = new Class({ return this; }, - // Scale the time (make it go faster / slower) - // Factor that's used to scale time where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + // Scale the time (make it go faster / slower) + // Factor that's used to scale time where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. /** * [description] @@ -75637,7 +75020,7 @@ module.exports = Animation; /***/ }), -/* 362 */ +/* 364 */ /***/ (function(module, exports) { /** @@ -75777,11 +75160,9 @@ module.exports = Pair; /***/ }), -/* 363 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(364); -__webpack_require__(365); __webpack_require__(366); __webpack_require__(367); __webpack_require__(368); @@ -75789,10 +75170,12 @@ __webpack_require__(369); __webpack_require__(370); __webpack_require__(371); __webpack_require__(372); +__webpack_require__(373); +__webpack_require__(374); /***/ }), -/* 364 */ +/* 366 */ /***/ (function(module, exports) { /** @@ -75832,7 +75215,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 365 */ +/* 367 */ /***/ (function(module, exports) { /** @@ -75848,7 +75231,7 @@ if (!Array.isArray) /***/ }), -/* 366 */ +/* 368 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -76036,7 +75419,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 367 */ +/* 369 */ /***/ (function(module, exports) { /** @@ -76051,7 +75434,7 @@ if (!window.console) /***/ }), -/* 368 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -76099,7 +75482,7 @@ if (!Function.prototype.bind) { /***/ }), -/* 369 */ +/* 371 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -76111,7 +75494,7 @@ if (!Math.trunc) { /***/ }), -/* 370 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -76148,7 +75531,7 @@ if (!Math.trunc) { /***/ }), -/* 371 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -76221,7 +75604,7 @@ if (!global.cancelAnimationFrame) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) /***/ }), -/* 372 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -76273,7 +75656,7 @@ if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "o /***/ }), -/* 373 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -76307,7 +75690,7 @@ module.exports = Angle; /***/ }), -/* 374 */ +/* 376 */ /***/ (function(module, exports) { /** @@ -76344,7 +75727,7 @@ module.exports = Call; /***/ }), -/* 375 */ +/* 377 */ /***/ (function(module, exports) { /** @@ -76400,7 +75783,7 @@ module.exports = GetFirst; /***/ }), -/* 376 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76437,6 +75820,7 @@ var GridAlign = function (items, options) var position = GetValue(options, 'position', CONST.TOP_LEFT); var x = GetValue(options, 'x', 0); var y = GetValue(options, 'y', 0); + // var centerX = GetValue(options, 'centerX', null); // var centerY = GetValue(options, 'centerY', null); @@ -76448,7 +75832,7 @@ var GridAlign = function (items, options) // If the Grid is centered on a position then we need to calculate it now // if (centerX !== null && centerY !== null) // { - // + // // } tempZone.setPosition(x, y); @@ -76513,7 +75897,7 @@ module.exports = GridAlign; /***/ }), -/* 377 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76827,8 +76211,9 @@ var RandomDataGenerator = new Class({ var a = ''; var b = ''; - for (b = a = ''; a++ < 36; b +=~a % 5 | a*3 & 4 ? (a^15 ? 8 ^ this.frac()*(a^20 ? 16 : 4) : 4).toString(16) : '-') + for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') { + // eslint-disable-next-line no-empty } return b; @@ -76960,7 +76345,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 378 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77206,7 +76591,7 @@ module.exports = Alpha; /***/ }), -/* 379 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77215,7 +76600,7 @@ module.exports = Alpha; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); /** * Provides methods used for setting the blend mode of a Game Object. @@ -77317,7 +76702,7 @@ module.exports = BlendMode; /***/ }), -/* 380 */ +/* 382 */ /***/ (function(module, exports) { /** @@ -77404,7 +76789,7 @@ module.exports = ComputedSize; /***/ }), -/* 381 */ +/* 383 */ /***/ (function(module, exports) { /** @@ -77488,7 +76873,7 @@ module.exports = Depth; /***/ }), -/* 382 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -77636,7 +77021,7 @@ module.exports = Flip; /***/ }), -/* 383 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77830,7 +77215,7 @@ module.exports = GetBounds; /***/ }), -/* 384 */ +/* 386 */ /***/ (function(module, exports) { /** @@ -78022,7 +77407,7 @@ module.exports = Origin; /***/ }), -/* 385 */ +/* 387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78093,7 +77478,7 @@ module.exports = ScaleMode; /***/ }), -/* 386 */ +/* 388 */ /***/ (function(module, exports) { /** @@ -78185,7 +77570,7 @@ module.exports = ScrollFactor; /***/ }), -/* 387 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -78330,7 +77715,7 @@ module.exports = Size; /***/ }), -/* 388 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -78430,7 +77815,7 @@ module.exports = Texture; /***/ }), -/* 389 */ +/* 391 */ /***/ (function(module, exports) { /** @@ -78625,7 +78010,7 @@ module.exports = Tint; /***/ }), -/* 390 */ +/* 392 */ /***/ (function(module, exports) { /** @@ -78678,7 +78063,7 @@ module.exports = ToJSON; /***/ }), -/* 391 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79031,7 +78416,7 @@ module.exports = Transform; /***/ }), -/* 392 */ +/* 394 */ /***/ (function(module, exports) { /** @@ -79111,7 +78496,7 @@ module.exports = Visible; /***/ }), -/* 393 */ +/* 395 */ /***/ (function(module, exports) { /** @@ -79145,7 +78530,7 @@ module.exports = IncAlpha; /***/ }), -/* 394 */ +/* 396 */ /***/ (function(module, exports) { /** @@ -79179,7 +78564,7 @@ module.exports = IncX; /***/ }), -/* 395 */ +/* 397 */ /***/ (function(module, exports) { /** @@ -79215,7 +78600,7 @@ module.exports = IncXY; /***/ }), -/* 396 */ +/* 398 */ /***/ (function(module, exports) { /** @@ -79249,7 +78634,7 @@ module.exports = IncY; /***/ }), -/* 397 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -79294,7 +78679,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 398 */ +/* 400 */ /***/ (function(module, exports) { /** @@ -79342,7 +78727,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 399 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79351,7 +78736,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetPoints = __webpack_require__(109); +var GetPoints = __webpack_require__(108); /** * [description] @@ -79384,7 +78769,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 400 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79443,7 +78828,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 401 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79501,7 +78886,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 402 */ +/* 404 */ /***/ (function(module, exports) { /** @@ -79536,7 +78921,7 @@ module.exports = PlayAnimation; /***/ }), -/* 403 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79545,7 +78930,7 @@ module.exports = PlayAnimation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(106); +var Random = __webpack_require__(105); /** * [description] @@ -79572,7 +78957,7 @@ module.exports = RandomCircle; /***/ }), -/* 404 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79581,7 +78966,7 @@ module.exports = RandomCircle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(110); +var Random = __webpack_require__(109); /** * [description] @@ -79608,7 +78993,7 @@ module.exports = RandomEllipse; /***/ }), -/* 405 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79617,7 +79002,7 @@ module.exports = RandomEllipse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(111); +var Random = __webpack_require__(110); /** * [description] @@ -79644,7 +79029,7 @@ module.exports = RandomLine; /***/ }), -/* 406 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79653,7 +79038,7 @@ module.exports = RandomLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(108); +var Random = __webpack_require__(107); /** * [description] @@ -79680,7 +79065,7 @@ module.exports = RandomRectangle; /***/ }), -/* 407 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79689,7 +79074,7 @@ module.exports = RandomRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Random = __webpack_require__(112); +var Random = __webpack_require__(111); /** * [description] @@ -79716,7 +79101,7 @@ module.exports = RandomTriangle; /***/ }), -/* 408 */ +/* 410 */ /***/ (function(module, exports) { /** @@ -79753,7 +79138,7 @@ module.exports = Rotate; /***/ }), -/* 409 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79762,8 +79147,8 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundDistance = __webpack_require__(113); -var DistanceBetween = __webpack_require__(43); +var RotateAroundDistance = __webpack_require__(112); +var DistanceBetween = __webpack_require__(41); /** * [description] @@ -79796,7 +79181,7 @@ module.exports = RotateAround; /***/ }), -/* 410 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79805,7 +79190,7 @@ module.exports = RotateAround; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(113); +var MathRotateAroundDistance = __webpack_require__(112); /** * [description] @@ -79843,7 +79228,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 411 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -79877,7 +79262,7 @@ module.exports = ScaleX; /***/ }), -/* 412 */ +/* 414 */ /***/ (function(module, exports) { /** @@ -79913,7 +79298,7 @@ module.exports = ScaleXY; /***/ }), -/* 413 */ +/* 415 */ /***/ (function(module, exports) { /** @@ -79947,7 +79332,7 @@ module.exports = ScaleY; /***/ }), -/* 414 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -79984,7 +79369,7 @@ module.exports = SetAlpha; /***/ }), -/* 415 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -80018,7 +79403,7 @@ module.exports = SetBlendMode; /***/ }), -/* 416 */ +/* 418 */ /***/ (function(module, exports) { /** @@ -80055,7 +79440,7 @@ module.exports = SetDepth; /***/ }), -/* 417 */ +/* 419 */ /***/ (function(module, exports) { /** @@ -80090,7 +79475,7 @@ module.exports = SetHitArea; /***/ }), -/* 418 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -80125,7 +79510,7 @@ module.exports = SetOrigin; /***/ }), -/* 419 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -80162,7 +79547,7 @@ module.exports = SetRotation; /***/ }), -/* 420 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -80205,7 +79590,7 @@ module.exports = SetScale; /***/ }), -/* 421 */ +/* 423 */ /***/ (function(module, exports) { /** @@ -80242,7 +79627,7 @@ module.exports = SetScaleX; /***/ }), -/* 422 */ +/* 424 */ /***/ (function(module, exports) { /** @@ -80279,7 +79664,7 @@ module.exports = SetScaleY; /***/ }), -/* 423 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -80316,7 +79701,7 @@ module.exports = SetTint; /***/ }), -/* 424 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -80350,7 +79735,7 @@ module.exports = SetVisible; /***/ }), -/* 425 */ +/* 427 */ /***/ (function(module, exports) { /** @@ -80387,7 +79772,7 @@ module.exports = SetX; /***/ }), -/* 426 */ +/* 428 */ /***/ (function(module, exports) { /** @@ -80428,7 +79813,7 @@ module.exports = SetXY; /***/ }), -/* 427 */ +/* 429 */ /***/ (function(module, exports) { /** @@ -80465,7 +79850,7 @@ module.exports = SetY; /***/ }), -/* 428 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80592,7 +79977,7 @@ module.exports = ShiftPosition; /***/ }), -/* 429 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80622,7 +80007,7 @@ module.exports = Shuffle; /***/ }), -/* 430 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80676,7 +80061,7 @@ module.exports = SmootherStep; /***/ }), -/* 431 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80730,7 +80115,7 @@ module.exports = SmoothStep; /***/ }), -/* 432 */ +/* 434 */ /***/ (function(module, exports) { /** @@ -80782,7 +80167,7 @@ module.exports = Spread; /***/ }), -/* 433 */ +/* 435 */ /***/ (function(module, exports) { /** @@ -80815,7 +80200,7 @@ module.exports = ToggleVisible; /***/ }), -/* 434 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80838,7 +80223,7 @@ module.exports = { /***/ }), -/* 435 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80860,7 +80245,7 @@ module.exports = { /***/ }), -/* 436 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80875,15 +80260,15 @@ module.exports = { module.exports = { - Controls: __webpack_require__(437), - Scene2D: __webpack_require__(440), - Sprite3D: __webpack_require__(442) + Controls: __webpack_require__(439), + Scene2D: __webpack_require__(442), + Sprite3D: __webpack_require__(444) }; /***/ }), -/* 437 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80898,14 +80283,14 @@ module.exports = { module.exports = { - Fixed: __webpack_require__(438), - Smoothed: __webpack_require__(439) + Fixed: __webpack_require__(440), + Smoothed: __webpack_require__(441) }; /***/ }), -/* 438 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81198,7 +80583,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 439 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81663,7 +81048,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 440 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81678,14 +81063,14 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(115), - CameraManager: __webpack_require__(441) + Camera: __webpack_require__(114), + CameraManager: __webpack_require__(443) }; /***/ }), -/* 441 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81694,7 +81079,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Camera = __webpack_require__(115); +var Camera = __webpack_require__(114); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(1); var PluginManager = __webpack_require__(11); @@ -82165,7 +81550,7 @@ module.exports = CameraManager; /***/ }), -/* 442 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82180,8 +81565,8 @@ module.exports = CameraManager; module.exports = { - Camera: __webpack_require__(118), - CameraManager: __webpack_require__(446), + Camera: __webpack_require__(117), + CameraManager: __webpack_require__(448), OrthographicCamera: __webpack_require__(209), PerspectiveCamera: __webpack_require__(210) @@ -82189,7 +81574,7 @@ module.exports = { /***/ }), -/* 443 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82203,12 +81588,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(444); + renderWebGL = __webpack_require__(446); } if (true) { - renderCanvas = __webpack_require__(445); + renderCanvas = __webpack_require__(447); } module.exports = { @@ -82220,7 +81605,7 @@ module.exports = { /***/ }), -/* 444 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82259,7 +81644,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 445 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82298,7 +81683,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 446 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82553,7 +81938,7 @@ module.exports = CameraManager; /***/ }), -/* 447 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82569,13 +81954,13 @@ module.exports = CameraManager; module.exports = { GenerateTexture: __webpack_require__(211), - Palettes: __webpack_require__(448) + Palettes: __webpack_require__(450) }; /***/ }), -/* 448 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82591,16 +81976,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(212), - C64: __webpack_require__(449), - CGA: __webpack_require__(450), - JMP: __webpack_require__(451), - MSX: __webpack_require__(452) + C64: __webpack_require__(451), + CGA: __webpack_require__(452), + JMP: __webpack_require__(453), + MSX: __webpack_require__(454) }; /***/ }), -/* 449 */ +/* 451 */ /***/ (function(module, exports) { /** @@ -82654,7 +82039,7 @@ module.exports = { /***/ }), -/* 450 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -82708,7 +82093,7 @@ module.exports = { /***/ }), -/* 451 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -82762,7 +82147,7 @@ module.exports = { /***/ }), -/* 452 */ +/* 454 */ /***/ (function(module, exports) { /** @@ -82816,7 +82201,7 @@ module.exports = { /***/ }), -/* 453 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82831,7 +82216,7 @@ module.exports = { module.exports = { - Path: __webpack_require__(454), + Path: __webpack_require__(456), CubicBezier: __webpack_require__(213), Curve: __webpack_require__(66), @@ -82843,7 +82228,7 @@ module.exports = { /***/ }), -/* 454 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82859,7 +82244,7 @@ var CubicBezierCurve = __webpack_require__(213); var EllipseCurve = __webpack_require__(215); var GameObjectFactory = __webpack_require__(9); var LineCurve = __webpack_require__(217); -var MovePathTo = __webpack_require__(455); +var MovePathTo = __webpack_require__(457); var Rectangle = __webpack_require__(8); var SplineCurve = __webpack_require__(218); var Vector2 = __webpack_require__(6); @@ -83608,7 +82993,7 @@ module.exports = Path; /***/ }), -/* 455 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83744,7 +83129,7 @@ module.exports = MoveTo; /***/ }), -/* 456 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83760,13 +83145,13 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(79), - DataManagerPlugin: __webpack_require__(457) + DataManagerPlugin: __webpack_require__(459) }; /***/ }), -/* 457 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83874,7 +83259,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 458 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83889,17 +83274,17 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(459), - Bounds: __webpack_require__(474), - Canvas: __webpack_require__(477), + Align: __webpack_require__(461), + Bounds: __webpack_require__(476), + Canvas: __webpack_require__(479), Color: __webpack_require__(220), - Masks: __webpack_require__(488) + Masks: __webpack_require__(490) }; /***/ }), -/* 459 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83914,14 +83299,14 @@ module.exports = { module.exports = { - In: __webpack_require__(460), - To: __webpack_require__(461) + In: __webpack_require__(462), + To: __webpack_require__(463) }; /***/ }), -/* 460 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83951,7 +83336,7 @@ module.exports = { /***/ }), -/* 461 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83966,24 +83351,24 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(462), - BottomLeft: __webpack_require__(463), - BottomRight: __webpack_require__(464), - LeftBottom: __webpack_require__(465), - LeftCenter: __webpack_require__(466), - LeftTop: __webpack_require__(467), - RightBottom: __webpack_require__(468), - RightCenter: __webpack_require__(469), - RightTop: __webpack_require__(470), - TopCenter: __webpack_require__(471), - TopLeft: __webpack_require__(472), - TopRight: __webpack_require__(473) + BottomCenter: __webpack_require__(464), + BottomLeft: __webpack_require__(465), + BottomRight: __webpack_require__(466), + LeftBottom: __webpack_require__(467), + LeftCenter: __webpack_require__(468), + LeftTop: __webpack_require__(469), + RightBottom: __webpack_require__(470), + RightCenter: __webpack_require__(471), + RightTop: __webpack_require__(472), + TopCenter: __webpack_require__(473), + TopLeft: __webpack_require__(474), + TopRight: __webpack_require__(475) }; /***/ }), -/* 462 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83993,8 +83378,8 @@ module.exports = { */ var GetBottom = __webpack_require__(24); -var GetCenterX = __webpack_require__(47); -var SetCenterX = __webpack_require__(48); +var GetCenterX = __webpack_require__(46); +var SetCenterX = __webpack_require__(47); var SetTop = __webpack_require__(31); /** @@ -84025,7 +83410,7 @@ module.exports = BottomCenter; /***/ }), -/* 463 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84067,7 +83452,7 @@ module.exports = BottomLeft; /***/ }), -/* 464 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84109,7 +83494,7 @@ module.exports = BottomRight; /***/ }), -/* 465 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84151,7 +83536,7 @@ module.exports = LeftBottom; /***/ }), -/* 466 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84160,9 +83545,9 @@ module.exports = LeftBottom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetLeft = __webpack_require__(26); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetRight = __webpack_require__(29); /** @@ -84193,7 +83578,7 @@ module.exports = LeftCenter; /***/ }), -/* 467 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84235,7 +83620,7 @@ module.exports = LeftTop; /***/ }), -/* 468 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84277,7 +83662,7 @@ module.exports = RightBottom; /***/ }), -/* 469 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84286,9 +83671,9 @@ module.exports = RightBottom; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterY = __webpack_require__(50); +var GetCenterY = __webpack_require__(49); var GetRight = __webpack_require__(28); -var SetCenterY = __webpack_require__(49); +var SetCenterY = __webpack_require__(48); var SetLeft = __webpack_require__(27); /** @@ -84319,7 +83704,7 @@ module.exports = RightCenter; /***/ }), -/* 470 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84361,7 +83746,7 @@ module.exports = RightTop; /***/ }), -/* 471 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84370,10 +83755,10 @@ module.exports = RightTop; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetCenterX = __webpack_require__(47); +var GetCenterX = __webpack_require__(46); var GetTop = __webpack_require__(30); var SetBottom = __webpack_require__(25); -var SetCenterX = __webpack_require__(48); +var SetCenterX = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -84403,7 +83788,7 @@ module.exports = TopCenter; /***/ }), -/* 472 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84445,7 +83830,7 @@ module.exports = TopLeft; /***/ }), -/* 473 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84487,7 +83872,7 @@ module.exports = TopRight; /***/ }), -/* 474 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84504,16 +83889,16 @@ module.exports = { CenterOn: __webpack_require__(173), GetBottom: __webpack_require__(24), - GetCenterX: __webpack_require__(47), - GetCenterY: __webpack_require__(50), + GetCenterX: __webpack_require__(46), + GetCenterY: __webpack_require__(49), GetLeft: __webpack_require__(26), - GetOffsetX: __webpack_require__(475), - GetOffsetY: __webpack_require__(476), + GetOffsetX: __webpack_require__(477), + GetOffsetY: __webpack_require__(478), GetRight: __webpack_require__(28), GetTop: __webpack_require__(30), SetBottom: __webpack_require__(25), - SetCenterX: __webpack_require__(48), - SetCenterY: __webpack_require__(49), + SetCenterX: __webpack_require__(47), + SetCenterY: __webpack_require__(48), SetLeft: __webpack_require__(27), SetRight: __webpack_require__(29), SetTop: __webpack_require__(31) @@ -84522,7 +83907,7 @@ module.exports = { /***/ }), -/* 475 */ +/* 477 */ /***/ (function(module, exports) { /** @@ -84552,7 +83937,7 @@ module.exports = GetOffsetX; /***/ }), -/* 476 */ +/* 478 */ /***/ (function(module, exports) { /** @@ -84582,7 +83967,7 @@ module.exports = GetOffsetY; /***/ }), -/* 477 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84599,15 +83984,15 @@ module.exports = { Interpolation: __webpack_require__(219), Pool: __webpack_require__(20), - Smoothing: __webpack_require__(121), - TouchAction: __webpack_require__(478), - UserSelect: __webpack_require__(479) + Smoothing: __webpack_require__(120), + TouchAction: __webpack_require__(480), + UserSelect: __webpack_require__(481) }; /***/ }), -/* 478 */ +/* 480 */ /***/ (function(module, exports) { /** @@ -84642,7 +84027,7 @@ module.exports = TouchAction; /***/ }), -/* 479 */ +/* 481 */ /***/ (function(module, exports) { /** @@ -84689,7 +84074,7 @@ module.exports = UserSelect; /***/ }), -/* 480 */ +/* 482 */ /***/ (function(module, exports) { /** @@ -84737,7 +84122,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 481 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84746,7 +84131,7 @@ module.exports = ColorToRGBA; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); var HueToComponent = __webpack_require__(222); /** @@ -84787,7 +84172,7 @@ module.exports = HSLToColor; /***/ }), -/* 482 */ +/* 484 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -84815,7 +84200,7 @@ module.exports = function(module) { /***/ }), -/* 483 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84856,7 +84241,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 484 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84959,7 +84344,7 @@ module.exports = { /***/ }), -/* 485 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84969,7 +84354,7 @@ module.exports = { */ var Between = __webpack_require__(226); -var Color = __webpack_require__(37); +var Color = __webpack_require__(36); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -84995,7 +84380,7 @@ module.exports = RandomRGB; /***/ }), -/* 486 */ +/* 488 */ /***/ (function(module, exports) { /** @@ -85059,7 +84444,7 @@ module.exports = RGBToHSV; /***/ }), -/* 487 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85103,7 +84488,7 @@ module.exports = RGBToString; /***/ }), -/* 488 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85118,14 +84503,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(489), - GeometryMask: __webpack_require__(490) + BitmapMask: __webpack_require__(491), + GeometryMask: __webpack_require__(492) }; /***/ }), -/* 489 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85316,7 +84701,7 @@ var BitmapMask = new Class({ * @param {[type]} mask - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. */ - preRenderCanvas: function (renderer, mask, camera) + preRenderCanvas: function () { // NOOP }, @@ -85329,7 +84714,7 @@ var BitmapMask = new Class({ * * @param {[type]} renderer - [description] */ - postRenderCanvas: function (renderer) + postRenderCanvas: function () { // NOOP } @@ -85340,7 +84725,7 @@ module.exports = BitmapMask; /***/ }), -/* 490 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85484,7 +84869,7 @@ module.exports = GeometryMask; /***/ }), -/* 491 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85499,7 +84884,7 @@ module.exports = GeometryMask; module.exports = { - AddToDOM: __webpack_require__(124), + AddToDOM: __webpack_require__(123), DOMContentLoaded: __webpack_require__(227), ParseXML: __webpack_require__(228), RemoveFromDOM: __webpack_require__(229), @@ -85509,7 +84894,7 @@ module.exports = { /***/ }), -/* 492 */ +/* 494 */ /***/ (function(module, exports) { // shim for using process in browser @@ -85699,7 +85084,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 493 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85881,7 +85266,7 @@ module.exports = EventEmitter; /***/ }), -/* 494 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85890,16 +85275,16 @@ module.exports = EventEmitter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(123); var AnimationManager = __webpack_require__(194); var CacheManager = __webpack_require__(197); var CanvasPool = __webpack_require__(20); var Class = __webpack_require__(0); -var Config = __webpack_require__(495); -var CreateRenderer = __webpack_require__(496); +var Config = __webpack_require__(497); +var CreateRenderer = __webpack_require__(498); var DataManager = __webpack_require__(79); -var DebugHeader = __webpack_require__(513); -var Device = __webpack_require__(514); +var DebugHeader = __webpack_require__(515); +var Device = __webpack_require__(516); var DOMContentLoaded = __webpack_require__(227); var EventEmitter = __webpack_require__(13); var InputManager = __webpack_require__(237); @@ -85908,8 +85293,8 @@ var PluginManager = __webpack_require__(11); var SceneManager = __webpack_require__(249); var SoundManagerCreator = __webpack_require__(253); var TextureManager = __webpack_require__(260); -var TimeStep = __webpack_require__(537); -var VisibilityHandler = __webpack_require__(538); +var TimeStep = __webpack_require__(539); +var VisibilityHandler = __webpack_require__(540); /** * @classdesc @@ -86362,7 +85747,7 @@ module.exports = Game; /***/ }), -/* 495 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86377,7 +85762,7 @@ var GetValue = __webpack_require__(4); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(3); var Plugins = __webpack_require__(231); -var ValueToColor = __webpack_require__(116); +var ValueToColor = __webpack_require__(115); /** * This callback type is completely empty, a no-operation. @@ -86593,7 +85978,7 @@ module.exports = Config; /***/ }), -/* 496 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86605,7 +85990,7 @@ module.exports = Config; var CanvasInterpolation = __webpack_require__(219); var CanvasPool = __webpack_require__(20); var CONST = __webpack_require__(22); -var Features = __webpack_require__(125); +var Features = __webpack_require__(124); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -86681,8 +86066,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(497); - WebGLRenderer = __webpack_require__(502); + CanvasRenderer = __webpack_require__(499); + WebGLRenderer = __webpack_require__(504); // Let the config pick the renderer type, both are included if (config.renderType === CONST.WEBGL) @@ -86722,7 +86107,7 @@ module.exports = CreateRenderer; /***/ }), -/* 497 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86731,14 +86116,14 @@ module.exports = CreateRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitImage = __webpack_require__(498); -var CanvasSnapshot = __webpack_require__(499); +var BlitImage = __webpack_require__(500); +var CanvasSnapshot = __webpack_require__(501); var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var DrawImage = __webpack_require__(500); -var GetBlendModes = __webpack_require__(501); +var DrawImage = __webpack_require__(502); +var GetBlendModes = __webpack_require__(503); var ScaleModes = __webpack_require__(62); -var Smoothing = __webpack_require__(121); +var Smoothing = __webpack_require__(120); /** * @classdesc @@ -86995,7 +86380,7 @@ var CanvasRenderer = new Class({ * * @param {function} callback - [description] */ - onContextLost: function (callback) + onContextLost: function () { }, @@ -87007,7 +86392,7 @@ var CanvasRenderer = new Class({ * * @param {function} callback - [description] */ - onContextRestored: function (callback) + onContextRestored: function () { }, @@ -87251,7 +86636,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports) { /** @@ -87292,7 +86677,7 @@ module.exports = BlitImage; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, exports) { /** @@ -87331,7 +86716,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, exports) { /** @@ -87376,6 +86761,7 @@ var DrawImage = function (src, camera) if (this.currentScaleMode !== src.scaleMode) { this.currentScaleMode = src.scaleMode; + // ctx[this.smoothProperty] = (source.scaleMode === ScaleModes.LINEAR); } @@ -87425,7 +86811,7 @@ module.exports = DrawImage; /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87434,7 +86820,7 @@ module.exports = DrawImage; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var modes = __webpack_require__(46); +var modes = __webpack_require__(45); var CanvasFeatures = __webpack_require__(232); /** @@ -87475,7 +86861,7 @@ module.exports = GetBlendModes; /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87486,13 +86872,13 @@ module.exports = GetBlendModes; var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var IsSizePowerOfTwo = __webpack_require__(126); -var Utils = __webpack_require__(34); -var WebGLSnapshot = __webpack_require__(503); +var IsSizePowerOfTwo = __webpack_require__(125); +var Utils = __webpack_require__(42); +var WebGLSnapshot = __webpack_require__(505); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(504); -var FlatTintPipeline = __webpack_require__(507); +var BitmapMaskPipeline = __webpack_require__(506); +var FlatTintPipeline = __webpack_require__(509); var ForwardDiffuseLightPipeline = __webpack_require__(235); var TextureTintPipeline = __webpack_require__(236); @@ -87513,6 +86899,7 @@ var WebGLRenderer = new Class({ function WebGLRenderer (game) { + // eslint-disable-next-line consistent-this var renderer = this; var contextCreationConfig = { @@ -87658,27 +87045,17 @@ var WebGLRenderer = new Class({ encoder: null }; - for (var i = 0; i <= 16; i++) - { - this.blendModes.push({ func: [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ], equation: WebGLRenderingContext.FUNC_ADD }); - } - - this.blendModes[1].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.DST_ALPHA ]; - this.blendModes[2].func = [ WebGLRenderingContext.DST_COLOR, WebGLRenderingContext.ONE_MINUS_SRC_ALPHA ]; - this.blendModes[3].func = [ WebGLRenderingContext.ONE, WebGLRenderingContext.ONE_MINUS_SRC_COLOR ]; - - // Intenal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) + // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc) /** * [description] * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit - * @type {int} + * @type {integer} * @since 3.1.0 */ this.currentActiveTextureUnit = 0; - /** * [description] * @@ -87742,7 +87119,7 @@ var WebGLRenderer = new Class({ * [description] * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentBlendMode - * @type {int} + * @type {integer} * @since 3.0.0 */ this.currentBlendMode = Infinity; @@ -87764,7 +87141,7 @@ var WebGLRenderer = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.currentScissor = new Uint32Array([0, 0, this.width, this.height]); + this.currentScissor = new Uint32Array([ 0, 0, this.width, this.height ]); /** * [description] @@ -87783,11 +87160,12 @@ var WebGLRenderer = new Class({ * @type {Uint32Array} * @since 3.0.0 */ - this.scissorStack = new Uint32Array(4 * 1000); + this.scissorStack = new Uint32Array(4 * 1000); // Setup context lost and restore event listeners - this.canvas.addEventListener('webglcontextlost', function (event) { + this.canvas.addEventListener('webglcontextlost', function (event) + { renderer.contextLost = true; event.preventDefault(); @@ -87798,7 +87176,8 @@ var WebGLRenderer = new Class({ } }, false); - this.canvas.addEventListener('webglcontextrestored', function (event) { + this.canvas.addEventListener('webglcontextrestored', function () + { renderer.contextLost = false; renderer.init(renderer.config); for (var index = 0; index < renderer.restoredContextCallbacks.length; ++index) @@ -87867,6 +87246,15 @@ var WebGLRenderer = new Class({ this.gl = gl; + for (var i = 0; i <= 16; i++) + { + this.blendModes.push({ func: [ gl.ONE, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_ADD }); + } + + this.blendModes[1].func = [ gl.ONE, gl.DST_ALPHA ]; + this.blendModes[2].func = [ gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA ]; + this.blendModes[3].func = [ gl.ONE, gl.ONE_MINUS_SRC_COLOR ]; + // Load supported extensions this.supportedExtensions = gl.getSupportedExtensions(); @@ -87950,7 +87338,7 @@ var WebGLRenderer = new Class({ */ onContextRestored: function (callback, target) { - this.restoredContextCallbacks.push([callback, target]); + this.restoredContextCallbacks.push([ callback, target ]); return this; }, @@ -87967,7 +87355,7 @@ var WebGLRenderer = new Class({ */ onContextLost: function (callback, target) { - this.lostContextCallbacks.push([callback, target]); + this.lostContextCallbacks.push([ callback, target ]); return this; }, @@ -87998,7 +87386,7 @@ var WebGLRenderer = new Class({ */ getExtension: function (extensionName) { - if (!this.hasExtension(extensionName)) return null; + if (!this.hasExtension(extensionName)) { return null; } if (!(extensionName in this.extensions)) { @@ -88083,8 +87471,8 @@ var WebGLRenderer = new Class({ */ addPipeline: function (pipelineName, pipelineInstance) { - if (!this.hasPipeline(pipelineName)) this.pipelines[pipelineName] = pipelineInstance; - else console.warn('Pipeline', pipelineName, ' already exists.'); + if (!this.hasPipeline(pipelineName)) { this.pipelines[pipelineName] = pipelineInstance; } + else { console.warn('Pipeline', pipelineName, ' already exists.'); } pipelineInstance.name = pipelineName; this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); @@ -88098,10 +87486,10 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setScissor * @since 3.0.0 * - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} w - [description] - * @param {int} h - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} w - [description] + * @param {integer} h - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -88109,11 +87497,11 @@ var WebGLRenderer = new Class({ { var gl = this.gl; var currentScissor = this.currentScissor; - var enabled = (x == 0 && y == 0 && w == gl.canvas.width && h == gl.canvas.height && w >= 0 && h >= 0); + var enabled = (x === 0 && y === 0 && w === gl.canvas.width && h === gl.canvas.height && w >= 0 && h >= 0); - if (currentScissor[0] !== x || - currentScissor[1] !== y || - currentScissor[2] !== w || + if (currentScissor[0] !== x || + currentScissor[1] !== y || + currentScissor[2] !== w || currentScissor[3] !== h) { this.flush(); @@ -88144,10 +87532,10 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#pushScissor * @since 3.0.0 * - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} w - [description] - * @param {int} h - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} w - [description] + * @param {integer} h - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -88187,7 +87575,7 @@ var WebGLRenderer = new Class({ var h = scissorStack[stackIndex + 3]; this.currentScissorIdx = stackIndex; - this.setScissor(x, y, w, h); + this.setScissor(x, y, w, h); return this; }, @@ -88224,7 +87612,7 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode * @since 3.0.0 * - * @param {int} blendModeId - [description] + * @param {integer} blendModeId - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -88295,7 +87683,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {WebGLTexture} texture - [description] - * @param {int} textureUnit - [description] + * @param {integer} textureUnit - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -88428,14 +87816,14 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {object} source - [description] - * @param {int} width - [description] - * @param {int} height - [description] - * @param {int} scaleMode - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] + * @param {integer} scaleMode - [description] * * @return {WebGLTexture} [description] */ createTextureFromSource: function (source, width, height, scaleMode) - { + { var gl = this.gl; var filter = gl.NEAREST; var wrap = gl.CLAMP_TO_EDGE; @@ -88476,15 +87864,15 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#createTexture2D * @since 3.0.0 * - * @param {int} mipLevel - [description] - * @param {int} minFilter - [description] - * @param {int} magFilter - [description] - * @param {int} wrapT - [description] - * @param {int} wrapS - [description] - * @param {int} format - [description] + * @param {integer} mipLevel - [description] + * @param {integer} minFilter - [description] + * @param {integer} magFilter - [description] + * @param {integer} wrapT - [description] + * @param {integer} wrapS - [description] + * @param {integer} format - [description] * @param {object} pixels - [description] - * @param {int} width - [description] - * @param {int} height - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] * @param {boolean} pma - [description] * * @return {WebGLTexture} [description] @@ -88494,7 +87882,7 @@ var WebGLRenderer = new Class({ var gl = this.gl; var texture = gl.createTexture(); - pma = (pma === undefined || pma === null) ? true : pma; + pma = (pma === undefined || pma === null) ? true : pma; this.setTexture2D(texture, 0); @@ -88533,8 +87921,8 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#createFramebuffer * @since 3.0.0 * - * @param {int} width - [description] - * @param {int} height - [description] + * @param {integer} width - [description] + * @param {integer} height - [description] * @param {WebGLFramebuffer} renderTexture - [description] * @param {boolean} addDepthStencilBuffer - [description] * @@ -88632,7 +88020,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {ArrayBuffer} initialDataOrSize - [description] - * @param {int} bufferUsage - [description] + * @param {integer} bufferUsage - [description] * * @return {WebGLBuffer} [description] */ @@ -88655,7 +88043,7 @@ var WebGLRenderer = new Class({ * @since 3.0.0 * * @param {ArrayBuffer} initialDataOrSize - [description] - * @param {int} bufferUsage - [description] + * @param {integer} bufferUsage - [description] * * @return {WebGLBuffer} [description] */ @@ -88681,7 +88069,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteTexture: function (texture) + deleteTexture: function () { return this; }, @@ -88696,7 +88084,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteFramebuffer: function (framebuffer) + deleteFramebuffer: function () { return this; }, @@ -88711,7 +88099,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteProgram: function (program) + deleteProgram: function () { return this; }, @@ -88726,7 +88114,7 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteBuffer: function (vertexBuffer) + deleteBuffer: function () { return this; }, @@ -88753,12 +88141,12 @@ var WebGLRenderer = new Class({ var FlatTintPipeline = this.pipelines.FlatTintPipeline; FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1.0), color.alphaGL, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); FlatTintPipeline.flush(); @@ -88781,22 +88169,22 @@ var WebGLRenderer = new Class({ // Fade FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(camera._fadeRed, camera._fadeGreen, camera._fadeBlue, 1.0), camera._fadeAlpha, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); // Flash FlatTintPipeline.batchFillRect( - 0, 0, 1, 1, 0, - camera.x, camera.y, camera.width, camera.height, + 0, 0, 1, 1, 0, + camera.x, camera.y, camera.width, camera.height, Utils.getTintFromFloats(camera._flashRed, camera._flashGreen, camera._flashBlue, 1.0), camera._flashAlpha, 1, 0, 0, 1, 0, 0, - [1, 0, 0, 1, 0, 0] + [ 1, 0, 0, 1, 0, 0 ] ); FlatTintPipeline.flush(); @@ -88813,7 +88201,7 @@ var WebGLRenderer = new Class({ */ preRender: function () { - if (this.contextLost) return; + if (this.contextLost) { return; } var gl = this.gl; var color = this.config.backgroundColor; @@ -88823,7 +88211,7 @@ var WebGLRenderer = new Class({ gl.clearColor(color.redGL, color.greenGL, color.blueGL, color.alphaGL); if (this.config.clearBeforeRender) - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); + { gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT); } for (var key in pipelines) { @@ -88844,9 +88232,8 @@ var WebGLRenderer = new Class({ */ render: function (scene, children, interpolationPercentage, camera) { - if (this.contextLost) return; + if (this.contextLost) { return; } - var gl = this.gl; var list = children.list; var childCount = list.length; var pipelines = this.pipelines; @@ -88898,7 +88285,7 @@ var WebGLRenderer = new Class({ */ postRender: function () { - if (this.contextLost) return; + if (this.contextLost) { return; } // Unbind custom framebuffer here @@ -88945,11 +88332,11 @@ var WebGLRenderer = new Class({ * @param {HTMLCanvasElement} srcCanvas - [description] * @param {WebGLTexture} dstTexture - [description] * @param {boolean} shouldReallocate - [description] - * @param {int} scaleMode - [description] + * @param {integer} scaleMode - [description] * * @return {WebGLTexture} [description] */ - canvasToTexture: function (srcCanvas, dstTexture, shouldReallocate, scaleMode) + canvasToTexture: function (srcCanvas, dstTexture, shouldReallocate) { var gl = this.gl; @@ -88991,8 +88378,8 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#setTextureFilter * @since 3.0.0 * - * @param {int} texture - [description] - * @param {int} filter - [description] + * @param {integer} texture - [description] + * @param {integer} filter - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -89101,7 +88488,7 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] + * @param {integer} x - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -89120,8 +88507,8 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -89140,9 +88527,9 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} z - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} z - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -89161,10 +88548,10 @@ var WebGLRenderer = new Class({ * * @param {WebGLProgram} program - [description] * @param {string} name - [description] - * @param {int} x - [description] - * @param {int} y - [description] - * @param {int} z - [description] - * @param {int} w - [description] + * @param {integer} x - [description] + * @param {integer} y - [description] + * @param {integer} z - [description] + * @param {integer} w - [description] * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ @@ -89243,8 +88630,6 @@ var WebGLRenderer = new Class({ */ destroy: function () { - var gl = this.gl; - // Clear-up anything that should be cleared :) for (var key in this.pipelines) { @@ -89255,7 +88640,7 @@ var WebGLRenderer = new Class({ for (var index = 0; index < this.nativeTextures.length; ++index) { this.deleteTexture(this.nativeTextures[index]); - delete this.nativeTextures[index]; + delete this.nativeTextures[index]; } if (this.hasExtension('WEBGL_lose_context')) @@ -89277,7 +88662,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports) { /** @@ -89346,7 +88731,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89356,10 +88741,9 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(505); -var ShaderSourceVS = __webpack_require__(506); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); +var ShaderSourceFS = __webpack_require__(507); +var ShaderSourceVS = __webpack_require__(508); +var WebGLPipeline = __webpack_require__(126); /** * @classdesc @@ -89392,7 +88776,7 @@ var BitmapMaskPipeline = new Class({ fragShader: ShaderSourceFS, vertexCapacity: 3, - vertexSize: + vertexSize: Float32Array.BYTES_PER_ELEMENT * 2, vertices: new Float32Array([ @@ -89558,19 +88942,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = maskColor.a * mainColor.a;\r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n" /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n" /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89583,10 +88967,10 @@ var Class = __webpack_require__(0); var Commands = __webpack_require__(127); var Earcut = __webpack_require__(233); var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(508); -var ShaderSourceVS = __webpack_require__(509); -var Utils = __webpack_require__(34); -var WebGLPipeline = __webpack_require__(83); +var ShaderSourceFS = __webpack_require__(510); +var ShaderSourceVS = __webpack_require__(511); +var Utils = __webpack_require__(42); +var WebGLPipeline = __webpack_require__(126); var Point = function (x, y, width, rgb, alpha) { @@ -89604,7 +88988,7 @@ var Path = function (x, y, width, rgb, alpha) this.points[0] = new Point(x, y, width, rgb, alpha); }; -var currentMatrix = new Float32Array([1, 0, 0, 1, 0, 0]); +var currentMatrix = new Float32Array([ 1, 0, 0, 1, 0, 0 ]); var matrixStack = new Float32Array(6 * 1000); var matrixStackLength = 0; var pathArray = []; @@ -89644,8 +89028,8 @@ var FlatTintPipeline = new Class({ fragShader: ShaderSourceFS, vertexCapacity: 12000, - vertexSize: - Float32Array.BYTES_PER_ELEMENT * 2 + + vertexSize: + Float32Array.BYTES_PER_ELEMENT * 2 + Uint8Array.BYTES_PER_ELEMENT * 4, attributes: [ @@ -89762,7 +89146,7 @@ var FlatTintPipeline = new Class({ * @param {float} y - [description] * @param {float} width - [description] * @param {float} height - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -89771,10 +89155,9 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) - { + batchFillRect: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x, y, width, height, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) + { this.renderer.setPipeline(this); if (this.vertexCount + 6 > this.vertexCapacity) @@ -89782,8 +89165,8 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -89811,18 +89194,6 @@ var FlatTintPipeline = new Class({ var ty3 = xw * b + y * d + f; var tint = Utils.getTintAppendFloatAlphaAndSwap(fillColor, fillAlpha); - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - tx3 = ((tx3 * resolution)|0) / resolution; - ty3 = ((ty3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -89862,7 +89233,7 @@ var FlatTintPipeline = new Class({ * @param {float} y1 - [description] * @param {float} x2 - [description] * @param {float} y2 - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -89871,9 +89242,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -89882,8 +89252,8 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var vertexOffset = this.vertexCount * this.vertexComponentCount; @@ -89907,16 +89277,6 @@ var FlatTintPipeline = new Class({ var ty2 = x2 * b + y2 * d + f; var tint = Utils.getTintAppendFloatAlphaAndSwap(fillColor, fillAlpha); - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -89948,7 +89308,7 @@ var FlatTintPipeline = new Class({ * @param {float} x2 - [description] * @param {float} y2 - [description] * @param {float} lineWidth - [description] - * @param {int} lineColor - [description] + * @param {integer} lineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a - [description] * @param {float} b - [description] @@ -89957,9 +89317,8 @@ var FlatTintPipeline = new Class({ * @param {float} e - [description] * @param {float} f - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchStrokeTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, currentMatrix, roundPixels) + batchStrokeTriangle: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, x0, y0, x1, y1, x2, y2, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, currentMatrix) { var tempTriangle = this.tempTriangle; @@ -89989,8 +89348,7 @@ var FlatTintPipeline = new Class({ tempTriangle, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, false, - currentMatrix, - roundPixels + currentMatrix ); }, @@ -90006,7 +89364,7 @@ var FlatTintPipeline = new Class({ * @param {float} srcScaleY - [description] * @param {float} srcRotation - [description] * @param {float} path - [description] - * @param {int} fillColor - [description] + * @param {integer} fillColor - [description] * @param {float} fillAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -90015,14 +89373,13 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchFillPath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchFillPath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, fillColor, fillAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var length = path.length; var polygonCache = this.polygonCache; var polygonIndexArray; @@ -90083,16 +89440,6 @@ var FlatTintPipeline = new Class({ tx2 = x2 * a + y2 * c + e; ty2 = x2 * b + y2 * d + f; - if (roundPixels) - { - tx0 = ((tx0 * resolution)|0) / resolution; - ty0 = ((ty0 * resolution)|0) / resolution; - tx1 = ((tx1 * resolution)|0) / resolution; - ty1 = ((ty1 * resolution)|0) / resolution; - tx2 = ((tx2 * resolution)|0) / resolution; - ty2 = ((ty2 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = tx0; vertexViewF32[vertexOffset + 1] = ty0; vertexViewU32[vertexOffset + 2] = tint; @@ -90122,7 +89469,7 @@ var FlatTintPipeline = new Class({ * @param {float} srcRotation - [description] * @param {array} path - [description] * @param {float} lineWidth - [description] - * @param {int} lineColor - [description] + * @param {integer} lineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a - [description] * @param {float} b - [description] @@ -90132,9 +89479,8 @@ var FlatTintPipeline = new Class({ * @param {float} f - [description] * @param {boolean} isLastPath - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchStrokePath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, isLastPath, currentMatrix, roundPixels) + batchStrokePath: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, path, lineWidth, lineColor, lineAlpha, a, b, c, d, e, f, isLastPath, currentMatrix) { this.renderer.setPipeline(this); @@ -90160,8 +89506,7 @@ var FlatTintPipeline = new Class({ point0.width / 2, point1.width / 2, point0.rgb, point1.rgb, lineAlpha, a, b, c, d, e, f, - currentMatrix, - roundPixels + currentMatrix ); polylines.push(line); @@ -90221,8 +89566,8 @@ var FlatTintPipeline = new Class({ * @param {float} by - [description] * @param {float} aLineWidth - [description] * @param {float} bLineWidth - [description] - * @param {int} aLineColor - [description] - * @param {int} bLineColor - [description] + * @param {integer} aLineColor - [description] + * @param {integer} bLineColor - [description] * @param {float} lineAlpha - [description] * @param {float} a1 - [description] * @param {float} b1 - [description] @@ -90231,9 +89576,8 @@ var FlatTintPipeline = new Class({ * @param {float} e1 - [description] * @param {float} f1 - [description] * @param {Float32Array} currentMatrix - [description] - * @param {boolean} roundPixels - [description] */ - batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix, roundPixels) + batchLine: function (srcX, srcY, srcScaleX, srcScaleY, srcRotation, ax, ay, bx, by, aLineWidth, bLineWidth, aLineColor, bLineColor, lineAlpha, a1, b1, c1, d1, e1, f1, currentMatrix) { this.renderer.setPipeline(this); @@ -90242,8 +89586,8 @@ var FlatTintPipeline = new Class({ this.flush(); } - var renderer = this.renderer; - var resolution = renderer.config.resolution; + var renderer = this.renderer; + var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var a0 = currentMatrix[0]; var b0 = currentMatrix[1]; var c0 = currentMatrix[2]; @@ -90286,18 +89630,6 @@ var FlatTintPipeline = new Class({ var bTint = getTint(bLineColor, lineAlpha); var vertexOffset = this.vertexCount * this.vertexComponentCount; - if (roundPixels) - { - x0 = ((x0 * resolution)|0) / resolution; - y0 = ((y0 * resolution)|0) / resolution; - x1 = ((x1 * resolution)|0) / resolution; - y1 = ((y1 * resolution)|0) / resolution; - x2 = ((x2 * resolution)|0) / resolution; - y2 = ((y2 * resolution)|0) / resolution; - x3 = ((x3 * resolution)|0) / resolution; - y3 = ((y3 * resolution)|0) / resolution; - } - vertexViewF32[vertexOffset + 0] = x0; vertexViewF32[vertexOffset + 1] = y0; vertexViewU32[vertexOffset + 2] = bTint; @@ -90306,7 +89638,7 @@ var FlatTintPipeline = new Class({ vertexViewU32[vertexOffset + 5] = aTint; vertexViewF32[vertexOffset + 6] = x2; vertexViewF32[vertexOffset + 7] = y2; - vertexViewU32[vertexOffset + 8] = bTint + vertexViewU32[vertexOffset + 8] = bTint; vertexViewF32[vertexOffset + 9] = x1; vertexViewF32[vertexOffset + 10] = y1; vertexViewU32[vertexOffset + 11] = aTint; @@ -90338,7 +89670,7 @@ var FlatTintPipeline = new Class({ */ batchGraphics: function (graphics, camera) { - if (graphics.commandBuffer.length <= 0) return; + if (graphics.commandBuffer.length <= 0) { return; } this.renderer.setPipeline(this); @@ -90391,7 +89723,9 @@ var FlatTintPipeline = new Class({ var mvd = src * cmb + srd * cmd; var mve = sre * cma + srf * cmc + cme; var mvf = sre * cmb + srf * cmd + cmf; - var roundPixels = camera.roundPixels; + + var pathArrayIndex; + var pathArrayLength; pathArray.length = 0; @@ -90467,52 +89801,58 @@ var FlatTintPipeline = new Class({ break; case Commands.FILL_PATH: - for (var pathArrayIndex = 0, pathArrayLength = pathArray.length; + for (pathArrayIndex = 0, pathArrayLength = pathArray.length; pathArrayIndex < pathArrayLength; ++pathArrayIndex) { this.batchFillPath( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ pathArray[pathArrayIndex].points, fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); } break; case Commands.STROKE_PATH: - for (var pathArrayIndex = 0, pathArrayLength = pathArray.length; + for (pathArrayIndex = 0, pathArrayLength = pathArray.length; pathArrayIndex < pathArrayLength; ++pathArrayIndex) { path = pathArray[pathArrayIndex]; this.batchStrokePath( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ path.points, lineWidth, lineColor, lineAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, path === this._lastPath, - currentMatrix, - roundPixels + currentMatrix ); } break; case Commands.FILL_RECT: this.batchFillRect( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Rectangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -90520,10 +89860,10 @@ var FlatTintPipeline = new Class({ commands[cmdIndex + 4], fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 4; @@ -90531,8 +89871,10 @@ var FlatTintPipeline = new Class({ case Commands.FILL_TRIANGLE: this.batchFillTriangle( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Triangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -90542,10 +89884,10 @@ var FlatTintPipeline = new Class({ commands[cmdIndex + 6], fillColor, fillAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 6; @@ -90553,8 +89895,10 @@ var FlatTintPipeline = new Class({ case Commands.STROKE_TRIANGLE: this.batchStrokeTriangle( + /* Graphics Game Object Properties */ srcX, srcY, srcScaleX, srcScaleY, srcRotation, + /* Triangle properties */ commands[cmdIndex + 1], commands[cmdIndex + 2], @@ -90565,10 +89909,10 @@ var FlatTintPipeline = new Class({ lineWidth, lineColor, lineAlpha, + /* Transform */ mva, mvb, mvc, mvd, mve, mvf, - currentMatrix, - roundPixels + currentMatrix ); cmdIndex += 6; @@ -90684,6 +90028,7 @@ var FlatTintPipeline = new Class({ break; default: + // eslint-disable-next-line no-console console.error('Phaser: Invalid Graphics Command ID ' + cmd); break; } @@ -90701,7 +90046,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.Tilemaps.StaticTilemapLayer} tilemap - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawStaticTilemapLayer: function (tilemap, camera) + drawStaticTilemapLayer: function () { }, @@ -90714,7 +90059,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Particles.ParticleEmittermanager} emitterManager - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawEmitterManager: function (emitterManager, camera) + drawEmitterManager: function () { }, @@ -90727,7 +90072,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Blitter} blitter - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - drawBlitter: function (blitter, camera) + drawBlitter: function () { }, @@ -90740,7 +90085,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Sprite} sprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchSprite: function (sprite, camera) + batchSprite: function () { }, @@ -90753,7 +90098,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Mesh} mesh - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchMesh: function (mesh, camera) + batchMesh: function () { }, @@ -90766,7 +90111,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.BitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchBitmapText: function (bitmapText, camera) + batchBitmapText: function () { }, @@ -90779,7 +90124,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.DynamicBitmapText} bitmapText - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchDynamicBitmapText: function (bitmapText, camera) + batchDynamicBitmapText: function () { }, @@ -90792,7 +90137,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.Text} text - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchText: function (text, camera) + batchText: function () { }, @@ -90805,7 +90150,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.Tilemaps.DynamicTilemapLayer} tilemapLayer - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchDynamicTilemapLayer: function (tilemapLayer, camera) + batchDynamicTilemapLayer: function () { }, @@ -90818,7 +90163,7 @@ var FlatTintPipeline = new Class({ * @param {Phaser.GameObjects.TileSprite} tileSprite - [description] * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] */ - batchTileSprite: function (tileSprite, camera) + batchTileSprite: function () { } @@ -90828,37 +90173,37 @@ module.exports = FlatTintPipeline; /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n" /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n" /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n" /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n" /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n" /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90977,7 +90322,7 @@ module.exports = DebugHeader; /***/ }), -/* 514 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90999,18 +90344,18 @@ module.exports = { os: __webpack_require__(67), browser: __webpack_require__(82), - features: __webpack_require__(125), - input: __webpack_require__(515), - audio: __webpack_require__(516), - video: __webpack_require__(517), - fullscreen: __webpack_require__(518), + features: __webpack_require__(124), + input: __webpack_require__(517), + audio: __webpack_require__(518), + video: __webpack_require__(519), + fullscreen: __webpack_require__(520), canvasFeatures: __webpack_require__(232) }; /***/ }), -/* 515 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91090,7 +90435,7 @@ module.exports = init(); /***/ }), -/* 516 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91216,7 +90561,7 @@ module.exports = init(); /***/ }), -/* 517 */ +/* 519 */ /***/ (function(module, exports) { /** @@ -91302,7 +90647,7 @@ module.exports = init(); /***/ }), -/* 518 */ +/* 520 */ /***/ (function(module, exports) { /** @@ -91401,7 +90746,7 @@ module.exports = init(); /***/ }), -/* 519 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91410,7 +90755,7 @@ module.exports = init(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(520); +var AdvanceKeyCombo = __webpack_require__(522); /** * Used internally by the KeyCombo class. @@ -91481,7 +90826,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 520 */ +/* 522 */ /***/ (function(module, exports) { /** @@ -91522,7 +90867,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 521 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -91556,7 +90901,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 522 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91578,7 +90923,7 @@ module.exports = KeyMap; /***/ }), -/* 523 */ +/* 525 */ /***/ (function(module, exports) { /** @@ -91633,7 +90978,7 @@ module.exports = ProcessKeyDown; /***/ }), -/* 524 */ +/* 526 */ /***/ (function(module, exports) { /** @@ -91683,7 +91028,7 @@ module.exports = ProcessKeyUp; /***/ }), -/* 525 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91745,7 +91090,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 526 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91791,7 +91136,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 527 */ +/* 529 */ /***/ (function(module, exports) { /** @@ -91839,7 +91184,7 @@ module.exports = InjectionMap; /***/ }), -/* 528 */ +/* 530 */ /***/ (function(module, exports) { /** @@ -91872,7 +91217,7 @@ module.exports = Canvas; /***/ }), -/* 529 */ +/* 531 */ /***/ (function(module, exports) { /** @@ -91905,7 +91250,7 @@ module.exports = Image; /***/ }), -/* 530 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92010,7 +91355,7 @@ module.exports = JSONArray; /***/ }), -/* 531 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92107,7 +91452,7 @@ module.exports = JSONHash; /***/ }), -/* 532 */ +/* 534 */ /***/ (function(module, exports) { /** @@ -92166,7 +91511,7 @@ var Pyxel = function (texture, json) frames[i].y, tilewidth, tileheight, - "frame_" + i // No names are included in pyxel tilemap data. + 'frame_' + i // No names are included in pyxel tilemap data. )); // No trim data is included. @@ -92180,7 +91525,7 @@ module.exports = Pyxel; /***/ }), -/* 533 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92292,7 +91637,7 @@ module.exports = SpriteSheet; /***/ }), -/* 534 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92475,7 +91820,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 535 */ +/* 537 */ /***/ (function(module, exports) { /** @@ -92558,7 +91903,7 @@ module.exports = StarlingXML; /***/ }), -/* 536 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -92575,7 +91920,9 @@ var addFrame = function (texture, sourceIndex, name, frame) var y = imageHeight - frame.y - frame.height; - var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); + // var newFrame = texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); + + texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height); // console.log('name', name, 'rect', frame.x, y, frame.width, frame.height); @@ -92624,8 +91971,9 @@ var UnityYAML = function (texture, sourceIndex, yaml) var prevSprite = ''; var currentSprite = ''; var rect = { x: 0, y: 0, width: 0, height: 0 }; - var pivot = { x: 0, y: 0 }; - var border = { x: 0, y: 0, z: 0, w: 0 }; + + // var pivot = { x: 0, y: 0 }; + // var border = { x: 0, y: 0, z: 0, w: 0 }; for (var i = 0; i < data.length; i++) { @@ -92668,13 +92016,13 @@ var UnityYAML = function (texture, sourceIndex, yaml) rect[key] = parseInt(value, 10); break; - case 'pivot': - pivot = eval('var obj = ' + value); - break; + // case 'pivot': + // pivot = eval('var obj = ' + value); + // break; - case 'border': - border = eval('var obj = ' + value); - break; + // case 'border': + // border = eval('var obj = ' + value); + // break; } } @@ -92722,7 +92070,7 @@ TextureImporter: /***/ }), -/* 537 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93344,7 +92692,7 @@ module.exports = TimeStep; /***/ }), -/* 538 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -93458,7 +92806,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 539 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93473,10 +92821,10 @@ module.exports = VisibilityHandler; var GameObjects = { - DisplayList: __webpack_require__(540), + DisplayList: __webpack_require__(542), GameObjectCreator: __webpack_require__(14), GameObjectFactory: __webpack_require__(9), - UpdateList: __webpack_require__(541), + UpdateList: __webpack_require__(543), Components: __webpack_require__(12), @@ -93489,7 +92837,7 @@ var GameObjects = { Particles: __webpack_require__(137), PathFollower: __webpack_require__(287), Sprite3D: __webpack_require__(81), - Sprite: __webpack_require__(38), + Sprite: __webpack_require__(37), Text: __webpack_require__(139), TileSprite: __webpack_require__(140), Zone: __webpack_require__(77), @@ -93497,34 +92845,34 @@ var GameObjects = { // Game Object Factories Factories: { - Blitter: __webpack_require__(620), - DynamicBitmapText: __webpack_require__(621), - Graphics: __webpack_require__(622), - Group: __webpack_require__(623), - Image: __webpack_require__(624), - Particles: __webpack_require__(625), - PathFollower: __webpack_require__(626), - Sprite3D: __webpack_require__(627), - Sprite: __webpack_require__(628), - StaticBitmapText: __webpack_require__(629), - Text: __webpack_require__(630), - TileSprite: __webpack_require__(631), - Zone: __webpack_require__(632) + Blitter: __webpack_require__(622), + DynamicBitmapText: __webpack_require__(623), + Graphics: __webpack_require__(624), + Group: __webpack_require__(625), + Image: __webpack_require__(626), + Particles: __webpack_require__(627), + PathFollower: __webpack_require__(628), + Sprite3D: __webpack_require__(629), + Sprite: __webpack_require__(630), + StaticBitmapText: __webpack_require__(631), + Text: __webpack_require__(632), + TileSprite: __webpack_require__(633), + Zone: __webpack_require__(634) }, Creators: { - Blitter: __webpack_require__(633), - DynamicBitmapText: __webpack_require__(634), - Graphics: __webpack_require__(635), - Group: __webpack_require__(636), - Image: __webpack_require__(637), - Particles: __webpack_require__(638), - Sprite3D: __webpack_require__(639), - Sprite: __webpack_require__(640), - StaticBitmapText: __webpack_require__(641), - Text: __webpack_require__(642), - TileSprite: __webpack_require__(643), - Zone: __webpack_require__(644) + Blitter: __webpack_require__(635), + DynamicBitmapText: __webpack_require__(636), + Graphics: __webpack_require__(637), + Group: __webpack_require__(638), + Image: __webpack_require__(639), + Particles: __webpack_require__(640), + Sprite3D: __webpack_require__(641), + Sprite: __webpack_require__(642), + StaticBitmapText: __webpack_require__(643), + Text: __webpack_require__(644), + TileSprite: __webpack_require__(645), + Zone: __webpack_require__(646) } }; @@ -93532,26 +92880,26 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(89); + GameObjects.Mesh = __webpack_require__(88); GameObjects.Quad = __webpack_require__(141); - GameObjects.Factories.Mesh = __webpack_require__(648); - GameObjects.Factories.Quad = __webpack_require__(649); + GameObjects.Factories.Mesh = __webpack_require__(650); + GameObjects.Factories.Quad = __webpack_require__(651); - GameObjects.Creators.Mesh = __webpack_require__(650); - GameObjects.Creators.Quad = __webpack_require__(651); + GameObjects.Creators.Mesh = __webpack_require__(652); + GameObjects.Creators.Quad = __webpack_require__(653); GameObjects.Light = __webpack_require__(290); __webpack_require__(291); - __webpack_require__(652); + __webpack_require__(654); } module.exports = GameObjects; /***/ }), -/* 540 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93561,7 +92909,7 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(87); +var List = __webpack_require__(86); var PluginManager = __webpack_require__(11); var StableSort = __webpack_require__(264); @@ -93723,7 +93071,7 @@ module.exports = DisplayList; /***/ }), -/* 541 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93856,7 +93204,7 @@ var UpdateList = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time, delta) + preUpdate: function () { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; @@ -93881,9 +93229,6 @@ var UpdateList = new Class({ { this._list.splice(index, 1); } - - // Pool them? - // gameObject.destroy(); } // Move pending to active @@ -93996,7 +93341,7 @@ module.exports = UpdateList; /***/ }), -/* 542 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94030,7 +93375,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 543 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94149,83 +93494,83 @@ var ParseRetroFont = function (scene, config) * @constant * @type {string} */ -ParseRetroFont.TEXT_SET1 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; +ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; /** * Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET2 = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; +ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '; /** * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"; +ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789'; /** * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET5 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789"; +ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789'; /** * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' * @constant * @type {string} */ -ParseRetroFont.TEXT_SET6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' "; +ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' '; /** * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET7 = "AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39"; +ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39'; /** * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET8 = "0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?! * @constant * @type {string} */ -ParseRetroFont.TEXT_SET9 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!"; +ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!'; /** * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ * @constant * @type {string} */ -ParseRetroFont.TEXT_SET10 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; /** * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789 * @constant * @type {string} */ -ParseRetroFont.TEXT_SET11 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"; +ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789'; module.exports = ParseRetroFont; /***/ }), -/* 544 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94239,12 +93584,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(545); + renderWebGL = __webpack_require__(547); } if (true) { - renderCanvas = __webpack_require__(546); + renderCanvas = __webpack_require__(548); } module.exports = { @@ -94256,7 +93601,7 @@ module.exports = { /***/ }), -/* 545 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94298,7 +93643,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 546 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94365,7 +93710,6 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, var textureX = textureFrame.cutX; var textureY = textureFrame.cutY; - var rotation = 0; var scale = (src.fontSize / src.fontData.size); // Blend Mode @@ -94391,6 +93735,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, ctx.save(); ctx.translate((src.x - cameraScrollX) + src.frame.x, (src.y - cameraScrollY) + src.frame.y); ctx.rotate(src.rotation); + ctx.translate(-src.displayOriginX, -src.displayOriginY); ctx.scale(src.scaleX, src.scaleY); // ctx.fillStyle = 'rgba(255,0,255,0.5)'; @@ -94447,6 +93792,7 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, ctx.save(); ctx.translate(x, y); ctx.scale(scale, scale); + // ctx.fillRect(0, 0, glyphW, glyphH); ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH); ctx.restore(); @@ -94459,7 +93805,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 547 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94473,12 +93819,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(548); + renderWebGL = __webpack_require__(550); } if (true) { - renderCanvas = __webpack_require__(549); + renderCanvas = __webpack_require__(551); } module.exports = { @@ -94490,7 +93836,7 @@ module.exports = { /***/ }), -/* 548 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94529,7 +93875,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 549 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94565,7 +93911,6 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca renderer.setBlendMode(src.blendMode); - var ca = renderer.currentAlpha; var ctx = renderer.gameContext; var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX; var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY; @@ -94613,7 +93958,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 550 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94958,7 +94303,7 @@ module.exports = Bob; /***/ }), -/* 551 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94972,12 +94317,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(552); + renderWebGL = __webpack_require__(554); } if (true) { - renderCanvas = __webpack_require__(553); + renderCanvas = __webpack_require__(555); } module.exports = { @@ -94989,7 +94334,7 @@ module.exports = { /***/ }), -/* 552 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95031,7 +94376,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 553 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95126,6 +94471,7 @@ var DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPerc ctx.save(); ctx.translate(src.x, src.y); ctx.rotate(src.rotation); + ctx.translate(-src.displayOriginX, -src.displayOriginY); ctx.scale(src.scaleX, src.scaleY); if (src.cropWidth > 0 && src.cropHeight > 0) @@ -95223,7 +94569,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 554 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -95257,7 +94603,7 @@ module.exports = Area; /***/ }), -/* 555 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95287,7 +94633,7 @@ module.exports = Clone; /***/ }), -/* 556 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95318,7 +94664,7 @@ module.exports = ContainsPoint; /***/ }), -/* 557 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95354,7 +94700,7 @@ module.exports = ContainsRect; /***/ }), -/* 558 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -95384,7 +94730,7 @@ module.exports = CopyFrom; /***/ }), -/* 559 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -95419,7 +94765,7 @@ module.exports = Equals; /***/ }), -/* 560 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95457,7 +94803,7 @@ module.exports = GetBounds; /***/ }), -/* 561 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -95490,7 +94836,7 @@ module.exports = Offset; /***/ }), -/* 562 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -95522,7 +94868,7 @@ module.exports = OffsetPoint; /***/ }), -/* 563 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95536,7 +94882,7 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(564); + renderWebGL = __webpack_require__(566); // Needed for Graphics.generateTexture renderCanvas = __webpack_require__(271); @@ -95556,7 +94902,7 @@ module.exports = { /***/ }), -/* 564 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95595,7 +94941,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 565 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95609,12 +94955,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(566); + renderWebGL = __webpack_require__(568); } if (true) { - renderCanvas = __webpack_require__(567); + renderCanvas = __webpack_require__(569); } module.exports = { @@ -95626,7 +94972,7 @@ module.exports = { /***/ }), -/* 566 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95665,7 +95011,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 567 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95704,7 +95050,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 568 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95845,7 +95191,7 @@ var GravityWell = new Class({ * @param {number} delta - The delta time in ms. * @param {float} step - The delta value divided by 1000. */ - update: function (particle, delta, step) + update: function (particle, delta) { var x = this.x - particle.x; var y = this.y - particle.y; @@ -95919,7 +95265,7 @@ module.exports = GravityWell; /***/ }), -/* 569 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95928,23 +95274,22 @@ module.exports = GravityWell; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlendModes = __webpack_require__(46); +var BlendModes = __webpack_require__(45); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(570); -var EdgeZone = __webpack_require__(571); -var EmitterOp = __webpack_require__(572); +var DeathZone = __webpack_require__(572); +var EdgeZone = __webpack_require__(573); +var EmitterOp = __webpack_require__(574); var GetFastValue = __webpack_require__(1); var GetRandomElement = __webpack_require__(138); -var GetValue = __webpack_require__(4); var HasAny = __webpack_require__(286); var HasValue = __webpack_require__(72); -var Particle = __webpack_require__(606); -var RandomZone = __webpack_require__(607); +var Particle = __webpack_require__(608); +var RandomZone = __webpack_require__(609); var Rectangle = __webpack_require__(8); var StableSort = __webpack_require__(264); var Vector2 = __webpack_require__(6); -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); /** * @classdesc @@ -96866,7 +96211,7 @@ var ParticleEmitter = new Class({ if (this._frameCounter === this.frameQuantity) { this._frameCounter = 0; - this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); + this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); } return frame; @@ -96910,7 +96255,8 @@ var ParticleEmitter = new Class({ else if (t === 'object') { var frameConfig = frames; - var frames = GetFastValue(frameConfig, 'frames', null); + + frames = GetFastValue(frameConfig, 'frames', null); if (frames) { @@ -96992,10 +96338,10 @@ var ParticleEmitter = new Class({ { var obj = x; - var x = obj.x; - var y = obj.y; - var width = (HasValue(obj, 'w')) ? obj.w : obj.width; - var height = (HasValue(obj, 'h')) ? obj.h : obj.height; + x = obj.x; + y = obj.y; + width = (HasValue(obj, 'w')) ? obj.w : obj.width; + height = (HasValue(obj, 'h')) ? obj.h : obj.height; } if (this.bounds) @@ -97900,7 +97246,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 570 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97978,7 +97324,7 @@ module.exports = DeathZone; /***/ }), -/* 571 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97988,7 +97334,6 @@ module.exports = DeathZone; */ var Class = __webpack_require__(0); -var Wrap = __webpack_require__(42); /** * @classdesc @@ -98218,7 +97563,7 @@ module.exports = EdgeZone; /***/ }), -/* 572 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98231,7 +97576,7 @@ var Class = __webpack_require__(0); var FloatBetween = __webpack_require__(273); var GetEaseFunction = __webpack_require__(71); var GetFastValue = __webpack_require__(1); -var Wrap = __webpack_require__(42); +var Wrap = __webpack_require__(50); /** * @classdesc @@ -98761,11 +98106,10 @@ var EmitterOp = new Class({ * @param {Phaser.GameObjects.Particles.Particle} particle - [description] * @param {string} key - [description] * @param {float} t - The T value (between 0 and 1) - * @param {number} value - [description] * * @return {number} [description] */ - easeValueUpdate: function (particle, key, t, value) + easeValueUpdate: function (particle, key, t) { var data = particle.data[key]; @@ -98778,7 +98122,7 @@ module.exports = EmitterOp; /***/ }), -/* 573 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98859,7 +98203,7 @@ module.exports = { /***/ }), -/* 574 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -98890,7 +98234,7 @@ module.exports = In; /***/ }), -/* 575 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -98921,7 +98265,7 @@ module.exports = Out; /***/ }), -/* 576 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -98961,7 +98305,7 @@ module.exports = InOut; /***/ }), -/* 577 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -99006,7 +98350,7 @@ module.exports = In; /***/ }), -/* 578 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -99049,7 +98393,7 @@ module.exports = Out; /***/ }), -/* 579 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -99113,7 +98457,7 @@ module.exports = InOut; /***/ }), -/* 580 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -99141,7 +98485,7 @@ module.exports = In; /***/ }), -/* 581 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -99169,7 +98513,7 @@ module.exports = Out; /***/ }), -/* 582 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -99204,7 +98548,7 @@ module.exports = InOut; /***/ }), -/* 583 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -99232,7 +98576,7 @@ module.exports = In; /***/ }), -/* 584 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -99260,7 +98604,7 @@ module.exports = Out; /***/ }), -/* 585 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -99295,7 +98639,7 @@ module.exports = InOut; /***/ }), -/* 586 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -99350,7 +98694,7 @@ module.exports = In; /***/ }), -/* 587 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -99405,7 +98749,7 @@ module.exports = Out; /***/ }), -/* 588 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -99467,7 +98811,7 @@ module.exports = InOut; /***/ }), -/* 589 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -99495,7 +98839,7 @@ module.exports = In; /***/ }), -/* 590 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -99523,7 +98867,7 @@ module.exports = Out; /***/ }), -/* 591 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -99558,7 +98902,7 @@ module.exports = InOut; /***/ }), -/* 592 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -99586,7 +98930,7 @@ module.exports = Linear; /***/ }), -/* 593 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -99614,7 +98958,7 @@ module.exports = In; /***/ }), -/* 594 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -99642,7 +98986,7 @@ module.exports = Out; /***/ }), -/* 595 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -99677,7 +99021,7 @@ module.exports = InOut; /***/ }), -/* 596 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -99705,7 +99049,7 @@ module.exports = In; /***/ }), -/* 597 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -99733,7 +99077,7 @@ module.exports = Out; /***/ }), -/* 598 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -99768,7 +99112,7 @@ module.exports = InOut; /***/ }), -/* 599 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -99796,7 +99140,7 @@ module.exports = In; /***/ }), -/* 600 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -99824,7 +99168,7 @@ module.exports = Out; /***/ }), -/* 601 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -99859,7 +99203,7 @@ module.exports = InOut; /***/ }), -/* 602 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -99898,7 +99242,7 @@ module.exports = In; /***/ }), -/* 603 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -99937,7 +99281,7 @@ module.exports = Out; /***/ }), -/* 604 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -99976,7 +99320,7 @@ module.exports = InOut; /***/ }), -/* 605 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -100018,7 +99362,7 @@ module.exports = Stepped; /***/ }), -/* 606 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100028,8 +99372,8 @@ module.exports = Stepped; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(36); -var DistanceBetween = __webpack_require__(43); +var DegToRad = __webpack_require__(35); +var DistanceBetween = __webpack_require__(41); /** * @classdesc @@ -100619,7 +99963,7 @@ module.exports = Particle; /***/ }), -/* 607 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100692,7 +100036,7 @@ module.exports = RandomZone; /***/ }), -/* 608 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100706,12 +100050,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(609); + renderWebGL = __webpack_require__(611); } if (true) { - renderCanvas = __webpack_require__(610); + renderCanvas = __webpack_require__(612); } module.exports = { @@ -100723,7 +100067,7 @@ module.exports = { /***/ }), -/* 609 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100764,7 +100108,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 610 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100861,7 +100205,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 611 */ +/* 613 */ /***/ (function(module, exports) { /** @@ -100940,7 +100284,7 @@ module.exports = GetTextSize; /***/ }), -/* 612 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100954,12 +100298,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(613); + renderWebGL = __webpack_require__(615); } if (true) { - renderCanvas = __webpack_require__(614); + renderCanvas = __webpack_require__(616); } module.exports = { @@ -100971,7 +100315,7 @@ module.exports = { /***/ }), -/* 613 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101016,7 +100360,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 614 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101049,7 +100393,8 @@ var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camer } var ctx = renderer.currentContext; - var resolution = src.resolution; + + // var resolution = src.resolution; // Blend Mode if (renderer.currentBlendMode !== src.blendMode) @@ -101074,7 +100419,8 @@ var TextCanvasRenderer = function (renderer, src, interpolationPercentage, camer var canvas = src.canvas; ctx.save(); - //ctx.scale(1.0 / resolution, 1.0 / resolution); + + // ctx.scale(1.0 / resolution, 1.0 / resolution); ctx.translate(src.x - camera.scrollX * src.scrollFactorX, src.y - camera.scrollY * src.scrollFactorY); ctx.rotate(src.rotation); ctx.scale(src.scaleX, src.scaleY); @@ -101088,7 +100434,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 615 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101100,7 +100446,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var MeasureText = __webpack_require__(616); +var MeasureText = __webpack_require__(618); // Key: [ Object Key, Default Value ] @@ -102003,7 +101349,7 @@ module.exports = TextStyle; /***/ }), -/* 616 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102132,7 +101478,7 @@ module.exports = MeasureText; /***/ }), -/* 617 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102146,12 +101492,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(618); + renderWebGL = __webpack_require__(620); } if (true) { - renderCanvas = __webpack_require__(619); + renderCanvas = __webpack_require__(621); } module.exports = { @@ -102163,7 +101509,7 @@ module.exports = { /***/ }), -/* 618 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102204,7 +101550,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 619 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102278,7 +101624,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 620 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102320,7 +101666,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 621 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102363,7 +101709,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 622 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102402,7 +101748,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 623 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102448,7 +101794,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 624 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102490,7 +101836,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 625 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102536,7 +101882,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 626 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102584,7 +101930,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 627 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102632,7 +101978,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) /***/ }), -/* 628 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102642,7 +101988,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) */ var GameObjectFactory = __webpack_require__(9); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -102679,7 +102025,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 629 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102722,7 +102068,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) /***/ }), -/* 630 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102764,7 +102110,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 631 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102808,7 +102154,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 632 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102850,7 +102196,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 633 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102892,7 +102238,7 @@ GameObjectCreator.register('blitter', function (config) /***/ }), -/* 634 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102936,7 +102282,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) /***/ }), -/* 635 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102969,7 +102315,7 @@ GameObjectCreator.register('graphics', function (config) /***/ }), -/* 636 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103002,7 +102348,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 637 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103044,7 +102390,7 @@ GameObjectCreator.register('image', function (config) /***/ }), -/* 638 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103101,7 +102447,7 @@ GameObjectCreator.register('particles', function (config) /***/ }), -/* 639 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103150,7 +102496,7 @@ GameObjectCreator.register('sprite3D', function (config) /***/ }), -/* 640 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103163,7 +102509,7 @@ var BuildGameObject = __webpack_require__(21); var BuildGameObjectAnimation = __webpack_require__(289); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * Creates a new Sprite Game Object and returns it. @@ -103199,7 +102545,7 @@ GameObjectCreator.register('sprite', function (config) /***/ }), -/* 641 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103231,6 +102577,7 @@ GameObjectCreator.register('bitmapText', function (config) var font = GetValue(config, 'font', ''); var text = GetAdvancedValue(config, 'text', ''); var size = GetAdvancedValue(config, 'size', false); + // var align = GetValue(config, 'align', 'left'); var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size); @@ -103244,7 +102591,7 @@ GameObjectCreator.register('bitmapText', function (config) /***/ }), -/* 642 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103323,7 +102670,7 @@ GameObjectCreator.register('text', function (config) /***/ }), -/* 643 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103369,7 +102716,7 @@ GameObjectCreator.register('tileSprite', function (config) /***/ }), -/* 644 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103408,7 +102755,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 645 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103422,12 +102769,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(646); + renderWebGL = __webpack_require__(648); } if (true) { - renderCanvas = __webpack_require__(647); + renderCanvas = __webpack_require__(649); } module.exports = { @@ -103439,7 +102786,7 @@ module.exports = { /***/ }), -/* 646 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103478,7 +102825,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 647 */ +/* 649 */ /***/ (function(module, exports) { /** @@ -103499,7 +102846,7 @@ module.exports = MeshWebGLRenderer; * @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 (renderer, src, interpolationPercentage, camera) +var MeshCanvasRenderer = function () { }; @@ -103507,7 +102854,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 648 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103516,7 +102863,7 @@ module.exports = MeshCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Mesh = __webpack_require__(89); +var Mesh = __webpack_require__(88); var GameObjectFactory = __webpack_require__(9); /** @@ -103543,7 +102890,7 @@ if (true) { GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame) { - return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, key, frame)); + return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame)); }); } @@ -103557,7 +102904,7 @@ if (true) /***/ }), -/* 649 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103603,7 +102950,7 @@ if (true) /***/ }), -/* 650 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103616,7 +102963,7 @@ var BuildGameObject = __webpack_require__(21); var GameObjectCreator = __webpack_require__(14); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var Mesh = __webpack_require__(89); +var Mesh = __webpack_require__(88); /** * Creates a new Mesh Game Object and returns it. @@ -103650,7 +102997,7 @@ GameObjectCreator.register('mesh', function (config) /***/ }), -/* 651 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103694,7 +103041,7 @@ GameObjectCreator.register('quad', function (config) /***/ }), -/* 652 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103789,7 +103136,7 @@ module.exports = LightsPlugin; /***/ }), -/* 653 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103800,27 +103147,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(63); -Circle.Area = __webpack_require__(654); +Circle.Area = __webpack_require__(656); Circle.Circumference = __webpack_require__(181); -Circle.CircumferencePoint = __webpack_require__(105); -Circle.Clone = __webpack_require__(655); +Circle.CircumferencePoint = __webpack_require__(104); +Circle.Clone = __webpack_require__(657); Circle.Contains = __webpack_require__(32); -Circle.ContainsPoint = __webpack_require__(656); -Circle.ContainsRect = __webpack_require__(657); -Circle.CopyFrom = __webpack_require__(658); -Circle.Equals = __webpack_require__(659); -Circle.GetBounds = __webpack_require__(660); +Circle.ContainsPoint = __webpack_require__(658); +Circle.ContainsRect = __webpack_require__(659); +Circle.CopyFrom = __webpack_require__(660); +Circle.Equals = __webpack_require__(661); +Circle.GetBounds = __webpack_require__(662); Circle.GetPoint = __webpack_require__(179); Circle.GetPoints = __webpack_require__(180); -Circle.Offset = __webpack_require__(661); -Circle.OffsetPoint = __webpack_require__(662); -Circle.Random = __webpack_require__(106); +Circle.Offset = __webpack_require__(663); +Circle.OffsetPoint = __webpack_require__(664); +Circle.Random = __webpack_require__(105); module.exports = Circle; /***/ }), -/* 654 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -103848,7 +103195,7 @@ module.exports = Area; /***/ }), -/* 655 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103878,7 +103225,7 @@ module.exports = Clone; /***/ }), -/* 656 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103909,7 +103256,7 @@ module.exports = ContainsPoint; /***/ }), -/* 657 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103945,7 +103292,7 @@ module.exports = ContainsRect; /***/ }), -/* 658 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -103975,7 +103322,7 @@ module.exports = CopyFrom; /***/ }), -/* 659 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -104009,7 +103356,7 @@ module.exports = Equals; /***/ }), -/* 660 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104047,7 +103394,7 @@ module.exports = GetBounds; /***/ }), -/* 661 */ +/* 663 */ /***/ (function(module, exports) { /** @@ -104080,7 +103427,7 @@ module.exports = Offset; /***/ }), -/* 662 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -104112,7 +103459,7 @@ module.exports = OffsetPoint; /***/ }), -/* 663 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104121,7 +103468,7 @@ module.exports = OffsetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var DistanceBetween = __webpack_require__(43); +var DistanceBetween = __webpack_require__(41); /** * [description] @@ -104143,7 +103490,7 @@ module.exports = CircleToCircle; /***/ }), -/* 664 */ +/* 666 */ /***/ (function(module, exports) { /** @@ -104197,7 +103544,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 665 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104240,7 +103587,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 666 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -104341,7 +103688,7 @@ module.exports = LineToRectangle; /***/ }), -/* 667 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104382,7 +103729,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 668 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104391,7 +103738,7 @@ module.exports = PointToLineSegment; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToLine = __webpack_require__(90); +var LineToLine = __webpack_require__(89); var Contains = __webpack_require__(33); var ContainsArray = __webpack_require__(142); var Decompose = __webpack_require__(297); @@ -104475,7 +103822,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 669 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -104515,7 +103862,7 @@ module.exports = RectangleToValues; /***/ }), -/* 670 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104540,7 +103887,7 @@ var Contains = __webpack_require__(53); */ var TriangleToCircle = function (triangle, circle) { - // First the cheapest ones: + // First the cheapest ones: if ( triangle.left > circle.right || @@ -104578,7 +103925,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 671 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104588,7 +103935,7 @@ module.exports = TriangleToCircle; */ var Contains = __webpack_require__(53); -var LineToLine = __webpack_require__(90); +var LineToLine = __webpack_require__(89); /** * [description] @@ -104632,7 +103979,7 @@ module.exports = TriangleToLine; /***/ }), -/* 672 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104643,7 +103990,7 @@ module.exports = TriangleToLine; var ContainsArray = __webpack_require__(142); var Decompose = __webpack_require__(298); -var LineToLine = __webpack_require__(90); +var LineToLine = __webpack_require__(89); /** * [description] @@ -104720,7 +104067,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 673 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104733,35 +104080,35 @@ var Line = __webpack_require__(299); Line.Angle = __webpack_require__(54); Line.BresenhamPoints = __webpack_require__(189); -Line.CenterOn = __webpack_require__(674); -Line.Clone = __webpack_require__(675); -Line.CopyFrom = __webpack_require__(676); -Line.Equals = __webpack_require__(677); -Line.GetMidPoint = __webpack_require__(678); -Line.GetNormal = __webpack_require__(679); +Line.CenterOn = __webpack_require__(676); +Line.Clone = __webpack_require__(677); +Line.CopyFrom = __webpack_require__(678); +Line.Equals = __webpack_require__(679); +Line.GetMidPoint = __webpack_require__(680); +Line.GetNormal = __webpack_require__(681); Line.GetPoint = __webpack_require__(300); -Line.GetPoints = __webpack_require__(109); -Line.Height = __webpack_require__(680); +Line.GetPoints = __webpack_require__(108); +Line.Height = __webpack_require__(682); Line.Length = __webpack_require__(65); Line.NormalAngle = __webpack_require__(301); -Line.NormalX = __webpack_require__(681); -Line.NormalY = __webpack_require__(682); -Line.Offset = __webpack_require__(683); -Line.PerpSlope = __webpack_require__(684); -Line.Random = __webpack_require__(111); -Line.ReflectAngle = __webpack_require__(685); -Line.Rotate = __webpack_require__(686); -Line.RotateAroundPoint = __webpack_require__(687); +Line.NormalX = __webpack_require__(683); +Line.NormalY = __webpack_require__(684); +Line.Offset = __webpack_require__(685); +Line.PerpSlope = __webpack_require__(686); +Line.Random = __webpack_require__(110); +Line.ReflectAngle = __webpack_require__(687); +Line.Rotate = __webpack_require__(688); +Line.RotateAroundPoint = __webpack_require__(689); Line.RotateAroundXY = __webpack_require__(143); -Line.SetToAngle = __webpack_require__(688); -Line.Slope = __webpack_require__(689); -Line.Width = __webpack_require__(690); +Line.SetToAngle = __webpack_require__(690); +Line.Slope = __webpack_require__(691); +Line.Width = __webpack_require__(692); module.exports = Line; /***/ }), -/* 674 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -104801,7 +104148,7 @@ module.exports = CenterOn; /***/ }), -/* 675 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104831,7 +104178,7 @@ module.exports = Clone; /***/ }), -/* 676 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -104860,7 +104207,7 @@ module.exports = CopyFrom; /***/ }), -/* 677 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -104894,7 +104241,7 @@ module.exports = Equals; /***/ }), -/* 678 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104930,7 +104277,7 @@ module.exports = GetMidPoint; /***/ }), -/* 679 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104970,7 +104317,7 @@ module.exports = GetNormal; /***/ }), -/* 680 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -104998,7 +104345,7 @@ module.exports = Height; /***/ }), -/* 681 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105029,7 +104376,7 @@ module.exports = NormalX; /***/ }), -/* 682 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105060,7 +104407,7 @@ module.exports = NormalY; /***/ }), -/* 683 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -105096,7 +104443,7 @@ module.exports = Offset; /***/ }), -/* 684 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -105124,7 +104471,7 @@ module.exports = PerpSlope; /***/ }), -/* 685 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105160,7 +104507,7 @@ module.exports = ReflectAngle; /***/ }), -/* 686 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105194,7 +104541,7 @@ module.exports = Rotate; /***/ }), -/* 687 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105226,7 +104573,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 688 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -105264,7 +104611,7 @@ module.exports = SetToAngle; /***/ }), -/* 689 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -105292,7 +104639,7 @@ module.exports = Slope; /***/ }), -/* 690 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -105320,7 +104667,7 @@ module.exports = Width; /***/ }), -/* 691 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105331,27 +104678,27 @@ module.exports = Width; var Point = __webpack_require__(5); -Point.Ceil = __webpack_require__(692); -Point.Clone = __webpack_require__(693); -Point.CopyFrom = __webpack_require__(694); -Point.Equals = __webpack_require__(695); -Point.Floor = __webpack_require__(696); -Point.GetCentroid = __webpack_require__(697); +Point.Ceil = __webpack_require__(694); +Point.Clone = __webpack_require__(695); +Point.CopyFrom = __webpack_require__(696); +Point.Equals = __webpack_require__(697); +Point.Floor = __webpack_require__(698); +Point.GetCentroid = __webpack_require__(699); Point.GetMagnitude = __webpack_require__(302); Point.GetMagnitudeSq = __webpack_require__(303); -Point.GetRectangleFromPoints = __webpack_require__(698); -Point.Interpolate = __webpack_require__(699); -Point.Invert = __webpack_require__(700); -Point.Negative = __webpack_require__(701); -Point.Project = __webpack_require__(702); -Point.ProjectUnit = __webpack_require__(703); -Point.SetMagnitude = __webpack_require__(704); +Point.GetRectangleFromPoints = __webpack_require__(700); +Point.Interpolate = __webpack_require__(701); +Point.Invert = __webpack_require__(702); +Point.Negative = __webpack_require__(703); +Point.Project = __webpack_require__(704); +Point.ProjectUnit = __webpack_require__(705); +Point.SetMagnitude = __webpack_require__(706); module.exports = Point; /***/ }), -/* 692 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -105379,7 +104726,7 @@ module.exports = Ceil; /***/ }), -/* 693 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105409,7 +104756,7 @@ module.exports = Clone; /***/ }), -/* 694 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -105438,7 +104785,7 @@ module.exports = CopyFrom; /***/ }), -/* 695 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -105467,7 +104814,7 @@ module.exports = Equals; /***/ }), -/* 696 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -105495,7 +104842,7 @@ module.exports = Floor; /***/ }), -/* 697 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105556,7 +104903,7 @@ module.exports = GetCentroid; /***/ }), -/* 698 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105624,7 +104971,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 699 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105663,7 +105010,7 @@ module.exports = Interpolate; /***/ }), -/* 700 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -105691,7 +105038,7 @@ module.exports = Invert; /***/ }), -/* 701 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105724,7 +105071,7 @@ module.exports = Negative; /***/ }), -/* 702 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105768,7 +105115,7 @@ module.exports = Project; /***/ }), -/* 703 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105810,7 +105157,7 @@ module.exports = ProjectUnit; /***/ }), -/* 704 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105852,7 +105199,7 @@ module.exports = SetMagnitude; /***/ }), -/* 705 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105863,17 +105210,17 @@ module.exports = SetMagnitude; var Polygon = __webpack_require__(304); -Polygon.Clone = __webpack_require__(706); +Polygon.Clone = __webpack_require__(708); Polygon.Contains = __webpack_require__(144); -Polygon.ContainsPoint = __webpack_require__(707); -Polygon.GetAABB = __webpack_require__(708); -Polygon.GetNumberArray = __webpack_require__(709); +Polygon.ContainsPoint = __webpack_require__(709); +Polygon.GetAABB = __webpack_require__(710); +Polygon.GetNumberArray = __webpack_require__(711); module.exports = Polygon; /***/ }), -/* 706 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105903,7 +105250,7 @@ module.exports = Clone; /***/ }), -/* 707 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105934,7 +105281,7 @@ module.exports = ContainsPoint; /***/ }), -/* 708 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105988,7 +105335,7 @@ module.exports = GetAABB; /***/ }), -/* 709 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -106027,7 +105374,7 @@ module.exports = GetNumberArray; /***/ }), -/* 710 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -106055,7 +105402,7 @@ module.exports = Area; /***/ }), -/* 711 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -106086,7 +105433,7 @@ module.exports = Ceil; /***/ }), -/* 712 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -106119,7 +105466,7 @@ module.exports = CeilAll; /***/ }), -/* 713 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106149,7 +105496,7 @@ module.exports = Clone; /***/ }), -/* 714 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106180,7 +105527,7 @@ module.exports = ContainsPoint; /***/ }), -/* 715 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -106213,7 +105560,7 @@ var ContainsRect = function (rectA, rectB) return ( (rectB.x > rectA.x && rectB.x < rectA.right) && (rectB.right > rectA.x && rectB.right < rectA.right) && - (rectB.y > rectA.y && rectB.y < rectA.bottom) && + (rectB.y > rectA.y && rectB.y < rectA.bottom) && (rectB.bottom > rectA.y && rectB.bottom < rectA.bottom) ); }; @@ -106222,7 +105569,7 @@ module.exports = ContainsRect; /***/ }), -/* 716 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -106251,7 +105598,7 @@ module.exports = CopyFrom; /***/ }), -/* 717 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -106285,7 +105632,7 @@ module.exports = Equals; /***/ }), -/* 718 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106336,7 +105683,7 @@ module.exports = FitInside; /***/ }), -/* 719 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106387,7 +105734,7 @@ module.exports = FitOutside; /***/ }), -/* 720 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -106418,7 +105765,7 @@ module.exports = Floor; /***/ }), -/* 721 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -106451,7 +105798,7 @@ module.exports = FloorAll; /***/ }), -/* 722 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106489,7 +105836,7 @@ module.exports = GetCenter; /***/ }), -/* 723 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106528,7 +105875,7 @@ module.exports = GetSize; /***/ }), -/* 724 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106569,7 +105916,7 @@ module.exports = Inflate; /***/ }), -/* 725 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -106619,7 +105966,7 @@ module.exports = MergePoints; /***/ }), -/* 726 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -106663,7 +106010,7 @@ module.exports = MergeRect; /***/ }), -/* 727 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -106705,7 +106052,7 @@ module.exports = MergeXY; /***/ }), -/* 728 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -106738,7 +106085,7 @@ module.exports = Offset; /***/ }), -/* 729 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -106770,7 +106117,7 @@ module.exports = OffsetPoint; /***/ }), -/* 730 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -106793,9 +106140,9 @@ module.exports = OffsetPoint; var Overlaps = function (rectA, rectB) { return ( - rectA.x < rectB.right && - rectA.right > rectB.x && - rectA.y < rectB.bottom && + rectA.x < rectB.right && + rectA.right > rectB.x && + rectA.y < rectB.bottom && rectA.bottom > rectB.y ); }; @@ -106804,7 +106151,7 @@ module.exports = Overlaps; /***/ }), -/* 731 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106814,7 +106161,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(5); -var DegToRad = __webpack_require__(36); +var DegToRad = __webpack_require__(35); /** * [description] @@ -106859,7 +106206,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 732 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -106896,7 +106243,7 @@ module.exports = Scale; /***/ }), -/* 733 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106938,7 +106285,7 @@ module.exports = Union; /***/ }), -/* 734 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106949,36 +106296,36 @@ module.exports = Union; var Triangle = __webpack_require__(55); -Triangle.Area = __webpack_require__(735); -Triangle.BuildEquilateral = __webpack_require__(736); -Triangle.BuildFromPolygon = __webpack_require__(737); -Triangle.BuildRight = __webpack_require__(738); -Triangle.CenterOn = __webpack_require__(739); +Triangle.Area = __webpack_require__(737); +Triangle.BuildEquilateral = __webpack_require__(738); +Triangle.BuildFromPolygon = __webpack_require__(739); +Triangle.BuildRight = __webpack_require__(740); +Triangle.CenterOn = __webpack_require__(741); Triangle.Centroid = __webpack_require__(309); -Triangle.CircumCenter = __webpack_require__(740); -Triangle.CircumCircle = __webpack_require__(741); -Triangle.Clone = __webpack_require__(742); +Triangle.CircumCenter = __webpack_require__(742); +Triangle.CircumCircle = __webpack_require__(743); +Triangle.Clone = __webpack_require__(744); Triangle.Contains = __webpack_require__(53); Triangle.ContainsArray = __webpack_require__(142); -Triangle.ContainsPoint = __webpack_require__(743); -Triangle.CopyFrom = __webpack_require__(744); +Triangle.ContainsPoint = __webpack_require__(745); +Triangle.CopyFrom = __webpack_require__(746); Triangle.Decompose = __webpack_require__(298); -Triangle.Equals = __webpack_require__(745); +Triangle.Equals = __webpack_require__(747); Triangle.GetPoint = __webpack_require__(307); Triangle.GetPoints = __webpack_require__(308); Triangle.InCenter = __webpack_require__(311); -Triangle.Perimeter = __webpack_require__(746); +Triangle.Perimeter = __webpack_require__(748); Triangle.Offset = __webpack_require__(310); -Triangle.Random = __webpack_require__(112); -Triangle.Rotate = __webpack_require__(747); -Triangle.RotateAroundPoint = __webpack_require__(748); +Triangle.Random = __webpack_require__(111); +Triangle.Rotate = __webpack_require__(749); +Triangle.RotateAroundPoint = __webpack_require__(750); Triangle.RotateAroundXY = __webpack_require__(146); module.exports = Triangle; /***/ }), -/* 735 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -107017,7 +106364,7 @@ module.exports = Area; /***/ }), -/* 736 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107067,7 +106414,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 737 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107140,7 +106487,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 738 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107170,7 +106517,7 @@ var Triangle = __webpack_require__(55); */ var BuildRight = function (x, y, width, height) { - if (height === undefined) { height = width; } + if (height === undefined) { height = width; } // 90 degree angle var x1 = x; @@ -107189,7 +106536,7 @@ module.exports = BuildRight; /***/ }), -/* 739 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107232,7 +106579,7 @@ module.exports = CenterOn; /***/ }), -/* 740 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -107300,7 +106647,7 @@ module.exports = CircumCenter; /***/ }), -/* 741 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107381,7 +106728,7 @@ module.exports = CircumCircle; /***/ }), -/* 742 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107411,7 +106758,7 @@ module.exports = Clone; /***/ }), -/* 743 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107442,7 +106789,7 @@ module.exports = ContainsPoint; /***/ }), -/* 744 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -107471,7 +106818,7 @@ module.exports = CopyFrom; /***/ }), -/* 745 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -107507,7 +106854,7 @@ module.exports = Equals; /***/ }), -/* 746 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107543,7 +106890,7 @@ module.exports = Perimeter; /***/ }), -/* 747 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107577,7 +106924,7 @@ module.exports = Rotate; /***/ }), -/* 748 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107609,7 +106956,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 749 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107624,20 +106971,20 @@ module.exports = RotateAroundPoint; module.exports = { - Gamepad: __webpack_require__(750), + Gamepad: __webpack_require__(752), InputManager: __webpack_require__(237), - InputPlugin: __webpack_require__(755), + InputPlugin: __webpack_require__(757), InteractiveObject: __webpack_require__(312), - Keyboard: __webpack_require__(756), - Mouse: __webpack_require__(761), + Keyboard: __webpack_require__(758), + Mouse: __webpack_require__(763), Pointer: __webpack_require__(246), - Touch: __webpack_require__(762) + Touch: __webpack_require__(764) }; /***/ }), -/* 750 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107657,12 +107004,12 @@ module.exports = { Gamepad: __webpack_require__(239), GamepadManager: __webpack_require__(238), - Configs: __webpack_require__(751) + Configs: __webpack_require__(753) }; /***/ }), -/* 751 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107677,15 +107024,15 @@ module.exports = { module.exports = { - DUALSHOCK_4: __webpack_require__(752), - SNES_USB: __webpack_require__(753), - XBOX_360: __webpack_require__(754) + DUALSHOCK_4: __webpack_require__(754), + SNES_USB: __webpack_require__(755), + XBOX_360: __webpack_require__(756) }; /***/ }), -/* 752 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -107736,7 +107083,7 @@ module.exports = { /***/ }), -/* 753 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -107776,7 +107123,7 @@ module.exports = { /***/ }), -/* 754 */ +/* 756 */ /***/ (function(module, exports) { /** @@ -107826,8 +107173,9 @@ module.exports = { }; + /***/ }), -/* 755 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107839,7 +107187,7 @@ module.exports = { var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); -var DistanceBetween = __webpack_require__(43); +var DistanceBetween = __webpack_require__(41); var Ellipse = __webpack_require__(135); var EllipseContains = __webpack_require__(68); var EventEmitter = __webpack_require__(13); @@ -109409,7 +108757,7 @@ module.exports = InputPlugin; /***/ }), -/* 756 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109431,16 +108779,16 @@ module.exports = { KeyCombo: __webpack_require__(244), - JustDown: __webpack_require__(757), - JustUp: __webpack_require__(758), - DownDuration: __webpack_require__(759), - UpDuration: __webpack_require__(760) + JustDown: __webpack_require__(759), + JustUp: __webpack_require__(760), + DownDuration: __webpack_require__(761), + UpDuration: __webpack_require__(762) }; /***/ }), -/* 757 */ +/* 759 */ /***/ (function(module, exports) { /** @@ -109479,7 +108827,7 @@ module.exports = JustDown; /***/ }), -/* 758 */ +/* 760 */ /***/ (function(module, exports) { /** @@ -109518,7 +108866,7 @@ module.exports = JustUp; /***/ }), -/* 759 */ +/* 761 */ /***/ (function(module, exports) { /** @@ -109550,7 +108898,7 @@ module.exports = DownDuration; /***/ }), -/* 760 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -109582,7 +108930,7 @@ module.exports = UpDuration; /***/ }), -/* 761 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109595,15 +108943,17 @@ module.exports = UpDuration; * @namespace Phaser.Input.Mouse */ +/* eslint-disable */ module.exports = { MouseManager: __webpack_require__(245) }; +/* eslint-enable */ /***/ }), -/* 762 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109616,15 +108966,17 @@ module.exports = { * @namespace Phaser.Input.Touch */ +/* eslint-disable */ module.exports = { TouchManager: __webpack_require__(247) }; +/* eslint-enable */ /***/ }), -/* 763 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109639,21 +108991,21 @@ module.exports = { module.exports = { - FileTypes: __webpack_require__(764), + FileTypes: __webpack_require__(766), File: __webpack_require__(18), FileTypesManager: __webpack_require__(7), GetURL: __webpack_require__(147), - LoaderPlugin: __webpack_require__(780), + LoaderPlugin: __webpack_require__(782), MergeXHRSettings: __webpack_require__(148), XHRLoader: __webpack_require__(313), - XHRSettings: __webpack_require__(91) + XHRSettings: __webpack_require__(90) }; /***/ }), -/* 764 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109691,33 +109043,33 @@ module.exports = { module.exports = { - AnimationJSONFile: __webpack_require__(765), - AtlasJSONFile: __webpack_require__(766), + AnimationJSONFile: __webpack_require__(767), + AtlasJSONFile: __webpack_require__(768), AudioFile: __webpack_require__(314), - AudioSprite: __webpack_require__(767), - BinaryFile: __webpack_require__(768), - BitmapFontFile: __webpack_require__(769), - GLSLFile: __webpack_require__(770), + AudioSprite: __webpack_require__(769), + BinaryFile: __webpack_require__(770), + BitmapFontFile: __webpack_require__(771), + GLSLFile: __webpack_require__(772), HTML5AudioFile: __webpack_require__(315), - HTMLFile: __webpack_require__(771), + HTMLFile: __webpack_require__(773), ImageFile: __webpack_require__(57), JSONFile: __webpack_require__(56), - MultiAtlas: __webpack_require__(772), - PluginFile: __webpack_require__(773), - ScriptFile: __webpack_require__(774), - SpriteSheetFile: __webpack_require__(775), - SVGFile: __webpack_require__(776), + MultiAtlas: __webpack_require__(774), + PluginFile: __webpack_require__(775), + ScriptFile: __webpack_require__(776), + SpriteSheetFile: __webpack_require__(777), + SVGFile: __webpack_require__(778), TextFile: __webpack_require__(318), - TilemapCSVFile: __webpack_require__(777), - TilemapJSONFile: __webpack_require__(778), - UnityAtlasFile: __webpack_require__(779), + TilemapCSVFile: __webpack_require__(779), + TilemapJSONFile: __webpack_require__(780), + UnityAtlasFile: __webpack_require__(781), XMLFile: __webpack_require__(316) }; /***/ }), -/* 765 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109799,7 +109151,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 766 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109877,7 +109229,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 767 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109951,7 +109303,7 @@ FileTypesManager.register('audioSprite', function (key, urls, json, config, audi /***/ }), -/* 768 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110057,7 +109409,7 @@ module.exports = BinaryFile; /***/ }), -/* 769 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110135,7 +109487,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 770 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110241,7 +109593,7 @@ module.exports = GLSLFile; /***/ }), -/* 771 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110405,7 +109757,7 @@ module.exports = HTMLFile; /***/ }), -/* 772 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110494,7 +109846,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t /***/ }), -/* 773 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110610,7 +109962,7 @@ module.exports = PluginFile; /***/ }), -/* 774 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110722,7 +110074,7 @@ module.exports = ScriptFile; /***/ }), -/* 775 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110799,7 +110151,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 776 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110954,7 +110306,7 @@ module.exports = SVGFile; /***/ }), -/* 777 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111061,7 +110413,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 778 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111176,7 +110528,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 779 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111255,7 +110607,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 780 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111272,7 +110624,7 @@ var FileTypesManager = __webpack_require__(7); var GetFastValue = __webpack_require__(1); var ParseXMLBitmapFont = __webpack_require__(266); var PluginManager = __webpack_require__(11); -var XHRSettings = __webpack_require__(91); +var XHRSettings = __webpack_require__(90); /** * @classdesc @@ -112237,7 +111589,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 781 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112256,56 +111608,56 @@ var Extend = __webpack_require__(23); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(782), - Distance: __webpack_require__(790), - Easing: __webpack_require__(793), - Fuzzy: __webpack_require__(794), - Interpolation: __webpack_require__(800), - Pow2: __webpack_require__(803), - Snap: __webpack_require__(805), + Angle: __webpack_require__(784), + Distance: __webpack_require__(792), + Easing: __webpack_require__(795), + Fuzzy: __webpack_require__(796), + Interpolation: __webpack_require__(802), + Pow2: __webpack_require__(805), + Snap: __webpack_require__(807), // Single functions - Average: __webpack_require__(809), + Average: __webpack_require__(811), Bernstein: __webpack_require__(320), Between: __webpack_require__(226), - CatmullRom: __webpack_require__(123), - CeilTo: __webpack_require__(810), + CatmullRom: __webpack_require__(122), + CeilTo: __webpack_require__(812), Clamp: __webpack_require__(60), - DegToRad: __webpack_require__(36), - Difference: __webpack_require__(811), + DegToRad: __webpack_require__(35), + Difference: __webpack_require__(813), Factorial: __webpack_require__(321), FloatBetween: __webpack_require__(273), - FloorTo: __webpack_require__(812), + FloorTo: __webpack_require__(814), FromPercent: __webpack_require__(64), - GetSpeed: __webpack_require__(813), - IsEven: __webpack_require__(814), - IsEvenStrict: __webpack_require__(815), + GetSpeed: __webpack_require__(815), + IsEven: __webpack_require__(816), + IsEvenStrict: __webpack_require__(817), Linear: __webpack_require__(225), - MaxAdd: __webpack_require__(816), - MinSub: __webpack_require__(817), - Percent: __webpack_require__(818), + MaxAdd: __webpack_require__(818), + MinSub: __webpack_require__(819), + Percent: __webpack_require__(820), RadToDeg: __webpack_require__(216), - RandomXY: __webpack_require__(819), + RandomXY: __webpack_require__(821), RandomXYZ: __webpack_require__(204), RandomXYZW: __webpack_require__(205), Rotate: __webpack_require__(322), RotateAround: __webpack_require__(183), - RotateAroundDistance: __webpack_require__(113), + RotateAroundDistance: __webpack_require__(112), RoundAwayFromZero: __webpack_require__(323), - RoundTo: __webpack_require__(820), - SinCosTableGenerator: __webpack_require__(821), + RoundTo: __webpack_require__(822), + SinCosTableGenerator: __webpack_require__(823), SmootherStep: __webpack_require__(190), SmoothStep: __webpack_require__(191), TransformXY: __webpack_require__(248), - Within: __webpack_require__(822), - Wrap: __webpack_require__(42), + Within: __webpack_require__(824), + Wrap: __webpack_require__(50), // Vector classes Vector2: __webpack_require__(6), Vector3: __webpack_require__(51), - Vector4: __webpack_require__(120), + Vector4: __webpack_require__(119), Matrix3: __webpack_require__(208), - Matrix4: __webpack_require__(119), + Matrix4: __webpack_require__(118), Quaternion: __webpack_require__(207), RotateVec3: __webpack_require__(206) @@ -112321,7 +111673,7 @@ module.exports = PhaserMath; /***/ }), -/* 782 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112336,13 +111688,13 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(783), - BetweenY: __webpack_require__(784), - BetweenPoints: __webpack_require__(785), - BetweenPointsY: __webpack_require__(786), - Reverse: __webpack_require__(787), - RotateTo: __webpack_require__(788), - ShortestBetween: __webpack_require__(789), + Between: __webpack_require__(785), + BetweenY: __webpack_require__(786), + BetweenPoints: __webpack_require__(787), + BetweenPointsY: __webpack_require__(788), + Reverse: __webpack_require__(789), + RotateTo: __webpack_require__(790), + ShortestBetween: __webpack_require__(791), Normalize: __webpack_require__(319), Wrap: __webpack_require__(160), WrapDegrees: __webpack_require__(161) @@ -112351,7 +111703,7 @@ module.exports = { /***/ }), -/* 783 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -112382,7 +111734,7 @@ module.exports = Between; /***/ }), -/* 784 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -112413,7 +111765,7 @@ module.exports = BetweenY; /***/ }), -/* 785 */ +/* 787 */ /***/ (function(module, exports) { /** @@ -112442,7 +111794,7 @@ module.exports = BetweenPoints; /***/ }), -/* 786 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -112471,7 +111823,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 787 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112501,7 +111853,7 @@ module.exports = Reverse; /***/ }), -/* 788 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112568,7 +111920,7 @@ module.exports = RotateTo; /***/ }), -/* 789 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -112614,7 +111966,7 @@ module.exports = ShortestBetween; /***/ }), -/* 790 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112629,15 +111981,15 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(43), - Power: __webpack_require__(791), - Squared: __webpack_require__(792) + Between: __webpack_require__(41), + Power: __webpack_require__(793), + Squared: __webpack_require__(794) }; /***/ }), -/* 791 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -112671,7 +112023,7 @@ module.exports = DistancePower; /***/ }), -/* 792 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -112705,7 +112057,7 @@ module.exports = DistanceSquared; /***/ }), -/* 793 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112737,7 +112089,7 @@ module.exports = { /***/ }), -/* 794 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112752,17 +112104,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(795), - Equal: __webpack_require__(796), - Floor: __webpack_require__(797), - GreaterThan: __webpack_require__(798), - LessThan: __webpack_require__(799) + Ceil: __webpack_require__(797), + Equal: __webpack_require__(798), + Floor: __webpack_require__(799), + GreaterThan: __webpack_require__(800), + LessThan: __webpack_require__(801) }; /***/ }), -/* 795 */ +/* 797 */ /***/ (function(module, exports) { /** @@ -112793,7 +112145,7 @@ module.exports = Ceil; /***/ }), -/* 796 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -112825,7 +112177,7 @@ module.exports = Equal; /***/ }), -/* 797 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -112840,13 +112192,12 @@ module.exports = Equal; * @function Phaser.Math.Fuzzy.Floor * @since 3.0.0 * - * @param {number} a - [description] - * @param {number} b - [description] + * @param {number} value - [description] * @param {float} [epsilon=0.0001] - [description] * * @return {number} [description] */ -var Floor = function (a, b, epsilon) +var Floor = function (value, epsilon) { if (epsilon === undefined) { epsilon = 0.0001; } @@ -112857,7 +112208,7 @@ module.exports = Floor; /***/ }), -/* 798 */ +/* 800 */ /***/ (function(module, exports) { /** @@ -112889,7 +112240,7 @@ module.exports = GreaterThan; /***/ }), -/* 799 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -112921,7 +112272,7 @@ module.exports = LessThan; /***/ }), -/* 800 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112936,8 +112287,8 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(801), - CatmullRom: __webpack_require__(802), + Bezier: __webpack_require__(803), + CatmullRom: __webpack_require__(804), CubicBezier: __webpack_require__(214), Linear: __webpack_require__(224) @@ -112945,7 +112296,7 @@ module.exports = { /***/ }), -/* 801 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112984,7 +112335,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 802 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112993,7 +112344,7 @@ module.exports = BezierInterpolation; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CatmullRom = __webpack_require__(123); +var CatmullRom = __webpack_require__(122); /** * [description] @@ -113041,7 +112392,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 803 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113057,14 +112408,14 @@ module.exports = CatmullRomInterpolation; module.exports = { GetNext: __webpack_require__(288), - IsSize: __webpack_require__(126), - IsValue: __webpack_require__(804) + IsSize: __webpack_require__(125), + IsValue: __webpack_require__(806) }; /***/ }), -/* 804 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -113092,7 +112443,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 805 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113107,15 +112458,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(806), - Floor: __webpack_require__(807), - To: __webpack_require__(808) + Ceil: __webpack_require__(808), + Floor: __webpack_require__(809), + To: __webpack_require__(810) }; /***/ }), -/* 806 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -113155,7 +112506,7 @@ module.exports = SnapCeil; /***/ }), -/* 807 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -113195,7 +112546,7 @@ module.exports = SnapFloor; /***/ }), -/* 808 */ +/* 810 */ /***/ (function(module, exports) { /** @@ -113235,7 +112586,7 @@ module.exports = SnapTo; /***/ }), -/* 809 */ +/* 811 */ /***/ (function(module, exports) { /** @@ -113270,7 +112621,7 @@ module.exports = Average; /***/ }), -/* 810 */ +/* 812 */ /***/ (function(module, exports) { /** @@ -113305,7 +112656,7 @@ module.exports = CeilTo; /***/ }), -/* 811 */ +/* 813 */ /***/ (function(module, exports) { /** @@ -113334,7 +112685,7 @@ module.exports = Difference; /***/ }), -/* 812 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -113369,7 +112720,7 @@ module.exports = FloorTo; /***/ }), -/* 813 */ +/* 815 */ /***/ (function(module, exports) { /** @@ -113398,7 +112749,7 @@ module.exports = GetSpeed; /***/ }), -/* 814 */ +/* 816 */ /***/ (function(module, exports) { /** @@ -113420,6 +112771,8 @@ module.exports = GetSpeed; var IsEven = function (value) { // Use abstract equality == for "is number" test + + // eslint-disable-next-line eqeqeq return (value == parseFloat(value)) ? !(value % 2) : void 0; }; @@ -113427,7 +112780,7 @@ module.exports = IsEven; /***/ }), -/* 815 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -113456,7 +112809,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 816 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -113486,7 +112839,7 @@ module.exports = MaxAdd; /***/ }), -/* 817 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -113516,7 +112869,7 @@ module.exports = MinSub; /***/ }), -/* 818 */ +/* 820 */ /***/ (function(module, exports) { /** @@ -113575,7 +112928,7 @@ module.exports = Percent; /***/ }), -/* 819 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -113611,7 +112964,7 @@ module.exports = RandomXY; /***/ }), -/* 820 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -113646,7 +112999,7 @@ module.exports = RoundTo; /***/ }), -/* 821 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -113700,7 +113053,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 822 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -113730,7 +113083,7 @@ module.exports = Within; /***/ }), -/* 823 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113745,14 +113098,14 @@ module.exports = Within; module.exports = { - ArcadePhysics: __webpack_require__(824), + ArcadePhysics: __webpack_require__(826), Body: __webpack_require__(330), Collider: __webpack_require__(331), Factory: __webpack_require__(324), Group: __webpack_require__(327), Image: __webpack_require__(325), - Sprite: __webpack_require__(92), - StaticBody: __webpack_require__(336), + Sprite: __webpack_require__(91), + StaticBody: __webpack_require__(338), StaticGroup: __webpack_require__(328), World: __webpack_require__(329) @@ -113760,7 +113113,7 @@ module.exports = { /***/ }), -/* 824 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113772,11 +113125,11 @@ module.exports = { var Class = __webpack_require__(0); var Factory = __webpack_require__(324); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(104); +var Merge = __webpack_require__(103); var PluginManager = __webpack_require__(11); var World = __webpack_require__(329); -var DistanceBetween = __webpack_require__(43); -var DegToRad = __webpack_require__(36); +var DistanceBetween = __webpack_require__(41); +var DegToRad = __webpack_require__(35); // All methods in this class are available under `this.physics` in a Scene. @@ -114231,7 +113584,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 825 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -114306,7 +113659,7 @@ module.exports = Acceleration; /***/ }), -/* 826 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -114380,7 +113733,7 @@ module.exports = Angular; /***/ }), -/* 827 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -114472,7 +113825,7 @@ module.exports = Bounce; /***/ }), -/* 828 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -114596,7 +113949,7 @@ module.exports = Debug; /***/ }), -/* 829 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -114671,7 +114024,7 @@ module.exports = Drag; /***/ }), -/* 830 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -114781,7 +114134,7 @@ module.exports = Enable; /***/ }), -/* 831 */ +/* 833 */ /***/ (function(module, exports) { /** @@ -114856,7 +114209,7 @@ module.exports = Friction; /***/ }), -/* 832 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -114931,7 +114284,7 @@ module.exports = Gravity; /***/ }), -/* 833 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -114973,7 +114326,7 @@ module.exports = Immovable; /***/ }), -/* 834 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -115013,7 +114366,7 @@ module.exports = Mass; /***/ }), -/* 835 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -115092,7 +114445,7 @@ module.exports = Size; /***/ }), -/* 836 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -115187,7 +114540,7 @@ module.exports = Velocity; /***/ }), -/* 837 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -115228,7 +114581,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 838 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115237,9 +114590,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileCheckX = __webpack_require__(839); -var TileCheckY = __webpack_require__(841); -var TileIntersectsBody = __webpack_require__(335); +var TileCheckX = __webpack_require__(841); +var TileCheckY = __webpack_require__(843); +var TileIntersectsBody = __webpack_require__(337); /** * The core separation function to separate a physics body and a tile. @@ -115341,7 +114694,7 @@ module.exports = SeparateTile; /***/ }), -/* 839 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115350,7 +114703,7 @@ module.exports = SeparateTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(840); +var ProcessTileSeparationX = __webpack_require__(842); /** * Check the body against the given tile on the X axis. @@ -115416,7 +114769,7 @@ module.exports = TileCheckX; /***/ }), -/* 840 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -115461,7 +114814,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 841 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115470,7 +114823,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(842); +var ProcessTileSeparationY = __webpack_require__(844); /** * Check the body against the given tile on the Y axis. @@ -115536,7 +114889,7 @@ module.exports = TileCheckY; /***/ }), -/* 842 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -115581,7 +114934,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 843 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115590,7 +114943,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapX = __webpack_require__(844); +var GetOverlapX = __webpack_require__(332); /** * [description] @@ -115668,86 +115021,7 @@ module.exports = SeparateX; /***/ }), -/* 844 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Arcade.GetOverlapX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - [description] - * @param {Phaser.Physics.Arcade.Body} body2 - [description] - * @param {boolean} overlapOnly - [description] - * @param {number} bias - [description] - * - * @return {number} [description] - */ -var GetOverlapX = function (body1, body2, overlapOnly, bias) -{ - var overlap = 0; - var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; - - if (body1.deltaX() === 0 && body2.deltaX() === 0) - { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; - } - else if (body1.deltaX() > body2.deltaX()) - { - // Body1 is moving right and / or Body2 is moving left - overlap = body1.right - body2.x; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.right = true; - body2.touching.none = false; - body2.touching.left = true; - } - } - else if (body1.deltaX() < body2.deltaX()) - { - // Body1 is moving left and/or Body2 is moving right - overlap = body1.x - body2.width - body2.x; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.left = true; - body2.touching.none = false; - body2.touching.right = true; - } - } - - // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapX = overlap; - body2.overlapX = overlap; - - return overlap; -}; - -module.exports = GetOverlapX; - - -/***/ }), -/* 845 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115756,7 +115030,7 @@ module.exports = GetOverlapX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapY = __webpack_require__(846); +var GetOverlapY = __webpack_require__(333); /** * [description] @@ -115833,85 +115107,6 @@ var SeparateY = function (body1, body2, overlapOnly, bias) module.exports = SeparateY; -/***/ }), -/* 846 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Arcade.GetOverlapY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - [description] - * @param {Phaser.Physics.Arcade.Body} body2 - [description] - * @param {boolean} overlapOnly - [description] - * @param {number} bias - [description] - * - * @return {number} [description] - */ -var GetOverlapY = function (body1, body2, overlapOnly, bias) -{ - var overlap = 0; - var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; - - if (body1.deltaY() === 0 && body2.deltaY() === 0) - { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; - } - else if (body1.deltaY() > body2.deltaY()) - { - // Body1 is moving down and/or Body2 is moving up - overlap = body1.bottom - body2.y; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.down = true; - body2.touching.none = false; - body2.touching.up = true; - } - } - else if (body1.deltaY() < body2.deltaY()) - { - // Body1 is moving up and/or Body2 is moving down - overlap = body1.y - body2.bottom; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.up = true; - body2.touching.none = false; - body2.touching.down = true; - } - } - - // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapY = overlap; - body2.overlapY = overlap; - - return overlap; -}; - -module.exports = GetOverlapY; - - /***/ }), /* 847 */ /***/ (function(module, exports, __webpack_require__) { @@ -115956,8 +115151,8 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(95); -var Common = __webpack_require__(39); +var Vector = __webpack_require__(94); +var Common = __webpack_require__(38); (function() { @@ -116052,13 +115247,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(93); +var Bodies = __webpack_require__(92); var Body = __webpack_require__(59); var Class = __webpack_require__(0); var Components = __webpack_require__(849); var GetFastValue = __webpack_require__(1); var HasValue = __webpack_require__(72); -var Vertices = __webpack_require__(94); +var Vertices = __webpack_require__(93); /** * @classdesc @@ -116386,8 +115581,8 @@ var Detector = {}; module.exports = Detector; var SAT = __webpack_require__(852); -var Pair = __webpack_require__(362); -var Bounds = __webpack_require__(96); +var Pair = __webpack_require__(364); +var Bounds = __webpack_require__(95); (function() { @@ -116498,8 +115693,8 @@ var SAT = {}; module.exports = SAT; -var Vertices = __webpack_require__(94); -var Vector = __webpack_require__(95); +var Vertices = __webpack_require__(93); +var Vector = __webpack_require__(94); (function() { @@ -116777,27 +115972,27 @@ Matter.World = __webpack_require__(855); Matter.Detector = __webpack_require__(851); Matter.Grid = __webpack_require__(942); Matter.Pairs = __webpack_require__(943); -Matter.Pair = __webpack_require__(362); +Matter.Pair = __webpack_require__(364); Matter.Query = __webpack_require__(983); Matter.Resolver = __webpack_require__(944); Matter.SAT = __webpack_require__(852); Matter.Constraint = __webpack_require__(163); -Matter.Common = __webpack_require__(39); +Matter.Common = __webpack_require__(38); Matter.Engine = __webpack_require__(945); Matter.Events = __webpack_require__(162); -Matter.Sleeping = __webpack_require__(339); +Matter.Sleeping = __webpack_require__(341); Matter.Plugin = __webpack_require__(854); -Matter.Bodies = __webpack_require__(93); +Matter.Bodies = __webpack_require__(92); Matter.Composites = __webpack_require__(938); Matter.Axes = __webpack_require__(848); -Matter.Bounds = __webpack_require__(96); +Matter.Bounds = __webpack_require__(95); Matter.Svg = __webpack_require__(985); -Matter.Vector = __webpack_require__(95); -Matter.Vertices = __webpack_require__(94); +Matter.Vector = __webpack_require__(94); +Matter.Vertices = __webpack_require__(93); // aliases @@ -116825,7 +116020,7 @@ var Plugin = {}; module.exports = Plugin; -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -117184,7 +116379,7 @@ module.exports = World; var Composite = __webpack_require__(149); var Constraint = __webpack_require__(163); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -117332,7 +116527,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(84); +var CONST = __webpack_require__(83); var PluginManager = __webpack_require__(11); /** @@ -117401,16 +116596,6 @@ var ScenePlugin = new Class({ * @since 3.0.0 */ this.manager = scene.sys.game.scene; - - /** - * [description] - * - * @name Phaser.Scenes.ScenePlugin#_queue - * @type {array} - * @private - * @since 3.0.0 - */ - this._queue = []; }, /** @@ -117438,7 +116623,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - start: function (key, data) + start: function (key) { if (key === undefined) { key = this.key; } @@ -117489,7 +116674,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - launch: function (key, data) + launch: function (key) { if (key && key !== this.key) { @@ -117865,14 +117050,41 @@ module.exports = ScenePlugin; /** * @namespace Phaser.Sound + * + * @author Pavle Goloskokovic (http://prunegames.com) + */ + +/** + * Config object containing various sound settings. + * + * @typedef {object} SoundConfig + * + * @property {boolean} [mute=false] - Boolean indicating whether the sound should be muted or not. + * @property {number} [volume=1] - A value between 0 (silence) and 1 (full volume). + * @property {number} [rate=1] - Defines the speed at which the sound should be played. + * @property {number} [detune=0] - Represents detuning of sound in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * @property {number} [seek=0] - Position of playback for this sound, in seconds. + * @property {boolean} [loop=false] - Whether or not the sound or current sound marker should loop. + * @property {number} [delay=0] - Time, in seconds, that should elapse before the sound actually starts its playback. + */ + +/** + * Marked section of a sound represented by name, and optionally start time, duration, and config object. + * + * @typedef {object} SoundMarker + * + * @property {string} name - Unique identifier of a sound marker. + * @property {number} [start=0] - Sound position offset at witch playback should start. + * @property {number} [duration] - Playback duration of this marker. + * @property {SoundConfig} [config] - An optional config object containing default marker settings. */ module.exports = { SoundManagerCreator: __webpack_require__(253), - BaseSound: __webpack_require__(86), - BaseSoundManager: __webpack_require__(85), + BaseSound: __webpack_require__(85), + BaseSoundManager: __webpack_require__(84), WebAudioSound: __webpack_require__(259), WebAudioSoundManager: __webpack_require__(258), @@ -117902,10 +117114,10 @@ module.exports = { module.exports = { - List: __webpack_require__(87), - Map: __webpack_require__(114), - ProcessQueue: __webpack_require__(332), - RTree: __webpack_require__(333), + List: __webpack_require__(86), + Map: __webpack_require__(113), + ProcessQueue: __webpack_require__(334), + RTree: __webpack_require__(335), Set: __webpack_require__(61) }; @@ -117993,24 +117205,24 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(97), + Components: __webpack_require__(96), Parsers: __webpack_require__(892), Formats: __webpack_require__(19), - ImageCollection: __webpack_require__(347), + ImageCollection: __webpack_require__(349), ParseToTilemap: __webpack_require__(154), - Tile: __webpack_require__(45), - Tilemap: __webpack_require__(351), + Tile: __webpack_require__(44), + Tilemap: __webpack_require__(353), TilemapCreator: __webpack_require__(909), TilemapFactory: __webpack_require__(910), - Tileset: __webpack_require__(101), + Tileset: __webpack_require__(100), LayerData: __webpack_require__(75), MapData: __webpack_require__(76), - ObjectLayer: __webpack_require__(349), + ObjectLayer: __webpack_require__(351), - DynamicTilemapLayer: __webpack_require__(352), - StaticTilemapLayer: __webpack_require__(353) + DynamicTilemapLayer: __webpack_require__(354), + StaticTilemapLayer: __webpack_require__(355) }; @@ -118026,7 +117238,7 @@ module.exports = { */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(35); +var CalculateFacesWithin = __webpack_require__(34); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -118090,10 +117302,10 @@ module.exports = Copy; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(99); -var TileToWorldY = __webpack_require__(100); +var TileToWorldX = __webpack_require__(98); +var TileToWorldY = __webpack_require__(99); var GetTilesWithin = __webpack_require__(15); -var ReplaceByIndex = __webpack_require__(340); +var ReplaceByIndex = __webpack_require__(342); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -118246,8 +117458,8 @@ module.exports = CullTiles; */ var GetTilesWithin = __webpack_require__(15); -var CalculateFacesWithin = __webpack_require__(35); -var SetTileCollision = __webpack_require__(44); +var CalculateFacesWithin = __webpack_require__(34); +var SetTileCollision = __webpack_require__(43); /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -118526,9 +117738,9 @@ module.exports = ForEachTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetTileAt = __webpack_require__(98); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var GetTileAt = __webpack_require__(97); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Gets a tile at the given world coordinates from the given layer. @@ -118571,10 +117783,10 @@ var Geom = __webpack_require__(292); var GetTilesWithin = __webpack_require__(15); var Intersects = __webpack_require__(293); var NOOP = __webpack_require__(3); -var TileToWorldX = __webpack_require__(99); -var TileToWorldY = __webpack_require__(100); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var TileToWorldX = __webpack_require__(98); +var TileToWorldY = __webpack_require__(99); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); var TriangleToRectangle = function (triangle, rect) { @@ -118667,8 +117879,8 @@ module.exports = GetTilesWithinShape; */ var GetTilesWithin = __webpack_require__(15); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Gets the tiles in the given rectangular area (in world coordinates) of the layer. @@ -118718,9 +117930,9 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasTileAt = __webpack_require__(341); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var HasTileAt = __webpack_require__(343); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns @@ -118758,8 +117970,8 @@ module.exports = HasTileAtWorldXY; */ var PutTileAt = __webpack_require__(151); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either @@ -118799,7 +118011,7 @@ module.exports = PutTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CalculateFacesWithin = __webpack_require__(35); +var CalculateFacesWithin = __webpack_require__(34); var PutTileAt = __webpack_require__(151); /** @@ -118920,9 +118132,9 @@ module.exports = Randomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RemoveTileAt = __webpack_require__(342); -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var RemoveTileAt = __webpack_require__(344); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); /** * Removes the tile at the given world coordinates in the specified layer and updates the layer's @@ -119047,8 +118259,8 @@ module.exports = RenderDebug; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var SetLayerCollisionIndex = __webpack_require__(152); /** @@ -119108,8 +118320,8 @@ module.exports = SetCollision; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var SetLayerCollisionIndex = __webpack_require__(152); /** @@ -119174,8 +118386,8 @@ module.exports = SetCollisionBetween; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var SetLayerCollisionIndex = __webpack_require__(152); /** @@ -119229,8 +118441,8 @@ module.exports = SetCollisionByExclusion; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); var HasValue = __webpack_require__(72); /** @@ -119303,8 +118515,8 @@ module.exports = SetCollisionByProperty; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SetTileCollision = __webpack_require__(44); -var CalculateFacesWithin = __webpack_require__(35); +var SetTileCollision = __webpack_require__(43); +var CalculateFacesWithin = __webpack_require__(34); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -119544,8 +118756,8 @@ module.exports = SwapByIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileToWorldX = __webpack_require__(99); -var TileToWorldY = __webpack_require__(100); +var TileToWorldX = __webpack_require__(98); +var TileToWorldY = __webpack_require__(99); var Vector2 = __webpack_require__(6); /** @@ -119666,8 +118878,8 @@ module.exports = WeightedRandomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var WorldToTileX = __webpack_require__(40); -var WorldToTileY = __webpack_require__(41); +var WorldToTileX = __webpack_require__(39); +var WorldToTileY = __webpack_require__(40); var Vector2 = __webpack_require__(6); /** @@ -119717,12 +118929,12 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(343), + Parse: __webpack_require__(345), Parse2DArray: __webpack_require__(153), - ParseCSV: __webpack_require__(344), + ParseCSV: __webpack_require__(346), - Impact: __webpack_require__(350), - Tiled: __webpack_require__(345) + Impact: __webpack_require__(352), + Tiled: __webpack_require__(347) }; @@ -119740,8 +118952,8 @@ module.exports = { var Base64Decode = __webpack_require__(894); var GetFastValue = __webpack_require__(1); var LayerData = __webpack_require__(75); -var ParseGID = __webpack_require__(346); -var Tile = __webpack_require__(45); +var ParseGID = __webpack_require__(348); +var Tile = __webpack_require__(44); /** * [description] @@ -119958,9 +119170,9 @@ module.exports = ParseImageLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(101); -var ImageCollection = __webpack_require__(347); -var ParseObject = __webpack_require__(348); +var Tileset = __webpack_require__(100); +var ImageCollection = __webpack_require__(349); +var ParseObject = __webpack_require__(350); /** * Tilesets & Image Collections @@ -120107,8 +119319,8 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(348); -var ObjectLayer = __webpack_require__(349); +var ParseObject = __webpack_require__(350); +var ObjectLayer = __webpack_require__(351); /** * [description] @@ -120312,7 +119524,7 @@ module.exports = AssignTileProperties; */ var LayerData = __webpack_require__(75); -var Tile = __webpack_require__(45); +var Tile = __webpack_require__(44); /** * [description] @@ -120395,7 +119607,7 @@ module.exports = ParseTileLayers; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Tileset = __webpack_require__(101); +var Tileset = __webpack_require__(100); /** * [description] @@ -120502,7 +119714,7 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer src.cull(camera); - this.pipeline.batchDynamicTilemapLayer(src, camera); + this.pipeline.batchDynamicTilemapLayer(src, camera); }; module.exports = DynamicTilemapLayerWebGLRenderer; @@ -120888,7 +120100,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { Clock: __webpack_require__(912), - TimerEvent: __webpack_require__(354) + TimerEvent: __webpack_require__(356) }; @@ -120905,7 +120117,7 @@ module.exports = { var Class = __webpack_require__(0); var PluginManager = __webpack_require__(11); -var TimerEvent = __webpack_require__(354); +var TimerEvent = __webpack_require__(356); /** * @classdesc @@ -121105,7 +120317,7 @@ var Clock = new Class({ * @param {number} time - [description] * @param {number} delta - [description] */ - preUpdate: function (time, delta) + preUpdate: function () { var toRemove = this._pendingRemoval.length; var toInsert = this._pendingInsertion.length; @@ -121282,7 +120494,7 @@ module.exports = { TweenManager: __webpack_require__(916), Tween: __webpack_require__(158), TweenData: __webpack_require__(159), - Timeline: __webpack_require__(359) + Timeline: __webpack_require__(361) }; @@ -121305,14 +120517,14 @@ module.exports = { GetBoolean: __webpack_require__(73), GetEaseFunction: __webpack_require__(71), - GetNewValue: __webpack_require__(102), - GetProps: __webpack_require__(355), + GetNewValue: __webpack_require__(101), + GetProps: __webpack_require__(357), GetTargets: __webpack_require__(155), - GetTweens: __webpack_require__(356), + GetTweens: __webpack_require__(358), GetValueOp: __webpack_require__(156), - NumberTweenBuilder: __webpack_require__(357), - TimelineBuilder: __webpack_require__(358), - TweenBuilder: __webpack_require__(103), + NumberTweenBuilder: __webpack_require__(359), + TimelineBuilder: __webpack_require__(360), + TweenBuilder: __webpack_require__(102) }; @@ -121400,11 +120612,11 @@ module.exports = [ */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(357); +var NumberTweenBuilder = __webpack_require__(359); var PluginManager = __webpack_require__(11); -var TimelineBuilder = __webpack_require__(358); -var TWEEN_CONST = __webpack_require__(88); -var TweenBuilder = __webpack_require__(103); +var TimelineBuilder = __webpack_require__(360); +var TWEEN_CONST = __webpack_require__(87); +var TweenBuilder = __webpack_require__(102); // Phaser.Tweens.TweenManager @@ -122086,13 +121298,13 @@ module.exports = { GetRandomElement: __webpack_require__(138), NumberArray: __webpack_require__(317), NumberArrayStep: __webpack_require__(920), - QuickSelect: __webpack_require__(334), + QuickSelect: __webpack_require__(336), Range: __webpack_require__(272), RemoveRandomElement: __webpack_require__(921), RotateLeft: __webpack_require__(187), RotateRight: __webpack_require__(188), Shuffle: __webpack_require__(80), - SpliceOne: __webpack_require__(360) + SpliceOne: __webpack_require__(362) }; @@ -122232,7 +121444,7 @@ module.exports = NumberArrayStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SpliceOne = __webpack_require__(360); +var SpliceOne = __webpack_require__(362); /** * Removes a random object from the given array and returns it. @@ -122286,7 +121498,7 @@ module.exports = { HasAny: __webpack_require__(286), HasValue: __webpack_require__(72), IsPlainObject: __webpack_require__(165), - Merge: __webpack_require__(104), + Merge: __webpack_require__(103), MergeRight: __webpack_require__(925) }; @@ -122512,9 +121724,9 @@ module.exports = ReverseString; */ var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(337); +var COLLIDES = __webpack_require__(339); var GetVelocity = __webpack_require__(950); -var TYPE = __webpack_require__(338); +var TYPE = __webpack_require__(340); var UpdateMotion = __webpack_require__(951); /** @@ -123023,7 +122235,7 @@ var Body = new Class({ * * @param {object} config - [description] */ - fromJSON: function (config) + fromJSON: function () { }, @@ -123033,9 +122245,9 @@ var Body = new Class({ * @method Phaser.Physics.Impact.Body#check * @since 3.0.0 * - * @param {[type]} other - [description] + * @param {Phaser.Physics.Impact.Body} other - [description] */ - check: function (other) + check: function () { }, @@ -123066,7 +122278,7 @@ var Body = new Class({ * * @return {boolean} [description] */ - handleMovementTrace: function (res) + handleMovementTrace: function () { return true; }, @@ -123908,7 +123120,7 @@ module.exports = ImpactImage; var Class = __webpack_require__(0); var Components = __webpack_require__(847); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); /** * @classdesc @@ -124071,7 +123283,7 @@ module.exports = ImpactSprite; var Body = __webpack_require__(929); var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(337); +var COLLIDES = __webpack_require__(339); var CollisionMap = __webpack_require__(930); var EventEmitter = __webpack_require__(13); var GetFastValue = __webpack_require__(1); @@ -124079,7 +123291,7 @@ var HasValue = __webpack_require__(72); var Set = __webpack_require__(61); var Solver = __webpack_require__(966); var TILEMAP_FORMATS = __webpack_require__(19); -var TYPE = __webpack_require__(338); +var TYPE = __webpack_require__(340); /** * @classdesc @@ -125060,7 +124272,7 @@ module.exports = World; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(93); +var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); var Composites = __webpack_require__(938); var Constraint = __webpack_require__(163); @@ -126273,9 +125485,9 @@ module.exports = Composites; var Composite = __webpack_require__(149); var Constraint = __webpack_require__(163); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); var Body = __webpack_require__(59); -var Bodies = __webpack_require__(93); +var Bodies = __webpack_require__(92); (function() { @@ -126597,7 +125809,7 @@ var Bodies = __webpack_require__(93); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(93); +var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); var Components = __webpack_require__(849); var GameObject = __webpack_require__(2); @@ -126727,14 +125939,14 @@ module.exports = MatterImage; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AnimationComponent = __webpack_require__(361); -var Bodies = __webpack_require__(93); +var AnimationComponent = __webpack_require__(363); +var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); var Components = __webpack_require__(849); var GameObject = __webpack_require__(2); var GetFastValue = __webpack_require__(1); var Pipeline = __webpack_require__(184); -var Sprite = __webpack_require__(38); +var Sprite = __webpack_require__(37); var Vector2 = __webpack_require__(6); /** @@ -126869,7 +126081,7 @@ var Matter = {}; module.exports = Matter; var Plugin = __webpack_require__(854); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -126960,9 +126172,9 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(362); +var Pair = __webpack_require__(364); var Detector = __webpack_require__(851); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -127287,8 +126499,8 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(362); -var Common = __webpack_require__(39); +var Pair = __webpack_require__(364); +var Common = __webpack_require__(38); (function() { @@ -127452,10 +126664,10 @@ var Resolver = {}; module.exports = Resolver; -var Vertices = __webpack_require__(94); -var Vector = __webpack_require__(95); -var Common = __webpack_require__(39); -var Bounds = __webpack_require__(96); +var Vertices = __webpack_require__(93); +var Vector = __webpack_require__(94); +var Common = __webpack_require__(38); +var Bounds = __webpack_require__(95); (function() { @@ -127814,7 +127026,7 @@ var Engine = {}; module.exports = Engine; var World = __webpack_require__(855); -var Sleeping = __webpack_require__(339); +var Sleeping = __webpack_require__(341); var Resolver = __webpack_require__(944); var Pairs = __webpack_require__(943); var Metrics = __webpack_require__(984); @@ -127822,7 +127034,7 @@ var Grid = __webpack_require__(942); var Events = __webpack_require__(162); var Composite = __webpack_require__(149); var Constraint = __webpack_require__(163); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); var Body = __webpack_require__(59); (function() { @@ -128322,7 +127534,7 @@ var Body = __webpack_require__(59); // Phaser.Physics.Matter.World -var Bodies = __webpack_require__(93); +var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); var Composite = __webpack_require__(149); var Engine = __webpack_require__(945); @@ -128488,19 +127700,22 @@ var World = new Class({ var _this = this; var engine = this.engine; - MatterEvents.on(engine, 'beforeUpdate', function (event) { + MatterEvents.on(engine, 'beforeUpdate', function (event) + { _this.emit('beforeupdate', event); }); - MatterEvents.on(engine, 'afterUpdate', function (event) { + MatterEvents.on(engine, 'afterUpdate', function (event) + { _this.emit('afterupdate', event); }); - MatterEvents.on(engine, 'collisionStart', function (event) { + MatterEvents.on(engine, 'collisionStart', function (event) + { var pairs = event.pairs; var bodyA; @@ -128516,7 +127731,8 @@ var World = new Class({ }); - MatterEvents.on(engine, 'collisionActive', function (event) { + MatterEvents.on(engine, 'collisionActive', function (event) + { var pairs = event.pairs; var bodyA; @@ -128532,7 +127748,8 @@ var World = new Class({ }); - MatterEvents.on(engine, 'collisionEnd', function (event) { + MatterEvents.on(engine, 'collisionEnd', function (event) + { var pairs = event.pairs; var bodyA; @@ -128796,9 +128013,7 @@ var World = new Class({ convertTilemapLayer: function (tilemapLayer, options) { var layerData = tilemapLayer.layer; - var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, { - isColliding: true - }); + var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, {isColliding: true}); this.convertTiles(tiles, options); @@ -128977,9 +128192,12 @@ var World = new Class({ { if (points === undefined) { points = []; } + // var pathPattern = /L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/ig; + + // eslint-disable-next-line no-useless-escape var pathPattern = /L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/ig; - path.replace(pathPattern, function(match, x, y) + path.replace(pathPattern, function (match, x, y) { points.push({ x: parseFloat(x), y: parseFloat(y) }); }); @@ -129026,7 +128244,7 @@ module.exports = World; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(363); +__webpack_require__(365); var CONST = __webpack_require__(22); var Extend = __webpack_require__(23); @@ -129038,22 +128256,22 @@ var Extend = __webpack_require__(23); var Phaser = { Actions: __webpack_require__(166), - Animation: __webpack_require__(434), - Cache: __webpack_require__(435), - Cameras: __webpack_require__(436), + Animation: __webpack_require__(436), + Cache: __webpack_require__(437), + Cameras: __webpack_require__(438), Class: __webpack_require__(0), - Create: __webpack_require__(447), - Curves: __webpack_require__(453), - Data: __webpack_require__(456), - Display: __webpack_require__(458), - DOM: __webpack_require__(491), - EventEmitter: __webpack_require__(493), - Game: __webpack_require__(494), - GameObjects: __webpack_require__(539), + Create: __webpack_require__(449), + Curves: __webpack_require__(455), + Data: __webpack_require__(458), + Display: __webpack_require__(460), + DOM: __webpack_require__(493), + EventEmitter: __webpack_require__(495), + Game: __webpack_require__(496), + GameObjects: __webpack_require__(541), Geom: __webpack_require__(292), - Input: __webpack_require__(749), - Loader: __webpack_require__(763), - Math: __webpack_require__(781), + Input: __webpack_require__(751), + Loader: __webpack_require__(765), + Math: __webpack_require__(783), Physics: __webpack_require__(948), Scene: __webpack_require__(250), Scenes: __webpack_require__(856), @@ -129101,7 +128319,7 @@ global.Phaser = Phaser; module.exports = { - Arcade: __webpack_require__(823), + Arcade: __webpack_require__(825), Impact: __webpack_require__(949), Matter: __webpack_require__(969) @@ -129137,14 +128355,14 @@ module.exports = { module.exports = { Body: __webpack_require__(929), - COLLIDES: __webpack_require__(337), + COLLIDES: __webpack_require__(339), CollisionMap: __webpack_require__(930), Factory: __webpack_require__(931), Image: __webpack_require__(933), ImpactBody: __webpack_require__(932), ImpactPhysics: __webpack_require__(965), Sprite: __webpack_require__(934), - TYPE: __webpack_require__(338), + TYPE: __webpack_require__(340), World: __webpack_require__(935) }; @@ -129531,7 +128749,7 @@ module.exports = BodyScale; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TYPE = __webpack_require__(338); +var TYPE = __webpack_require__(340); /** * [description] @@ -129692,7 +128910,7 @@ module.exports = Bounce; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TYPE = __webpack_require__(338); +var TYPE = __webpack_require__(340); /** * [description] @@ -129813,7 +129031,7 @@ module.exports = CheckAgainst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var COLLIDES = __webpack_require__(337); +var COLLIDES = __webpack_require__(339); /** * [description] @@ -130447,7 +129665,7 @@ module.exports = Velocity; var Class = __webpack_require__(0); var Factory = __webpack_require__(931); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(104); +var Merge = __webpack_require__(103); var PluginManager = __webpack_require__(11); var World = __webpack_require__(935); @@ -130623,7 +129841,7 @@ module.exports = ImpactPhysics; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var COLLIDES = __webpack_require__(337); +var COLLIDES = __webpack_require__(339); var SeperateX = __webpack_require__(967); var SeperateY = __webpack_require__(968); @@ -130977,7 +130195,7 @@ var Collision = { this.body.collisionFilter.mask = flags; return this; - }, + } }; @@ -131434,7 +130652,7 @@ module.exports = Sensor; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bodies = __webpack_require__(93); +var Bodies = __webpack_require__(92); var Body = __webpack_require__(59); var GetFastValue = __webpack_require__(1); @@ -131717,7 +130935,8 @@ var Sleep = { { var world = this.world; - MatterEvents.on(this.body, 'sleepStart', function (event) { + MatterEvents.on(this.body, 'sleepStart', function (event) + { world.emit('sleepstart', event, this); }); } @@ -131745,7 +130964,8 @@ var Sleep = { { var world = this.world; - MatterEvents.on(this.body, 'sleepEnd', function (event) { + MatterEvents.on(this.body, 'sleepEnd', function (event) + { world.emit('sleepend', event, this); }); } @@ -132164,16 +131384,16 @@ module.exports = Velocity; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bounds = __webpack_require__(96); +var Bounds = __webpack_require__(95); var Class = __webpack_require__(0); var Composite = __webpack_require__(149); var Constraint = __webpack_require__(163); var Detector = __webpack_require__(851); var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(104); -var Sleeping = __webpack_require__(339); +var Merge = __webpack_require__(103); +var Sleeping = __webpack_require__(341); var Vector2 = __webpack_require__(6); -var Vertices = __webpack_require__(94); +var Vertices = __webpack_require__(93); /** * @classdesc @@ -132461,11 +131681,11 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(95); +var Vector = __webpack_require__(94); var SAT = __webpack_require__(852); -var Bounds = __webpack_require__(96); -var Bodies = __webpack_require__(93); -var Vertices = __webpack_require__(94); +var Bounds = __webpack_require__(95); +var Bodies = __webpack_require__(92); +var Vertices = __webpack_require__(93); (function() { @@ -132578,7 +131798,7 @@ var Metrics = {}; module.exports = Metrics; var Composite = __webpack_require__(149); -var Common = __webpack_require__(39); +var Common = __webpack_require__(38); (function() { @@ -132680,7 +131900,7 @@ var Svg = {}; module.exports = Svg; -var Bounds = __webpack_require__(96); +var Bounds = __webpack_require__(95); (function() { @@ -132904,7 +132124,7 @@ var GetValue = __webpack_require__(4); var MatterAttractors = __webpack_require__(987); var MatterLib = __webpack_require__(941); var MatterWrap = __webpack_require__(988); -var Merge = __webpack_require__(104); +var Merge = __webpack_require__(103); var Plugin = __webpack_require__(854); var PluginManager = __webpack_require__(11); var World = __webpack_require__(946); diff --git a/dist/phaser.min.js b/dist/phaser.min.js index 91c8050cc..ead95579f 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()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=947)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,s);if(!1!==h){if(n((r||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(107),o=i(182),a=i(108),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s={},r=new n({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,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={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){for(var e=0,i=0;i0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return t instanceof HTMLElement},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*g+x)*b,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(112),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,i,r,o){o=o||t.position;for(var a=0;a0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.values.forEach(function(t){e.add(t)}),this.entries.forEach(function(t){e.add(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.add(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.add(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(106),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(122),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(492))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),l=i(38),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(38),o=i(6),a=i(120),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(t,e){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=(this.vertexBuffer,this.vertexData,this.topology),n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);for(var n in i.spritemap=this.game.cache.json.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration,config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0):(console.error("addMarker - Marker has to have a valid name!"),!1):(console.error("addMarker - Marker object has to be provided!"),!1)},updateMarker:function(t){return t?t.name&&"string"==typeof t.name?this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1):(console.error("updateMarker - Marker has to have a valid name!"),!1):(console.error("updateMarker - Marker object has to be provided!"),!1)},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):(console.error("removeMarker - Marker with name '"+e.name+"' does not exist for sound '"+this.key+"'!"),null)},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(645),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&f<=1&&p>=0&&p<=1&&(i.x=s+f*(o-s),i.y=r+f*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(38),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(39),o=i(59),a=i(96),h=i(95),l=i(937);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n={};t.exports=n;var s=i(95),r=i(39);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(35),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(98),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(341),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(342),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(340),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(99),TileToWorldXY:i(889),TileToWorldY:i(100),WeightedRandomize:i(890),WorldToTileX:i(40),WorldToTileXY:i(891),WorldToTileY:i(41)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||w-y||A>-m||S-y||T>-m||w-y||A>-m||S-v&&A*n+C*r+h>-y&&(A+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],l=n[4],u=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*u-a*l)*c,y=(r*l-s*u)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),b=this.zoom,w=this.scrollX,T=this.scrollY,S=t+(w*m-T*x)*b,A=e+(w*x+T*m)*b;return i.x=S*d+A*p+v,i.y=S*f+A*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;eu&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom)}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=l},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(119),r=i(204),o=i(205),a=i(206),h=i(61),l=i(81),u=i(6),c=i(51),d=i(120),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(84),r=i(525),o=i(526),a=i(231),h=i(252),l=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=l},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(542),h=i(543),l=i(544),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(547),s=i(550),r=i(0),o=i(12),a=i(130),h=i(2),l=i(87),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=u},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(551),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(115),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),l=i(4),u=i(16),c=i(563),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=l(e,"x",0),n=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(110),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(568),a=i(87),h=i(569),l=i(608),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h]+" ")}r0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(l[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(l[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(617),l=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){var u=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=u,this.setTexture(h,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,gl.LINEAR,gl.LINEAR,gl.REPEAT,gl.REPEAT,gl.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(0),s=i(89),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,b=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration)r=1,o=s.duration;else if(n>s.delay&&n<=s.t1)r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r;else if(n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)}s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(42);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(39);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(373),Call:i(374),GetFirst:i(375),GridAlign:i(376),IncAlpha:i(393),IncX:i(394),IncXY:i(395),IncY:i(396),PlaceOnCircle:i(397),PlaceOnEllipse:i(398),PlaceOnLine:i(399),PlaceOnRectangle:i(400),PlaceOnTriangle:i(401),PlayAnimation:i(402),RandomCircle:i(403),RandomEllipse:i(404),RandomLine:i(405),RandomRectangle:i(406),RandomTriangle:i(407),Rotate:i(408),RotateAround:i(409),RotateAroundDistance:i(410),ScaleX:i(411),ScaleXY:i(412),ScaleY:i(413),SetAlpha:i(414),SetBlendMode:i(415),SetDepth:i(416),SetHitArea:i(417),SetOrigin:i(418),SetRotation:i(419),SetScale:i(420),SetScaleX:i(421),SetScaleY:i(422),SetTint:i(423),SetVisible:i(424),SetX:i(425),SetXY:i(426),SetY:i(427),ShiftPosition:i(428),Shuffle:i(429),SmootherStep:i(430),SmoothStep:i(431),Spread:i(432),ToggleVisible:i(433)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(47),r=i(25),o=i(48);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(47),r=i(50);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(48),s=i(49);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(50),s=i(26),r=i(49),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(50),s=i(28),r=i(49),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(47),s=i(30),r=i(48),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(105),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(105),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=l[0],l[0].prevFrame=o;var v=1/(l.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(114),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(114),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(37);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(37);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(119),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,w=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,P=d*m-p*v,L=f*m-p*y,k=x*L-b*P+w*_+T*E-S*M+A*C;return k?(k=1/k,i[0]=(h*L-l*P+u*_)*k,i[1]=(l*E-a*L-u*M)*k,i[2]=(a*P-h*E+u*C)*k,i[3]=(r*P-s*L-o*_)*k,i[4]=(n*L-r*E+o*M)*k,i[5]=(s*E-n*P-o*C)*k,i[6]=(v*A-y*S+m*T)*k,i[7]=(y*w-g*A-m*b)*k,i[8]=(g*S-v*w+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(118),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(482)(t))},function(t,e,i){var n=i(117);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l={r:i=Math.floor(i*=255),g:i,b:i,color:0},u=s%6;return 0===u?(l.g=h,l.b=o):1===u?(l.r=a,l.b=o):2===u?(l.r=o,l.b=h):3===u?(l.r=o,l.g=a):4===u?(l.r=h,l.g=o):5===u&&(l.g=o,l.b=a),l.color=n(l.r,l.g,l.b),l}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===C(t,e,i,n)>0)for(r=e;r=e;r-=n)o=T(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),S(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(y(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&y(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(y(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!m(s,r)&&x(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),S(n),S(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&b(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&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;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function y(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(m(t,e)&&m(i,n)||m(t,n)&&m(i,e))||y(t,e,i)>0!=y(t,e,n)>0&&y(i,n,t)>0!=y(i,n,e)>0}function b(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function w(t,e){var i=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function T(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(510),r=i(236),o=(i(34),i(83),new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;for(var n=this.renderer,s=this.program,r=t.lights.cull(e),o=Math.min(r.length,10),a=e.matrix,h={x:0,y:0},l=n.height,u=0;u<10;++u)n.setFloat1(s,"uLights["+u+"].radius",0);if(o<=0)return this;n.setFloat4(s,"uCamera",e.x,e.y,e.rotation,e.zoom),n.setFloat3(s,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b);for(u=0;u0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.renderer,i=this.vertexCount,n=(this.vertexBuffer,this.vertexData,this.topology),s=this.vertexSize,r=this.batches,o=0,a=null;if(0===r.length||0===i)return this.flushLocked=!1,this;t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));for(var h=0;h0){for(var l=0;l0){for(l=0;l0&&(e.setTexture2D(a.texture,0),t.drawArrays(n,a.first,o)),this.vertexCount=0,r.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t,e){if(t.vertexCount>0){var i=this.vertexBuffer,n=this.gl,s=this.renderer,r=t.tileset.image.get();s.currentPipeline&&s.currentPipeline.vertexCount>0&&s.flush(),this.vertexBuffer=t.vertexBuffer,s.setTexture2D(r.source.glTexture,0),s.setPipeline(this),n.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=i}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=(a.getTintAppendFloatAlpha,this.vertexViewF32),r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,l=o.config.resolution,u=this.maxQuads,c=e.scrollX,d=e.scrollY,f=e.matrix.matrix,p=f[0],g=f[1],v=f[2],y=f[3],m=f[4],x=f[5],b=Math.sin,w=Math.cos,T=this.vertexComponentCount,S=this.vertexCapacity,A=t.defaultFrame.source.glTexture;this.setTexture2D(A,0);for(var C=0;C=S&&(this.flush(),this.setTexture2D(A,0));for(var R=0;R=S&&(this.flush(),this.setTexture2D(A,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=this.renderer,o=e.roundPixels,h=r.config.resolution,l=t.getRenderList(),u=l.length,c=e.matrix.matrix,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=e.scrollX*t.scrollFactorX,x=e.scrollY*t.scrollFactorY,b=Math.ceil(u/this.maxQuads),w=0,T=t.x-m,S=t.y-x,A=0;A=this.vertexCapacity&&this.flush()}w+=C,u-=C,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,h=e.roundPixels,l=o.config.resolution,u=e.matrix.matrix,c=t.frame,d=c.texture.source[c.sourceIndex].glTexture,f=!!d.isRenderTexture,p=t.flipX,g=t.flipY^f,v=c.uvs,y=c.width*(p?-1:1),m=c.height*(g?-1:1),x=-t.displayOriginX+c.x+c.width*(p?1:0),b=-t.displayOriginY+c.y+c.height*(g?1:0),w=x+y,T=b+m,S=t.x-e.scrollX*t.scrollFactorX,A=t.y-e.scrollY*t.scrollFactorY,C=t.scaleX,M=t.scaleY,E=-t.rotation,_=t._alphaTL,P=t._alphaTR,L=t._alphaBL,k=t._alphaBR,F=t._tintTL,R=t._tintTR,O=t._tintBL,B=t._tintBR,D=Math.sin(E),I=Math.cos(E),Y=I*C,z=-D*C,X=D*M,N=I*M,V=S,W=A,G=u[0],U=u[1],j=u[2],H=u[3],q=Y*G+z*j,K=Y*U+z*H,J=X*G+N*j,Z=X*U+N*H,Q=V*G+W*j+u[4],$=V*U+W*H+u[5],tt=x*q+b*J+Q,et=x*K+b*Z+$,it=x*q+T*J+Q,nt=x*K+T*Z+$,st=w*q+T*J+Q,rt=w*K+T*Z+$,ot=w*q+b*J+Q,at=w*K+b*Z+$,ht=n(F,_),lt=n(R,P),ut=n(O,L),ct=n(B,k);this.setTexture2D(d,0),h&&(tt=(tt*l|0)/l,et=(et*l|0)/l,it=(it*l|0)/l,nt=(nt*l|0)/l,st=(st*l|0)/l,rt=(rt*l|0)/l,ot=(ot*l|0)/l,at=(at*l|0)/l),s[(i=this.vertexCount*this.vertexComponentCount)+0]=tt,s[i+1]=et,s[i+2]=v.x0,s[i+3]=v.y0,r[i+4]=ht,s[i+5]=it,s[i+6]=nt,s[i+7]=v.x1,s[i+8]=v.y1,r[i+9]=lt,s[i+10]=st,s[i+11]=rt,s[i+12]=v.x2,s[i+13]=v.y2,r[i+14]=ut,s[i+15]=tt,s[i+16]=et,s[i+17]=v.x0,s[i+18]=v.y0,r[i+19]=ht,s[i+20]=st,s[i+21]=rt,s[i+22]=v.x2,s[i+23]=v.y2,r[i+24]=ut,s[i+25]=ot,s[i+26]=at,s[i+27]=v.x3,s[i+28]=v.y3,r[i+29]=ct,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,l=t.alphas,u=this.vertexViewF32,c=this.vertexViewU32,d=this.renderer,f=e.roundPixels,p=d.config.resolution,g=e.matrix.matrix,v=(g[0],g[1],g[2],g[3],g[4],g[5],t.frame),y=t.texture.source[v.sourceIndex].glTexture,m=t.x-e.scrollX*t.scrollFactorX,x=t.y-e.scrollY*t.scrollFactorY,b=t.scaleX,w=t.scaleY,T=-t.rotation,S=Math.sin(T),A=Math.cos(T),C=A*b,M=-S*b,E=S*w,_=A*w,P=m,L=x,k=g[0],F=g[1],R=g[2],O=g[3],B=C*k+M*R,D=C*F+M*O,I=E*k+_*R,Y=E*F+_*O,z=P*k+L*R+g[4],X=P*F+L*O+g[5],N=0;this.setTexture2D(y,0),N=this.vertexCount*this.vertexComponentCount;for(var V=0,W=0;Vthis.vertexCapacity&&this.flush();var i=t.text,n=i.length,s=a.getTintAppendFloatAlpha,r=this.vertexViewF32,o=this.vertexViewU32,h=this.renderer,l=e.roundPixels,u=h.config.resolution,c=e.matrix.matrix,d=e.width+50,f=e.height+50,p=t.frame,g=t.texture.source[p.sourceIndex],v=e.scrollX*t.scrollFactorX,y=e.scrollY*t.scrollFactorY,m=t.fontData,x=m.lineHeight,b=t.fontSize/m.size,w=m.chars,T=t.alpha,S=s(t._tintTL,T),A=s(t._tintTR,T),C=s(t._tintBL,T),M=s(t._tintBR,T),E=t.x,_=t.y,P=p.cutX,L=p.cutY,k=g.width,F=g.height,R=g.glTexture,O=0,B=0,D=0,I=0,Y=null,z=0,X=0,N=0,V=0,W=0,G=0,U=0,j=0,H=0,q=0,K=0,J=0,Z=null,Q=0,$=E-v+p.x,tt=_-y+p.y,et=-t.rotation,it=t.scaleX,nt=t.scaleY,st=Math.sin(et),rt=Math.cos(et),ot=rt*it,at=-st*it,ht=st*nt,lt=rt*nt,ut=$,ct=tt,dt=c[0],ft=c[1],pt=c[2],gt=c[3],vt=ot*dt+at*pt,yt=ot*ft+at*gt,mt=ht*dt+lt*pt,xt=ht*ft+lt*gt,bt=ut*dt+ct*pt+c[4],wt=ut*ft+ct*gt+c[5],Tt=0;this.setTexture2D(R,0);for(var St=0;Std||ty0<-50||ty0>f)&&(tx1<-50||tx1>d||ty1<-50||ty1>f)&&(tx2<-50||tx2>d||ty2<-50||ty2>f)&&(tx3<-50||tx3>d||ty3<-50||ty3>f)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),Tt=this.vertexCount*this.vertexComponentCount,l&&(tx0=(tx0*u|0)/u,ty0=(ty0*u|0)/u,tx1=(tx1*u|0)/u,ty1=(ty1*u|0)/u,tx2=(tx2*u|0)/u,ty2=(ty2*u|0)/u,tx3=(tx3*u|0)/u,ty3=(ty3*u|0)/u),r[Tt+0]=tx0,r[Tt+1]=ty0,r[Tt+2]=H,r[Tt+3]=K,o[Tt+4]=S,r[Tt+5]=tx1,r[Tt+6]=ty1,r[Tt+7]=H,r[Tt+8]=J,o[Tt+9]=A,r[Tt+10]=tx2,r[Tt+11]=ty2,r[Tt+12]=q,r[Tt+13]=J,o[Tt+14]=C,r[Tt+15]=tx0,r[Tt+16]=ty0,r[Tt+17]=H,r[Tt+18]=K,o[Tt+19]=S,r[Tt+20]=tx2,r[Tt+21]=ty2,r[Tt+22]=q,r[Tt+23]=J,o[Tt+24]=C,r[Tt+25]=tx3,r[Tt+26]=ty3,r[Tt+27]=q,r[Tt+28]=K,o[Tt+29]=M,this.vertexCount+=6))}}else O=0,D=0,B+=x,Z=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,l=t.displayCallback,u=t.text,c=u.length,d=a.getTintAppendFloatAlpha,f=this.vertexViewF32,p=this.vertexViewU32,g=this.renderer,v=e.roundPixels,y=g.config.resolution,m=e.matrix.matrix,x=t.frame,b=t.texture.source[x.sourceIndex],w=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,S=t.scrollX,A=t.scrollY,C=t.fontData,M=C.lineHeight,E=t.fontSize/C.size,_=C.chars,P=t.alpha,L=d(t._tintTL,P),k=d(t._tintTR,P),F=d(t._tintBL,P),R=d(t._tintBR,P),O=t.x,B=t.y,D=x.cutX,I=x.cutY,Y=b.width,z=b.height,X=b.glTexture,N=0,V=0,W=0,G=0,U=null,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=null,rt=0,ot=O+x.x,at=B+x.y,ht=-t.rotation,lt=t.scaleX,ut=t.scaleY,ct=Math.sin(ht),dt=Math.cos(ht),ft=dt*lt,pt=-ct*lt,gt=ct*ut,vt=dt*ut,yt=ot,mt=at,xt=m[0],bt=m[1],wt=m[2],Tt=m[3],St=ft*xt+pt*wt,At=ft*bt+pt*Tt,Ct=gt*xt+vt*wt,Mt=gt*bt+vt*Tt,Et=yt*xt+mt*wt+m[4],_t=yt*bt+mt*Tt+m[5],Pt=t.cropWidth>0||t.cropHeight>0,Lt=0;this.setTexture2D(X,0),Pt&&g.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var kt=0;ktthis.vertexCapacity&&this.flush(),Lt=this.vertexCount*this.vertexComponentCount,v&&(tx0=(tx0*y|0)/y,ty0=(ty0*y|0)/y,tx1=(tx1*y|0)/y,ty1=(ty1*y|0)/y,tx2=(tx2*y|0)/y,ty2=(ty2*y|0)/y,tx3=(tx3*y|0)/y,ty3=(ty3*y|0)/y),f[Lt+0]=tx0,f[Lt+1]=ty0,f[Lt+2]=tt,f[Lt+3]=it,p[Lt+4]=L,f[Lt+5]=tx1,f[Lt+6]=ty1,f[Lt+7]=tt,f[Lt+8]=nt,p[Lt+9]=k,f[Lt+10]=tx2,f[Lt+11]=ty2,f[Lt+12]=et,f[Lt+13]=nt,p[Lt+14]=F,f[Lt+15]=tx0,f[Lt+16]=ty0,f[Lt+17]=tt,f[Lt+18]=it,p[Lt+19]=L,f[Lt+20]=tx2,f[Lt+21]=ty2,f[Lt+22]=et,f[Lt+23]=nt,p[Lt+24]=F,f[Lt+25]=tx3,f[Lt+26]=ty3,f[Lt+27]=et,f[Lt+28]=it,p[Lt+29]=R,this.vertexCount+=6}}}else N=0,W=0,V+=M,st=null;Pt&&g.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,l=t.alpha,u=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),f^=e.isRenderTexture?1:0,c=-c;a.getTintAppendFloatAlpha;var P,L=this.vertexViewF32,k=this.vertexViewU32,F=this.renderer,R=_.roundPixels,O=F.config.resolution,B=_.matrix.matrix,D=o*(d?1:0)-v,I=h*(f?1:0)-y,Y=D+o*(d?-1:1),z=I+h*(f?-1:1),X=s-_.scrollX*p,N=r-_.scrollY*g,V=Math.sin(c),W=Math.cos(c),G=W*l,U=-V*l,j=V*u,H=W*u,q=X,K=N,J=B[0],Z=B[1],Q=B[2],$=B[3],tt=G*J+U*Q,et=G*Z+U*$,it=j*J+H*Q,nt=j*Z+H*$,st=q*J+K*Q+B[4],rt=q*Z+K*$+B[5],ot=D*tt+I*it+st,at=D*et+I*nt+rt,ht=D*tt+z*it+st,lt=D*et+z*nt+rt,ut=Y*tt+z*it+st,ct=Y*et+z*nt+rt,dt=Y*tt+I*it+st,ft=Y*et+I*nt+rt,pt=m/i+M,gt=x/n+E,vt=(m+b)/i+M,yt=(x+w)/n+E;this.setTexture2D(e,0),R&&(ot=(ot*O|0)/O,at=(at*O|0)/O,ht=(ht*O|0)/O,lt=(lt*O|0)/O,ut=(ut*O|0)/O,ct=(ct*O|0)/O,dt=(dt*O|0)/O,ft=(ft*O|0)/O),L[(P=this.vertexCount*this.vertexComponentCount)+0]=ot,L[P+1]=at,L[P+2]=pt,L[P+3]=gt,k[P+4]=T,L[P+5]=ht,L[P+6]=lt,L[P+7]=pt,L[P+8]=yt,k[P+9]=S,L[P+10]=ut,L[P+11]=ct,L[P+12]=vt,L[P+13]=yt,k[P+14]=A,L[P+15]=ot,L[P+16]=at,L[P+17]=pt,L[P+18]=gt,k[P+19]=T,L[P+20]=ut,L[P+21]=ct,L[P+22]=vt,L[P+23]=yt,k[P+24]=A,L[P+25]=dt,L[P+26]=ft,L[P+27]=vt,L[P+28]=gt,k[P+29]=C,this.vertexCount+=6},batchGraphics:function(t,e){}});t.exports=l},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),l=i(8),u=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new u(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new l,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=0;u0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(522),l=i(523),u=i(524),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(84),s=i(4),r=i(527),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(){return!1},playAudioSprite:function(){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(86),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(){return!1},updateMarker:function(){return!1},removeMarker:function(){return null},play:function(){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(85),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){s.prototype.destroy.call(this),this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.context.suspend(),this.context=null}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(86),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var S=y+g-s,A=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,u=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,b=0,w=1,T=0,S=0,A=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(u-h,c-l),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,S=(65280&x)>>>8,A=255&x,v.strokeStyle="rgba("+T+","+S+","+A+","+y+")",v.lineWidth=w,C+=3;break;case n.FILL_STYLE:b=g[C+1],m=g[C+2],T=(16711680&b)>>>16,S=(65280&b)>>>8,A=255&b,v.fillStyle="rgba("+T+","+S+","+A+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1;break;default:console.error("Phaser: Invalid Graphics Command ID "+E)}}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(34),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(34),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(653),Ellipse:i(267),Intersects:i(293),Line:i(673),Point:i(691),Polygon:i(705),Rectangle:i(305),Triangle:i(734)}},function(t,e,i){t.exports={CircleToCircle:i(663),CircleToRectangle:i(664),GetRectangleIntersection:i(665),LineToCircle:i(295),LineToLine:i(90),LineToRectangle:i(666),PointToLine:i(296),PointToLineSegment:i(667),RectangleToRectangle:i(294),RectangleToTriangle:i(668),RectangleToValues:i(669),TriangleToCircle:i(670),TriangleToLine:i(671),TriangleToTriangle:i(672)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(109),o=i(111),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(42),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),l=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});l.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return console.info("Skipping loading audio '"+e+"' since sounds are disabled."),null;var u=l.findAudioURL(r,i);return u?!a.webAudio||o&&o.disableWebAudio?new h(e,u,t.path,n,r.sound.locked):new l(e,u,t.path,s,r.sound.context):(console.warn("No supported url provided for audio '"+e+"'!"),null)},o.register("audio",function(t,e,i,n){var s=l.create(this,t,e,i,n);return s&&this.addFile(s),this}),l.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(92),r=i(0),o=i(58),a=i(327),h=i(328),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=l},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(825),Angular:i(826),Bounce:i(827),Debug:i(828),Drag:i(829),Enable:i(830),Friction:i(831),Gravity:i(832),Immovable:i(833),Mass:i(834),Size:i(835),Velocity:i(836)}},function(t,e,i){var n=i(92),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(u.x,u.y,l.right,l.y)-u.radius):u.y>l.bottom&&(u.xl.right&&(a=h(u.x,u.y,l.right,l.bottom)-u.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var c=t.velocity.x,d=t.velocity.y,f=t.mass,p=e.velocity.x,g=e.velocity.y,v=e.mass,y=c*Math.cos(o)+d*Math.sin(o),m=c*Math.sin(o)-d*Math.cos(o),x=p*Math.cos(o)+g*Math.sin(o),b=p*Math.sin(o)-g*Math.cos(o),w=((f-v)*y+2*v*x)/(f+v),T=(2*f*y+(v-f)*x)/(f+v);return t.immovable||(t.velocity.x=(w*Math.cos(o)-m*Math.sin(o))*t.bounce.x,t.velocity.y=(m*Math.cos(o)+w*Math.sin(o))*t.bounce.y,c=t.velocity.x,d=t.velocity.y),e.immovable||(e.velocity.x=(T*Math.cos(o)-b*Math.sin(o))*e.bounce.x,e.velocity.y=(b*Math.cos(o)+T*Math.sin(o))*e.bounce.y,p=e.velocity.x,g=e.velocity.y),Math.abs(o)0&&!t.immovable&&p>c?t.velocity.x*=-1:p<0&&!e.immovable&&c0&&!t.immovable&&g>d?t.velocity.y*=-1:g<0&&!e.immovable&&dMath.PI/2&&(c<0&&!t.immovable&&p0&&!e.immovable&&c>p?e.velocity.x*=-1:d<0&&!t.immovable&&g0&&!e.immovable&&c>g&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.baseTileWidth){var f=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=f,l+=f}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p,v=e.getTilesWithinWorldXY(a,h,l,u);if(0===v.length)return!1;for(var y={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=(i(8),i(33)),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(162);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(45),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(344),o=i(345),a=i(350);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),l=i(899),u=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(36),r=i(352),o=i(23),a=i(19),h=i(75),l=i(322),u=i(353),c=i(45),d=i(97),f=i(101),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[l])return this.tilesets[l].setTileSize(i,n),this.tilesets[l].setSpacing(s,r),this.tilesets[l].setImage(h),this.tilesets[l];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var u=new f(t,o,i,n,s,r);return u.setImage(h),this.tilesets.push(u),u},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(102),h=i(4),l=i(156),u=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),S=[],A=l("value",f),C=c(p[0],"value",A.getEnd,A.getStart,m,g,v,T,x,b,w,!1,!1);C.start=d,C.current=d,C.to=f,S.push(C);var M=new u(t,S,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],P=u.TYPES,L=0;L0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(115),CameraManager:i(441)}},function(t,e,i){var n=i(115),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(37),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(37);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){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(46),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(126),o=i(34),a=i(503),h=i(504),l=i(507),u=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null};for(var n=0;n<=16;n++)this.blendModes.push({func:[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],equation:WebGLRenderingContext.FUNC_ADD});this.blendModes[1].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.DST_ALPHA],this.blendModes[2].func=[WebGLRenderingContext.DST_COLOR,WebGLRenderingContext.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[WebGLRenderingContext.ONE,WebGLRenderingContext.ONE_MINUS_SRC_COLOR],this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=null==l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null==o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this},deleteFramebuffer:function(t){return this},deleteProgram:function(t){return this},deleteBuffer:function(t){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;for(var n in t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT),i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){this.gl;var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;lthis.vertexCapacity&&this.flush();var b=this.renderer.config.resolution,w=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=r+a,C=o+h,M=m[0],E=m[1],_=m[2],P=m[3],L=d*M+f*_,k=d*E+f*P,F=p*M+g*_,R=p*E+g*P,O=v*M+y*_+m[4],B=v*E+y*P+m[5],D=r*L+o*F+O,I=r*k+o*R+B,Y=r*L+C*F+O,z=r*k+C*R+B,X=A*L+C*F+O,N=A*k+C*R+B,V=A*L+o*F+O,W=A*k+o*R+B,G=l.getTintAppendFloatAlphaAndSwap(u,c);x&&(D=(D*b|0)/b,I=(I*b|0)/b,Y=(Y*b|0)/b,z=(z*b|0)/b,X=(X*b|0)/b,N=(N*b|0)/b,V=(V*b|0)/b,W=(W*b|0)/b),w[S+0]=D,w[S+1]=I,T[S+2]=G,w[S+3]=Y,w[S+4]=z,T[S+5]=G,w[S+6]=X,w[S+7]=N,T[S+8]=G,w[S+9]=D,w[S+10]=I,T[S+11]=G,w[S+12]=X,w[S+13]=N,T[S+14]=G,w[S+15]=V,w[S+16]=W,T[S+17]=G,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();var T=this.renderer.config.resolution,S=this.vertexViewF32,A=this.vertexViewU32,C=this.vertexCount*this.vertexComponentCount,M=b[0],E=b[1],_=b[2],P=b[3],L=p*M+g*_,k=p*E+g*P,F=v*M+y*_,R=v*E+y*P,O=m*M+x*_+b[4],B=m*E+x*P+b[5],D=r*L+o*F+O,I=r*k+o*R+B,Y=a*L+h*F+O,z=a*k+h*R+B,X=u*L+c*F+O,N=u*k+c*R+B,V=l.getTintAppendFloatAlphaAndSwap(d,f);w&&(D=(D*T|0)/T,I=(I*T|0)/T,Y=(Y*T|0)/T,z=(z*T|0)/T,X=(X*T|0)/T,N=(N*T|0)/T),S[C+0]=D,S[C+1]=I,A[C+2]=V,S[C+3]=Y,S[C+4]=z,A[C+5]=V,S[C+6]=X,S[C+7]=N,A[C+8]=V,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,b,w){var T=this.tempTriangle;T[0].x=r,T[0].y=o,T[0].width=c,T[0].rgb=d,T[0].alpha=f,T[1].x=a,T[1].y=h,T[1].width=c,T[1].rgb=d,T[1].alpha=f,T[2].x=l,T[2].y=u,T[2].width=c,T[2].rgb=d,T[2].alpha=f,T[3].x=r,T[3].y=o,T[3].width=c,T[3].rgb=d,T[3].alpha=f,this.batchStrokePath(t,e,i,n,s,T,c,d,f,p,g,v,y,m,x,!1,b,w)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v,y){this.renderer.setPipeline(this);for(var m,x,b,w,T,S,A,C,M,E,_,P,L,k,F,R,O,B=this.renderer.config.resolution,D=o.length,I=this.polygonCache,Y=this.vertexViewF32,z=this.vertexViewU32,X=0,N=v[0],V=v[1],W=v[2],G=v[3],U=u*N+c*W,j=u*V+c*G,H=d*N+f*W,q=d*V+f*G,K=p*N+g*W+v[4],J=p*V+g*G+v[5],Z=l.getTintAppendFloatAlphaAndSwap(a,h),Q=0;Qthis.vertexCapacity&&this.flush(),X=this.vertexCount*this.vertexComponentCount,P=(S=I[b+0])*U+(A=I[b+1])*H+K,L=S*j+A*q+J,k=(C=I[w+0])*U+(M=I[w+1])*H+K,F=C*j+M*q+J,R=(E=I[T+0])*U+(_=I[T+1])*H+K,O=E*j+_*q+J,y&&(P=(P*B|0)/B,L=(L*B|0)/B,k=(k*B|0)/B,F=(F*B|0)/B,R=(R*B|0)/B,O=(O*B|0)/B),Y[X+0]=P,Y[X+1]=L,z[X+2]=Z,Y[X+3]=k,Y[X+4]=F,z[X+5]=Z,Y[X+6]=R,Y[X+7]=O,z[X+8]=Z,this.vertexCount+=3;I.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m){var x,b;this.renderer.setPipeline(this);for(var w,T,S,A,C=r.length,M=this.polygonCache,E=this.vertexViewF32,_=this.vertexViewU32,P=l.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=M[k-1]||M[F-1],T=M[k],E[(S=this.vertexCount*this.vertexComponentCount)+0]=w[6],E[S+1]=w[7],_[S+2]=P(w[8],h),E[S+3]=w[0],E[S+4]=w[1],_[S+5]=P(w[2],h),E[S+6]=T[9],E[S+7]=T[10],_[S+8]=P(T[11],h),E[S+9]=w[0],E[S+10]=w[1],_[S+11]=P(w[2],h),E[S+12]=w[6],E[S+13]=w[7],_[S+14]=P(w[8],h),E[S+15]=T[3],E[S+16]=T[4],_[S+17]=P(T[5],h),this.vertexCount+=6;M.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w,T){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var S=this.renderer.config.resolution,A=w[0],C=w[1],M=w[2],E=w[3],_=g*A+v*M,P=g*C+v*E,L=y*A+m*M,k=y*C+m*E,F=x*A+b*M+w[4],R=x*C+b*E+w[5],O=this.vertexViewF32,B=this.vertexViewU32,D=a-r,I=h-o,Y=Math.sqrt(D*D+I*I),z=u*(h-o)/Y,X=u*(r-a)/Y,N=c*(h-o)/Y,V=c*(r-a)/Y,W=a-N,G=h-V,U=r-z,j=o-X,H=a+N,q=h+V,K=r+z,J=o+X,Z=W*_+G*L+F,Q=W*P+G*k+R,$=U*_+j*L+F,tt=U*P+j*k+R,et=H*_+q*L+F,it=H*P+q*k+R,nt=K*_+J*L+F,st=K*P+J*k+R,rt=l.getTintAppendFloatAlphaAndSwap,ot=rt(d,p),at=rt(f,p),ht=this.vertexCount*this.vertexComponentCount;return T&&(Z=(Z*S|0)/S,Q=(Q*S|0)/S,$=($*S|0)/S,tt=(tt*S|0)/S,et=(et*S|0)/S,it=(it*S|0)/S,nt=(nt*S|0)/S,st=(st*S|0)/S),O[ht+0]=Z,O[ht+1]=Q,B[ht+2]=at,O[ht+3]=$,O[ht+4]=tt,B[ht+5]=ot,O[ht+6]=et,O[ht+7]=it,B[ht+8]=at,O[ht+9]=$,O[ht+10]=tt,B[ht+11]=ot,O[ht+12]=nt,O[ht+13]=st,B[ht+14]=ot,O[ht+15]=et,O[ht+16]=it,B[ht+17]=at,this.vertexCount+=6,[Z,Q,f,$,tt,d,et,it,f,nt,st,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i=e.scrollX*t.scrollFactorX,n=e.scrollY*t.scrollFactorY,r=t.x-i,o=t.y-n,a=t.scaleX,h=t.scaleY,l=-t.rotation,u=t.commandBuffer,y=1,m=1,x=0,b=0,w=1,T=e.matrix.matrix,S=null,A=0,C=0,M=0,E=0,_=0,P=0,L=0,k=0,F=0,R=null,O=Math.sin,B=Math.cos,D=O(l),I=B(l),Y=I*a,z=-D*a,X=D*h,N=I*h,V=r,W=o,G=T[0],U=T[1],j=T[2],H=T[3],q=Y*G+z*j,K=Y*U+z*H,J=X*G+N*j,Z=X*U+N*H,Q=V*G+W*j+T[4],$=V*U+W*H+T[5],tt=e.roundPixels;v.length=0;for(var et=0,it=u.length;et0){var nt=S.points[0],st=S.points[S.points.length-1];S.points.push(nt),S=new d(st.x,st.y,st.width,st.rgb,st.alpha),v.push(S)}break;case s.FILL_PATH:for(var rt=0,ot=v.length;rt=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,b=0;br&&(m=w-r),T>o&&(x=T-o),t.add(b,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,b=e.x,w=s-b,T=s-(g-f-b),S=e.y,A=r-S,C=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=l,E=l,_=0,P=e.sourceIndex,L=0;L0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(540),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(541),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(38),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(620),DynamicBitmapText:i(621),Graphics:i(622),Group:i(623),Image:i(624),Particles:i(625),PathFollower:i(626),Sprite3D:i(627),Sprite:i(628),StaticBitmapText:i(629),Text:i(630),TileSprite:i(631),Zone:i(632)},Creators:{Blitter:i(633),DynamicBitmapText:i(634),Graphics:i(635),Group:i(636),Image:i(637),Particles:i(638),Sprite3D:i(639),Sprite:i(640),StaticBitmapText:i(641),Text:i(642),TileSprite:i(643),Zone:i(644)}};n.Mesh=i(89),n.Quad=i(141),n.Factories.Mesh=i(648),n.Factories.Quad=i(649),n.Creators.Mesh=i(650),n.Creators.Quad=i(651),n.Light=i(290),i(291),i(652),t.exports=n},function(t,e,i){var n=i(0),s=i(87),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(t,e){var i=this._pendingRemoval.length,n=this._pendingInsertion.length;if(0!==i||0!==n){var s,r;for(s=0;s-1&&this._list.splice(o,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(545),s=i(546),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,b=0,w=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-l+e.frame.y),C.rotate(e.rotation),C.scale(e.scaleX,e.scaleY);for(var L=0;L0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode),t.currentAlpha;for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,l=0;l0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,b=0,w=0,T=0,S=0,A=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,P=a.cutY,L=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(564),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(567),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e,i){var n=this.x-t.x,s=this.y-t.y,r=n*n+s*s;if(0!==r){var o=Math.sqrt(r);r0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=i(0),s=(i(42),new n({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}}));t.exports=s},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(42),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i,n){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),l=i(280),u=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(36),r=i(43),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(609),s=i(610),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,b=y.canvasData,w=-m,T=-x;u.globalAlpha=v,u.save(),u.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),u.rotate(g.rotation),u.scale(g.scaleX,g.scaleY),u.drawImage(y.source.image,b.sx,b.sy,b.sWidth,b.sHeight,w,T,b.dWidth,b.dHeight),u.restore()}}u.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;e.resolution,t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(616),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){for(var i in void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(38);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(38);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(646),s=i(647),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(t,e,i,n){}},function(t,e,i){var n=i(89);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,key,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(89);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(654),n.Circumference=i(181),n.CircumferencePoint=i(105),n.Clone=i(655),n.Contains=i(32),n.ContainsPoint=i(656),n.ContainsRect=i(657),n.CopyFrom=i(658),n.Equals=i(659),n.GetBounds=i(660),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(661),n.OffsetPoint=i(662),n.Random=i(106),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(43);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(90),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(674),n.Clone=i(675),n.CopyFrom=i(676),n.Equals=i(677),n.GetMidPoint=i(678),n.GetNormal=i(679),n.GetPoint=i(300),n.GetPoints=i(109),n.Height=i(680),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(681),n.NormalY=i(682),n.Offset=i(683),n.PerpSlope=i(684),n.Random=i(111),n.ReflectAngle=i(685),n.Rotate=i(686),n.RotateAroundPoint=i(687),n.RotateAroundXY=i(143),n.SetToAngle=i(688),n.Slope=i(689),n.Width=i(690),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(692),n.Clone=i(693),n.CopyFrom=i(694),n.Equals=i(695),n.Floor=i(696),n.GetCentroid=i(697),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(698),n.Interpolate=i(699),n.Invert=i(700),n.Negative=i(701),n.Project=i(702),n.ProjectUnit=i(703),n.SetMagnitude=i(704),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(36);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var l=[];for(i=0;i1&&(this.sortGameObjects(l),this.topOnly&&l.splice(1)),this._drag[t.id]=l,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var u=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),u[0]?(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&u[0]&&(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(757),JustUp:i(758),DownDuration:i(759),UpDuration:i(760)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(782),Distance:i(790),Easing:i(793),Fuzzy:i(794),Interpolation:i(800),Pow2:i(803),Snap:i(805),Average:i(809),Bernstein:i(320),Between:i(226),CatmullRom:i(123),CeilTo:i(810),Clamp:i(60),DegToRad:i(36),Difference:i(811),Factorial:i(321),FloatBetween:i(273),FloorTo:i(812),FromPercent:i(64),GetSpeed:i(813),IsEven:i(814),IsEvenStrict:i(815),Linear:i(225),MaxAdd:i(816),MinSub:i(817),Percent:i(818),RadToDeg:i(216),RandomXY:i(819),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(113),RoundAwayFromZero:i(323),RoundTo:i(820),SinCosTableGenerator:i(821),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(822),Wrap:i(42),Vector2:i(6),Vector3:i(51),Vector4:i(120),Matrix3:i(208),Matrix4:i(119),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(783),BetweenY:i(784),BetweenPoints:i(785),BetweenPointsY:i(786),Reverse:i(787),RotateTo:i(788),ShortestBetween:i(789),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(806),Floor:i(807),To:i(808)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=l(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(u(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(839),s=i(841),r=i(335);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(842);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e,i){var n=i(846);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){t.exports={Acceleration:i(953),BodyScale:i(954),BodyType:i(955),Bounce:i(956),CheckAgainst:i(957),Collides:i(958),Debug:i(959),Friction:i(960),Gravity:i(961),Offset:i(962),SetGameObject:i(963),Velocity:i(964)}},function(t,e,i){var n={};t.exports=n;var s=i(95),r=i(39);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(852),r=i(362),o=i(96);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(95);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(149),r=(i(163),i(39));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(84),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this._queue=[]},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(86),BaseSoundManager:i(85),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(87),Map:i(114),ProcessQueue:i(332),RTree:i(333),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(97),Parsers:i(892),Formats:i(19),ImageCollection:i(347),ParseToTilemap:i(154),Tile:i(45),Tilemap:i(351),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(101),LayerData:i(75),MapData:i(76),ObjectLayer:i(349),DynamicTilemapLayer:i(352),StaticTilemapLayer:i(353)}},function(t,e,i){var n=i(15),s=i(35);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(44),s=i(35),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(101);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(o,1),r.destroy()}for(s=0;s=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(t){},check:function(t){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(t){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(952),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var b=Math.floor((e+v)/f);if((l>0||u===b||b<0||b>=p)&&(b=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,b,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var C=Math.floor((i+w)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+T;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),b=g/x,w=-p/x,T=y*b+m*w,S=b*T,A=w*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:b,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(932),r=i(933),o=i(934),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s}});t.exports=a},function(t,e,i){var n=i(0),s=i(847),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(847),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(847),r=i(38),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(929),s=i(0),r=i(337),o=i(930),a=i(13),h=i(1),l=i(72),u=i(61),c=i(966),d=i(19),f=i(338),p=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new u,this.gravity=h(e,"gravity",0),this.cellSize=h(e,"cellSize",64),this.collisionMap=new o,this.timeScale=h(e,"timeScale",1),this.maxStep=h(e,"maxStep",.05),this.enabled=!0,this.drawDebug=h(e,"debug",!1),this.debugGraphic;var i=h(e,"maxVelocity",100);if(this.defaults={debugShowBody:h(e,"debugShowBody",!0),debugShowVelocity:h(e,"debugShowVelocity",!0),bodyDebugColor:h(e,"debugBodyColor",16711935),velocityDebugColor:h(e,"debugVelocityColor",65280),maxVelocityX:h(e,"maxVelocityX",i),maxVelocityY:h(e,"maxVelocityY",i),minBounceVelocity:h(e,"minBounceVelocity",40),gravityFactor:h(e,"gravityFactor",1),bounciness:h(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=h(n,"x",0),r=h(n,"y",0),l=h(n,"width",t.sys.game.config.width),c=h(n,"height",t.sys.game.config.height),d=h(n,"thickness",64),f=h(n,"left",!0),p=h(n,"right",!0),g=h(n,"top",!0),v=h(n,"bottom",!0);this.setBounds(s,r,l,c,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var k=0;kA&&(A+=e.length),S=Number.MAX_VALUE,A3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);r(f(t,e-1),f(t,e),f(t,e+1))||function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lv.bounds.max.x||b.bounds.max.yv.bounds.max.y)){var w=e(i,b);if(!b.region||w.id!==b.region.id||r){x.broadphaseTests+=1,b.region&&!r||(b.region=w);var T=t(w,b.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=w.startCol&&d<=w.endCol&&f>=w.startRow&&f<=w.endRow,A=d>=b.region.startCol&&d<=b.region.endCol&&f>=b.region.startRow&&f<=b.region.endRow;!S&&A&&A&&p&&u(i,p,b),(b.region===w||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,b))}b.region=w,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}}()},function(t,e,i){var n={};t.exports=n;var s=i(362),r=i(39);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a1e3&&h.push(r);for(r=0;rf.friction*f.frictionStatic*O*i&&(D=k,B=o.clamp(f.friction*F*i,-D,D));var I=r.cross(A,y),Y=r.cross(C,y),z=b/(g.inverseMass+v.inverseMass+g.inverseInertia*I*I+v.inverseInertia*Y*Y);if(R*=z,B*=z,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+R,0),R=T.normalImpulse-X}if(L*L>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-D,D),B=T.tangentImpulse-N}s.x=y.x*R+m.x*B,s.y=y.y*R+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(855),r=i(339),o=i(944),a=i(943),h=i(984),l=i(942),u=i(162),c=i(149),d=i(163),f=i(39),p=i(59);!function(){n.create=function(t,e){e=(e=f.isElement(t)?e:t)||{},((t=f.isElement(t)?t:null)||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);return n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(n,s,l){s=s||1e3/60,l=l||1;var f,p=n.world,g=n.timing,v=n.broadphase,y=[];g.timestamp+=s*g.timeScale;var m={timestamp:g.timestamp};u.trigger(n,"beforeUpdate",m);var x=c.allBodies(p),b=c.allConstraints(p);for(h.reset(n.metrics),n.enableSleeping&&r.update(x,g.timeScale),e(x,p.gravity),i(x,s,g.timeScale,l,p.bounds),d.preSolveAll(x),f=0;f0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),c.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),c.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&d.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&d.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setZ(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return d.add(this.localWorld,o),o},add:function(t){return d.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return r.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return r.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(936),Image:i(939),Matter:i(853),MatterPhysics:i(986),PolyDecomp:i(937),Sprite:i(940),TileBody:i(850),World:i(946)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(182),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return t instanceof HTMLElement},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n>>0},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;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*g+x)*b,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,i,r,o){o=o||t.position;for(var a=0;a0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(121),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(494))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),l=i(37),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(37),o=i(6),a=i(119),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(647),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(38),o=i(59),a=i(95),h=i(94),l=i(937);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(38);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(34),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(97),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(343),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(344),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(342),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(98),TileToWorldXY:i(889),TileToWorldY:i(99),WeightedRandomize:i(890),WorldToTileX:i(39),WorldToTileXY:i(891),WorldToTileY:i(40)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||w-y||A>-m||S-y||T>-m||w-y||A>-m||S-v&&A*n+C*r+h>-y&&(A+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],l=n[4],u=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*u-a*l)*c,y=(r*l-s*u)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),b=this.zoom,w=this.scrollX,T=this.scrollY,S=t+(w*m-T*x)*b,A=e+(w*x+T*m)*b;return i.x=S*d+A*p+v,i.y=S*f+A*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;eu&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom,this.roundPixels&&(this._shakeOffsetX|=0,this._shakeOffsetY|=0))}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=l},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(118),r=i(204),o=i(205),a=i(206),h=i(61),l=i(81),u=i(6),c=i(51),d=i(119),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(83),r=i(527),o=i(528),a=i(231),h=i(252),l=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=l},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(544),h=i(545),l=i(546),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(549),s=i(552),r=i(0),o=i(12),a=i(130),h=i(2),l=i(86),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=u},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(553),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(114),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),l=i(4),u=i(16),c=i(565),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=l(e,"x",0),n=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(570),a=i(86),h=i(571),l=i(610),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h]+" ")}r0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(l[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(l[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(619),l=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){var u=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=u,this.setTexture(h,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,b=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(38);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(375),Call:i(376),GetFirst:i(377),GridAlign:i(378),IncAlpha:i(395),IncX:i(396),IncXY:i(397),IncY:i(398),PlaceOnCircle:i(399),PlaceOnEllipse:i(400),PlaceOnLine:i(401),PlaceOnRectangle:i(402),PlaceOnTriangle:i(403),PlayAnimation:i(404),RandomCircle:i(405),RandomEllipse:i(406),RandomLine:i(407),RandomRectangle:i(408),RandomTriangle:i(409),Rotate:i(410),RotateAround:i(411),RotateAroundDistance:i(412),ScaleX:i(413),ScaleXY:i(414),ScaleY:i(415),SetAlpha:i(416),SetBlendMode:i(417),SetDepth:i(418),SetHitArea:i(419),SetOrigin:i(420),SetRotation:i(421),SetScale:i(422),SetScaleX:i(423),SetScaleY:i(424),SetTint:i(425),SetVisible:i(426),SetX:i(427),SetXY:i(428),SetY:i(429),ShiftPosition:i(430),Shuffle:i(431),SmootherStep:i(432),SmoothStep:i(433),Spread:i(434),ToggleVisible:i(435)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(46),r=i(25),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(46),r=i(49);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(47),s=i(48);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(49),s=i(26),r=i(48),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(28),r=i(48),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(30),r=i(47),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=l[0],l[0].prevFrame=o;var v=1/(l.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(113),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(118),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,w=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,_=c*m-p*g,E=d*y-f*v,P=d*m-p*v,L=f*m-p*y,k=x*L-b*P+w*E+T*_-S*M+A*C;return k?(k=1/k,i[0]=(h*L-l*P+u*E)*k,i[1]=(l*_-a*L-u*M)*k,i[2]=(a*P-h*_+u*C)*k,i[3]=(r*P-s*L-o*E)*k,i[4]=(n*L-r*_+o*M)*k,i[5]=(s*_-n*P-o*C)*k,i[6]=(v*A-y*S+m*T)*k,i[7]=(y*w-g*A-m*b)*k,i[8]=(g*S-v*w+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(484)(t))},function(t,e,i){var n=i(116);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l={r:i=Math.floor(i*=255),g:i,b:i,color:0},u=s%6;return 0===u?(l.g=h,l.b=o):1===u?(l.r=a,l.b=o):2===u?(l.r=o,l.b=h):3===u?(l.r=o,l.g=a):4===u?(l.r=h,l.g=o):5===u&&(l.g=o,l.b=a),l.color=n(l.r,l.g,l.b),l}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=w(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h,l,u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&(l=c,(h=u).next.i!==l.i&&h.prev.i!==l.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,l)&&x(h,l)&&x(l,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,l))){var d=b(u,c);return u=r(u,u.next),d=r(d,d.next),o(u,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}u=u.next}while(u!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function w(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(512),r=i(236),o=new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,o=t.lights.cull(e),a=Math.min(o.length,10),h=e.matrix,l={x:0,y:0},u=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(a<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,l=0,u=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(u.texture,0),n.drawArrays(o,u.first,l)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setTexture2D(s.source.glTexture,0),n.setPipeline(this),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,a=(o.config.resolution,this.maxQuads),h=e.scrollX,l=e.scrollY,u=e.matrix.matrix,c=u[0],d=u[1],f=u[2],p=u[3],g=u[4],v=u[5],y=Math.sin,m=Math.cos,x=this.vertexComponentCount,b=this.vertexCapacity,w=t.defaultFrame.source.glTexture;this.setTexture2D(w,0);for(var T=0;T=b&&(this.flush(),this.setTexture2D(w,0));for(var L=0;L=b&&(this.flush(),this.setTexture2D(w,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=(this.renderer.config.resolution,t.getRenderList()),o=r.length,h=e.matrix.matrix,l=h[0],u=h[1],c=h[2],d=h[3],f=h[4],p=h[5],g=e.scrollX*t.scrollFactorX,v=e.scrollY*t.scrollFactorY,y=Math.ceil(o/this.maxQuads),m=0,x=t.x-g,b=t.y-v,w=0;w=this.vertexCapacity&&this.flush()}m+=T,o-=T,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=(this.renderer.config.resolution,e.matrix.matrix),h=t.frame,l=h.texture.source[h.sourceIndex].glTexture,u=!!l.isRenderTexture,c=t.flipX,d=t.flipY^u,f=h.uvs,p=h.width*(c?-1:1),g=h.height*(d?-1:1),v=-t.displayOriginX+h.x+h.width*(c?1:0),y=-t.displayOriginY+h.y+h.height*(d?1:0),m=v+p,x=y+g,b=t.x-e.scrollX*t.scrollFactorX,w=t.y-e.scrollY*t.scrollFactorY,T=t.scaleX,S=t.scaleY,A=-t.rotation,C=t._alphaTL,M=t._alphaTR,_=t._alphaBL,E=t._alphaBR,P=t._tintTL,L=t._tintTR,k=t._tintBL,F=t._tintBR,O=Math.sin(A),R=Math.cos(A),B=R*T,D=-O*T,I=O*S,Y=R*S,z=b,X=w,N=o[0],V=o[1],W=o[2],G=o[3],U=B*N+D*W,j=B*V+D*G,H=I*N+Y*W,q=I*V+Y*G,K=z*N+X*W+o[4],J=z*V+X*G+o[5],Z=v*U+y*H+K,Q=v*j+y*q+J,$=v*U+x*H+K,tt=v*j+x*q+J,et=m*U+x*H+K,it=m*j+x*q+J,nt=m*U+y*H+K,st=m*j+y*q+J,rt=n(P,C),ot=n(L,M),at=n(k,_),ht=n(F,E);this.setTexture2D(l,0),s[(i=this.vertexCount*this.vertexComponentCount)+0]=Z,s[i+1]=Q,s[i+2]=f.x0,s[i+3]=f.y0,r[i+4]=rt,s[i+5]=$,s[i+6]=tt,s[i+7]=f.x1,s[i+8]=f.y1,r[i+9]=at,s[i+10]=et,s[i+11]=it,s[i+12]=f.x2,s[i+13]=f.y2,r[i+14]=ht,s[i+15]=Z,s[i+16]=Q,s[i+17]=f.x0,s[i+18]=f.y0,r[i+19]=rt,s[i+20]=et,s[i+21]=it,s[i+22]=f.x2,s[i+23]=f.y2,r[i+24]=ht,s[i+25]=nt,s[i+26]=st,s[i+27]=f.x3,s[i+28]=f.y3,r[i+29]=ot,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,l=t.alphas,u=this.vertexViewF32,c=this.vertexViewU32,d=(this.renderer.config.resolution,e.matrix.matrix),f=t.frame,p=t.texture.source[f.sourceIndex].glTexture,g=t.x-e.scrollX*t.scrollFactorX,v=t.y-e.scrollY*t.scrollFactorY,y=t.scaleX,m=t.scaleY,x=-t.rotation,b=Math.sin(x),w=Math.cos(x),T=w*y,S=-b*y,A=b*m,C=w*m,M=g,_=v,E=d[0],P=d[1],L=d[2],k=d[3],F=T*E+S*L,O=T*P+S*k,R=A*E+C*L,B=A*P+C*k,D=M*E+_*L+d[4],I=M*P+_*k+d[5],Y=0;this.setTexture2D(p,0),Y=this.vertexCount*this.vertexComponentCount;for(var z=0,X=0;zthis.vertexCapacity&&this.flush();var i,n,s,r,o,h,l,u,c=t.text,d=c.length,f=a.getTintAppendFloatAlpha,p=this.vertexViewF32,g=this.vertexViewU32,v=(this.renderer.config.resolution,e.matrix.matrix),y=e.width+50,m=e.height+50,x=t.frame,b=t.texture.source[x.sourceIndex],w=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,S=t.fontData,A=S.lineHeight,C=t.fontSize/S.size,M=S.chars,_=t.alpha,E=f(t._tintTL,_),P=f(t._tintTR,_),L=f(t._tintBL,_),k=f(t._tintBR,_),F=t.x,O=t.y,R=x.cutX,B=x.cutY,D=b.width,I=b.height,Y=b.glTexture,z=0,X=0,N=0,V=0,W=null,G=0,U=0,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=null,nt=0,st=F-w+x.x,rt=O-T+x.y,ot=-t.rotation,at=t.scaleX,ht=t.scaleY,lt=Math.sin(ot),ut=Math.cos(ot),ct=ut*at,dt=-lt*at,ft=lt*ht,pt=ut*ht,gt=st,vt=rt,yt=v[0],mt=v[1],xt=v[2],bt=v[3],wt=ct*yt+dt*xt,Tt=ct*mt+dt*bt,St=ft*yt+pt*xt,At=ft*mt+pt*bt,Ct=gt*yt+vt*xt+v[4],Mt=gt*mt+vt*bt+v[5],_t=0;this.setTexture2D(Y,0);for(var Et=0;Ety||n<-50||n>m)&&(s<-50||s>y||r<-50||r>m)&&(o<-50||o>y||h<-50||h>m)&&(l<-50||l>y||u<-50||u>m)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),p[(_t=this.vertexCount*this.vertexComponentCount)+0]=i,p[_t+1]=n,p[_t+2]=Q,p[_t+3]=tt,g[_t+4]=E,p[_t+5]=s,p[_t+6]=r,p[_t+7]=Q,p[_t+8]=et,g[_t+9]=L,p[_t+10]=o,p[_t+11]=h,p[_t+12]=$,p[_t+13]=et,g[_t+14]=k,p[_t+15]=i,p[_t+16]=n,p[_t+17]=Q,p[_t+18]=tt,g[_t+19]=E,p[_t+20]=o,p[_t+21]=h,p[_t+22]=$,p[_t+23]=et,g[_t+24]=k,p[_t+25]=l,p[_t+26]=u,p[_t+27]=$,p[_t+28]=tt,g[_t+29]=P,this.vertexCount+=6))}}else z=0,N=0,X+=A,it=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,l,u,c,d,f,p,g,v,y=t.displayCallback,m=t.text,x=m.length,b=a.getTintAppendFloatAlpha,w=this.vertexViewF32,T=this.vertexViewU32,S=this.renderer,A=(S.config.resolution,e.matrix.matrix),C=t.frame,M=t.texture.source[C.sourceIndex],_=e.scrollX*t.scrollFactorX,E=e.scrollY*t.scrollFactorY,P=t.scrollX,L=t.scrollY,k=t.fontData,F=k.lineHeight,O=t.fontSize/k.size,R=k.chars,B=t.alpha,D=b(t._tintTL,B),I=b(t._tintTR,B),Y=b(t._tintBL,B),z=b(t._tintBR,B),X=t.x,N=t.y,V=C.cutX,W=C.cutY,G=M.width,U=M.height,j=M.glTexture,H=0,q=0,K=0,J=0,Z=null,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,lt=0,ut=null,ct=0,dt=X+C.x,ft=N+C.y,pt=-t.rotation,gt=t.scaleX,vt=t.scaleY,yt=Math.sin(pt),mt=Math.cos(pt),xt=mt*gt,bt=-yt*gt,wt=yt*vt,Tt=mt*vt,St=dt,At=ft,Ct=A[0],Mt=A[1],_t=A[2],Et=A[3],Pt=xt*Ct+bt*_t,Lt=xt*Mt+bt*Et,kt=wt*Ct+Tt*_t,Ft=wt*Mt+Tt*Et,Ot=St*Ct+At*_t+A[4],Rt=St*Mt+At*Et+A[5],Bt=t.cropWidth>0||t.cropHeight>0,Dt=0;this.setTexture2D(j,0),Bt&&S.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var It=0;Itthis.vertexCapacity&&this.flush(),w[(Dt=this.vertexCount*this.vertexComponentCount)+0]=i,w[Dt+1]=n,w[Dt+2]=ot,w[Dt+3]=ht,T[Dt+4]=D,w[Dt+5]=s,w[Dt+6]=r,w[Dt+7]=ot,w[Dt+8]=lt,T[Dt+9]=Y,w[Dt+10]=o,w[Dt+11]=h,w[Dt+12]=at,w[Dt+13]=lt,T[Dt+14]=z,w[Dt+15]=i,w[Dt+16]=n,w[Dt+17]=ot,w[Dt+18]=ht,T[Dt+19]=D,w[Dt+20]=o,w[Dt+21]=h,w[Dt+22]=at,w[Dt+23]=lt,T[Dt+24]=z,w[Dt+25]=l,w[Dt+26]=u,w[Dt+27]=at,w[Dt+28]=ht,T[Dt+29]=I,this.vertexCount+=6}}}else H=0,K=0,q+=F,ut=null;Bt&&S.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,l=t.alpha,u=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,u=-u;var E,P=this.vertexViewF32,L=this.vertexViewU32,k=(this.renderer.config.resolution,_.matrix.matrix),F=o*(c?1:0)-g,O=a*(d?1:0)-v,R=F+o*(c?-1:1),B=O+a*(d?-1:1),D=s-_.scrollX*f,I=r-_.scrollY*p,Y=Math.sin(u),z=Math.cos(u),X=z*h,N=-Y*h,V=Y*l,W=z*l,G=D,U=I,j=k[0],H=k[1],q=k[2],K=k[3],J=X*j+N*q,Z=X*H+N*K,Q=V*j+W*q,$=V*H+W*K,tt=G*j+U*q+k[4],et=G*H+U*K+k[5],it=F*J+O*Q+tt,nt=F*Z+O*$+et,st=F*J+B*Q+tt,rt=F*Z+B*$+et,ot=R*J+B*Q+tt,at=R*Z+B*$+et,ht=R*J+O*Q+tt,lt=R*Z+O*$+et,ut=y/i+C,ct=m/n+M,dt=(y+x)/i+C,ft=(m+b)/n+M;this.setTexture2D(e,0),P[(E=this.vertexCount*this.vertexComponentCount)+0]=it,P[E+1]=nt,P[E+2]=ut,P[E+3]=ct,L[E+4]=w,P[E+5]=st,P[E+6]=rt,P[E+7]=ut,P[E+8]=ft,L[E+9]=T,P[E+10]=ot,P[E+11]=at,P[E+12]=dt,P[E+13]=ft,L[E+14]=S,P[E+15]=it,P[E+16]=nt,P[E+17]=ut,P[E+18]=ct,L[E+19]=w,P[E+20]=ot,P[E+21]=at,P[E+22]=dt,P[E+23]=ft,L[E+24]=S,P[E+25]=ht,P[E+26]=lt,P[E+27]=dt,P[E+28]=ct,L[E+29]=A,this.vertexCount+=6},batchGraphics:function(){}});t.exports=l},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),l=i(8),u=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new u(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new l,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=0;u0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(524),l=i(525),u=i(526),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(83),s=i(4),r=i(529),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(84),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(84),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(84),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context?this.context.suspend():this.context.close(),this.context=null,s.prototype.destroy.call(this)}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var S=y+g-s,A=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,u=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,b=0,w=1,T=0,S=0,A=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(u-h,c-l),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,S=(65280&x)>>>8,A=255&x,v.strokeStyle="rgba("+T+","+S+","+A+","+y+")",v.lineWidth=w,C+=3;break;case n.FILL_STYLE:b=g[C+1],m=g[C+2],T=(16711680&b)>>>16,S=(65280&b)>>>8,A=255&b,v.fillStyle="rgba("+T+","+S+","+A+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(42),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(655),Ellipse:i(267),Intersects:i(293),Line:i(675),Point:i(693),Polygon:i(707),Rectangle:i(305),Triangle:i(736)}},function(t,e,i){t.exports={CircleToCircle:i(665),CircleToRectangle:i(666),GetRectangleIntersection:i(667),LineToCircle:i(295),LineToLine:i(89),LineToRectangle:i(668),PointToLine:i(296),PointToLineSegment:i(669),RectangleToRectangle:i(294),RectangleToTriangle:i(670),RectangleToValues:i(671),TriangleToCircle:i(672),TriangleToLine:i(673),TriangleToTriangle:i(674)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(50),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),l=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});l.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return null;var u=l.findAudioURL(r,i);return u?!a.webAudio||o&&o.disableWebAudio?new h(e,u,t.path,n,r.sound.locked):new l(e,u,t.path,s,r.sound.context):null},o.register("audio",function(t,e,i,n){var s=l.create(this,t,e,i,n);return s&&this.addFile(s),this}),l.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(91),r=i(0),o=i(58),a=i(327),h=i(328),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=l},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(827),Angular:i(828),Bounce:i(829),Debug:i(830),Drag:i(831),Enable:i(832),Friction:i(833),Gravity:i(834),Immovable:i(835),Mass:i(836),Size:i(837),Velocity:i(838)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(d.x,d.y,l.right,l.y)-d.radius):d.y>l.bottom&&(d.xl.right&&(a=h(d.x,d.y,l.right,l.bottom)-d.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),b=f*Math.sin(o)-p*Math.cos(o),w=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),S=((g-m)*x+2*m*w)/(g+m),A=(2*g*x+(m-g)*w)/(g+m);return t.immovable||(t.velocity.x=(S*Math.cos(o)-b*Math.sin(o))*t.bounce.x,t.velocity.y=(b*Math.cos(o)+S*Math.sin(o))*t.bounce.y,f=t.velocity.x,p=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+A*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,g=e.getTilesWithinWorldXY(a,h,l,u);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(33),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(162);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(44),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(346),o=i(347),a=i(352);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),l=i(899),u=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(35),r=i(354),o=i(23),a=i(19),h=i(75),l=i(322),u=i(355),c=i(44),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[l])return this.tilesets[l].setTileSize(i,n),this.tilesets[l].setSpacing(s,r),this.tilesets[l].setImage(h),this.tilesets[l];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var u=new f(t,o,i,n,s,r);return u.setImage(h),this.tilesets.push(u),u},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),l=i(156),u=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),S=[],A=l("value",f),C=c(p[0],"value",A.getEnd,A.getStart,m,g,v,T,x,b,w,!1,!1);C.start=d,C.current=d,C.to=f,S.push(C);var M=new u(t,S,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var _=h(e,"callbackScope",M),E=[M,null],P=u.TYPES,L=0;L0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(114),CameraManager:i(443)}},function(t,e,i){var n=i(114),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(45),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(125),o=i(42),a=i(505),h=i(506),l=i(509),u=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=void 0===l||null===l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(){return this},deleteFramebuffer:function(){return this},deleteProgram:function(){return this},deleteBuffer:function(){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;lthis.vertexCapacity&&this.flush();this.renderer.config.resolution;var x=this.vertexViewF32,b=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=m[0],C=m[1],M=m[2],_=m[3],E=d*A+f*M,P=d*C+f*_,L=p*A+g*M,k=p*C+g*_,F=v*A+y*M+m[4],O=v*C+y*_+m[5],R=r*E+o*L+F,B=r*P+o*k+O,D=r*E+S*L+F,I=r*P+S*k+O,Y=T*E+S*L+F,z=T*P+S*k+O,X=T*E+o*L+F,N=T*P+o*k+O,V=l.getTintAppendFloatAlphaAndSwap(u,c);x[w+0]=R,x[w+1]=B,b[w+2]=V,x[w+3]=D,x[w+4]=I,b[w+5]=V,x[w+6]=Y,x[w+7]=z,b[w+8]=V,x[w+9]=R,x[w+10]=B,b[w+11]=V,x[w+12]=Y,x[w+13]=z,b[w+14]=V,x[w+15]=X,x[w+16]=N,b[w+17]=V,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var w=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=b[0],C=b[1],M=b[2],_=b[3],E=p*A+g*M,P=p*C+g*_,L=v*A+y*M,k=v*C+y*_,F=m*A+x*M+b[4],O=m*C+x*_+b[5],R=r*E+o*L+F,B=r*P+o*k+O,D=a*E+h*L+F,I=a*P+h*k+O,Y=u*E+c*L+F,z=u*P+c*k+O,X=l.getTintAppendFloatAlphaAndSwap(d,f);w[S+0]=R,w[S+1]=B,T[S+2]=X,w[S+3]=D,w[S+4]=I,T[S+5]=X,w[S+6]=Y,w[S+7]=z,T[S+8]=X,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,b){var w=this.tempTriangle;w[0].x=r,w[0].y=o,w[0].width=c,w[0].rgb=d,w[0].alpha=f,w[1].x=a,w[1].y=h,w[1].width=c,w[1].rgb=d,w[1].alpha=f,w[2].x=l,w[2].y=u,w[2].width=c,w[2].rgb=d,w[2].alpha=f,w[3].x=r,w[3].y=o,w[3].width=c,w[3].rgb=d,w[3].alpha=f,this.batchStrokePath(t,e,i,n,s,w,c,d,f,p,g,v,y,m,x,!1,b)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v){this.renderer.setPipeline(this);this.renderer.config.resolution;for(var y,m,x,b,w,T,S,A,C,M,_,E,P,L,k,F,O,R=o.length,B=this.polygonCache,D=this.vertexViewF32,I=this.vertexViewU32,Y=0,z=v[0],X=v[1],N=v[2],V=v[3],W=u*z+c*N,G=u*X+c*V,U=d*z+f*N,j=d*X+f*V,H=p*z+g*N+v[4],q=p*X+g*V+v[5],K=l.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,E=(T=B[x+0])*W+(S=B[x+1])*U+H,P=T*G+S*j+q,L=(A=B[b+0])*W+(C=B[b+1])*U+H,k=A*G+C*j+q,F=(M=B[w+0])*W+(_=B[w+1])*U+H,O=M*G+_*j+q,D[Y+0]=E,D[Y+1]=P,I[Y+2]=K,D[Y+3]=L,D[Y+4]=k,I[Y+5]=K,D[Y+6]=F,D[Y+7]=O,I[Y+8]=K,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var b,w,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,_=this.vertexViewU32,E=l.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),b=C[L-1]||C[k-1],w=C[L],M[(T=this.vertexCount*this.vertexComponentCount)+0]=b[6],M[T+1]=b[7],_[T+2]=E(b[8],h),M[T+3]=b[0],M[T+4]=b[1],_[T+5]=E(b[2],h),M[T+6]=w[9],M[T+7]=w[10],_[T+8]=E(w[11],h),M[T+9]=b[0],M[T+10]=b[1],_[T+11]=E(b[2],h),M[T+12]=b[6],M[T+13]=b[7],_[T+14]=E(b[8],h),M[T+15]=w[3],M[T+16]=w[4],_[T+17]=E(w[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var T=w[0],S=w[1],A=w[2],C=w[3],M=g*T+v*A,_=g*S+v*C,E=y*T+m*A,P=y*S+m*C,L=x*T+b*A+w[4],k=x*S+b*C+w[5],F=this.vertexViewF32,O=this.vertexViewU32,R=a-r,B=h-o,D=Math.sqrt(R*R+B*B),I=u*(h-o)/D,Y=u*(r-a)/D,z=c*(h-o)/D,X=c*(r-a)/D,N=a-z,V=h-X,W=r-I,G=o-Y,U=a+z,j=h+X,H=r+I,q=o+Y,K=N*M+V*E+L,J=N*_+V*P+k,Z=W*M+G*E+L,Q=W*_+G*P+k,$=U*M+j*E+L,tt=U*_+j*P+k,et=H*M+q*E+L,it=H*_+q*P+k,nt=l.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return F[ot+0]=K,F[ot+1]=J,O[ot+2]=rt,F[ot+3]=Z,F[ot+4]=Q,O[ot+5]=st,F[ot+6]=$,F[ot+7]=tt,O[ot+8]=rt,F[ot+9]=Z,F[ot+10]=Q,O[ot+11]=st,F[ot+12]=et,F[ot+13]=it,O[ot+14]=st,F[ot+15]=$,F[ot+16]=tt,O[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i,n,r=e.scrollX*t.scrollFactorX,o=e.scrollY*t.scrollFactorY,a=t.x-r,h=t.y-o,l=t.scaleX,u=t.scaleY,y=-t.rotation,m=t.commandBuffer,x=1,b=1,w=0,T=0,S=1,A=e.matrix.matrix,C=null,M=0,_=0,E=0,P=0,L=0,k=0,F=0,O=0,R=0,B=null,D=Math.sin,I=Math.cos,Y=D(y),z=I(y),X=z*l,N=-Y*l,V=Y*u,W=z*u,G=a,U=h,j=A[0],H=A[1],q=A[2],K=A[3],J=X*j+N*q,Z=X*H+N*K,Q=V*j+W*q,$=V*H+W*K,tt=G*j+U*q+A[4],et=G*H+U*K+A[5];v.length=0;for(var it=0,nt=m.length;it0){var st=C.points[0],rt=C.points[C.points.length-1];C.points.push(st),C=new d(rt.x,rt.y,rt.width,rt.rgb,rt.alpha),v.push(C)}break;case s.FILL_PATH:for(i=0,n=v.length;i=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,b=0;br&&(m=w-r),T>o&&(x=T-o),t.add(b,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,b=e.x,w=s-b,T=s-(g-f-b),S=e.y,A=r-S,C=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=l,_=l,E=0,P=e.sourceIndex,L=0;L0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(542),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(543),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(37),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(622),DynamicBitmapText:i(623),Graphics:i(624),Group:i(625),Image:i(626),Particles:i(627),PathFollower:i(628),Sprite3D:i(629),Sprite:i(630),StaticBitmapText:i(631),Text:i(632),TileSprite:i(633),Zone:i(634)},Creators:{Blitter:i(635),DynamicBitmapText:i(636),Graphics:i(637),Group:i(638),Image:i(639),Particles:i(640),Sprite3D:i(641),Sprite:i(642),StaticBitmapText:i(643),Text:i(644),TileSprite:i(645),Zone:i(646)}};n.Mesh=i(88),n.Quad=i(141),n.Factories.Mesh=i(650),n.Factories.Quad=i(651),n.Creators.Mesh=i(652),n.Creators.Quad=i(653),n.Light=i(290),i(291),i(654),t.exports=n},function(t,e,i){var n=i(0),s=i(86),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(547),s=i(548),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,b=0,w=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,_=a.cutX,E=a.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-l+e.frame.y),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var L=0;L0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode);for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,l=0;l0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,b=0,w=0,T=0,S=0,A=null,C=0,M=t.currentContext,_=e.frame.source.image,E=a.cutX,P=a.cutY,L=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.translate(-e.displayOriginX,-e.displayOriginY),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(568),s=i(569),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(50),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),l=i(280),u=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(41),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(611),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,b=y.canvasData,w=-m,T=-x;u.globalAlpha=v,u.save(),u.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),u.rotate(g.rotation),u.scale(g.scaleX,g.scaleY),u.drawImage(y.source.image,b.sx,b.sy,b.sWidth,b.sHeight,w,T,b.dWidth,b.dHeight),u.restore()}}u.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(615),s=i(616),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(618),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(648),s=i(649),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(656),n.Circumference=i(181),n.CircumferencePoint=i(104),n.Clone=i(657),n.Contains=i(32),n.ContainsPoint=i(658),n.ContainsRect=i(659),n.CopyFrom=i(660),n.Equals=i(661),n.GetBounds=i(662),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(663),n.OffsetPoint=i(664),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(41);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(676),n.Clone=i(677),n.CopyFrom=i(678),n.Equals=i(679),n.GetMidPoint=i(680),n.GetNormal=i(681),n.GetPoint=i(300),n.GetPoints=i(108),n.Height=i(682),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(683),n.NormalY=i(684),n.Offset=i(685),n.PerpSlope=i(686),n.Random=i(110),n.ReflectAngle=i(687),n.Rotate=i(688),n.RotateAroundPoint=i(689),n.RotateAroundXY=i(143),n.SetToAngle=i(690),n.Slope=i(691),n.Width=i(692),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(694),n.Clone=i(695),n.CopyFrom=i(696),n.Equals=i(697),n.Floor=i(698),n.GetCentroid=i(699),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(700),n.Interpolate=i(701),n.Invert=i(702),n.Negative=i(703),n.Project=i(704),n.ProjectUnit=i(705),n.SetMagnitude=i(706),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var l=[];for(i=0;i1&&(this.sortGameObjects(l),this.topOnly&&l.splice(1)),this._drag[t.id]=l,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var u=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),u[0]?(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&u[0]&&(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(759),JustUp:i(760),DownDuration:i(761),UpDuration:i(762)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(784),Distance:i(792),Easing:i(795),Fuzzy:i(796),Interpolation:i(802),Pow2:i(805),Snap:i(807),Average:i(811),Bernstein:i(320),Between:i(226),CatmullRom:i(122),CeilTo:i(812),Clamp:i(60),DegToRad:i(35),Difference:i(813),Factorial:i(321),FloatBetween:i(273),FloorTo:i(814),FromPercent:i(64),GetSpeed:i(815),IsEven:i(816),IsEvenStrict:i(817),Linear:i(225),MaxAdd:i(818),MinSub:i(819),Percent:i(820),RadToDeg:i(216),RandomXY:i(821),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(112),RoundAwayFromZero:i(323),RoundTo:i(822),SinCosTableGenerator:i(823),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(824),Wrap:i(50),Vector2:i(6),Vector3:i(51),Vector4:i(119),Matrix3:i(208),Matrix4:i(118),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(785),BetweenY:i(786),BetweenPoints:i(787),BetweenPointsY:i(788),Reverse:i(789),RotateTo:i(790),ShortestBetween:i(791),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(808),Floor:i(809),To:i(810)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=l(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(u(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(841),s=i(843),r=i(337);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(332);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(333);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={Acceleration:i(953),BodyScale:i(954),BodyType:i(955),Bounce:i(956),CheckAgainst:i(957),Collides:i(958),Debug:i(959),Friction:i(960),Gravity:i(961),Offset:i(962),SetGameObject:i(963),Velocity:i(964)}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(38);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(852),r=i(364),o=i(95);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(94);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(149),r=(i(163),i(38));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(83),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(85),BaseSoundManager:i(84),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(86),Map:i(113),ProcessQueue:i(334),RTree:i(335),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(892),Formats:i(19),ImageCollection:i(349),ParseToTilemap:i(154),Tile:i(44),Tilemap:i(353),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(351),DynamicTilemapLayer:i(354),StaticTilemapLayer:i(355)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(43),s=i(34),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(952),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var b=Math.floor((e+v)/f);if((l>0||u===b||b<0||b>=p)&&(b=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,b,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var C=Math.floor((i+w)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+T;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),b=g/x,w=-p/x,T=y*b+m*w,S=b*T,A=w*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:b,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(932),r=i(933),o=i(934),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s}});t.exports=a},function(t,e,i){var n=i(0),s=i(847),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(847),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(847),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(929),s=i(0),r=i(339),o=i(930),a=i(13),h=i(1),l=i(72),u=i(61),c=i(966),d=i(19),f=i(340),p=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new u,this.gravity=h(e,"gravity",0),this.cellSize=h(e,"cellSize",64),this.collisionMap=new o,this.timeScale=h(e,"timeScale",1),this.maxStep=h(e,"maxStep",.05),this.enabled=!0,this.drawDebug=h(e,"debug",!1),this.debugGraphic;var i=h(e,"maxVelocity",100);if(this.defaults={debugShowBody:h(e,"debugShowBody",!0),debugShowVelocity:h(e,"debugShowVelocity",!0),bodyDebugColor:h(e,"debugBodyColor",16711935),velocityDebugColor:h(e,"debugVelocityColor",65280),maxVelocityX:h(e,"maxVelocityX",i),maxVelocityY:h(e,"maxVelocityY",i),minBounceVelocity:h(e,"minBounceVelocity",40),gravityFactor:h(e,"gravityFactor",1),bounciness:h(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=h(n,"x",0),r=h(n,"y",0),l=h(n,"width",t.sys.game.config.width),c=h(n,"height",t.sys.game.config.height),d=h(n,"thickness",64),f=h(n,"left",!0),p=h(n,"right",!0),g=h(n,"top",!0),v=h(n,"bottom",!0);this.setBounds(s,r,l,c,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var k=0;kA&&(A+=e.length),S=Number.MAX_VALUE,A3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);r(f(t,e-1),f(t,e),f(t,e+1))||function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lv.bounds.max.x||b.bounds.max.yv.bounds.max.y)){var w=e(i,b);if(!b.region||w.id!==b.region.id||r){x.broadphaseTests+=1,b.region&&!r||(b.region=w);var T=t(w,b.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=w.startCol&&d<=w.endCol&&f>=w.startRow&&f<=w.endRow,A=d>=b.region.startCol&&d<=b.region.endCol&&f>=b.region.startRow&&f<=b.region.endRow;!S&&A&&A&&p&&u(i,p,b),(b.region===w||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,b))}b.region=w,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}}()},function(t,e,i){var n={};t.exports=n;var s=i(364),r=i(38);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a1e3&&h.push(r);for(r=0;rf.friction*f.frictionStatic*R*i&&(D=k,B=o.clamp(f.friction*F*i,-D,D));var I=r.cross(A,y),Y=r.cross(C,y),z=b/(g.inverseMass+v.inverseMass+g.inverseInertia*I*I+v.inverseInertia*Y*Y);if(O*=z,B*=z,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+O,0),O=T.normalImpulse-X}if(L*L>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-D,D),B=T.tangentImpulse-N}s.x=y.x*O+m.x*B,s.y=y.y*O+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(855),r=i(341),o=i(944),a=i(943),h=i(984),l=i(942),u=i(162),c=i(149),d=i(163),f=i(38),p=i(59);!function(){n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);return n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(n,s,l){s=s||1e3/60,l=l||1;var f,p=n.world,g=n.timing,v=n.broadphase,y=[];g.timestamp+=s*g.timeScale;var m={timestamp:g.timestamp};u.trigger(n,"beforeUpdate",m);var x=c.allBodies(p),b=c.allConstraints(p);for(h.reset(n.metrics),n.enableSleeping&&r.update(x,g.timeScale),e(x,p.gravity),i(x,s,g.timeScale,l,p.bounds),d.preSolveAll(x),f=0;f0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),c.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),c.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&d.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&d.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setZ(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return d.add(this.localWorld,o),o},add:function(t){return d.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return r.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return r.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(936),Image:i(939),Matter:i(853),MatterPhysics:i(986),PolyDecomp:i(937),Sprite:i(940),TileBody:i(850),World:i(946)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y (http://www.photonstorm.com)", "logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png", diff --git a/src/const.js b/src/const.js index 6668d88cb..d4b7cd14c 100644 --- a/src/const.js +++ b/src/const.js @@ -13,7 +13,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.1.0', + VERSION: '3.1.1', BlendModes: require('./renderer/BlendModes'), From bb23b19ef72bce1fd2739716c34876965e171fb1 Mon Sep 17 00:00:00 2001 From: samme Date: Wed, 21 Feb 2018 09:43:49 -0800 Subject: [PATCH 177/200] Correct method name in LoaderPlugin#spritesheet --- src/loader/filetypes/SpriteSheetFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/filetypes/SpriteSheetFile.js b/src/loader/filetypes/SpriteSheetFile.js index b66401afa..f9186c66c 100644 --- a/src/loader/filetypes/SpriteSheetFile.js +++ b/src/loader/filetypes/SpriteSheetFile.js @@ -39,7 +39,7 @@ var SpriteSheetFile = function (key, url, config, path, xhrSettings) * The file is **not** loaded immediately after calling this method. * Instead, the file is added to a queue within the Loader, which is processed automatically when the Loader starts. * - * @method Phaser.Loader.LoaderPlugin#image + * @method Phaser.Loader.LoaderPlugin#spritesheet * @since 3.0.0 * * @param {string} key - [description] From fe5bd7e6bbfebab7ecfa674a891f7b3839d4f5f2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 21 Feb 2018 22:51:05 +0000 Subject: [PATCH 178/200] Fixed jsdoc errors --- src/gameobjects/text/TextStyle.js | 6 +++--- src/sound/BaseSoundManager.js | 25 ++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/gameobjects/text/TextStyle.js b/src/gameobjects/text/TextStyle.js index c68c66bfa..bcc71a2af 100644 --- a/src/gameobjects/text/TextStyle.js +++ b/src/gameobjects/text/TextStyle.js @@ -290,9 +290,9 @@ var TextStyle = new Class({ * @since 3.0.0 * * @param {[type]} style - [description] - * @param {[type]} updateText - [description] + * @param {boolean} [updateText=true] - [description] * - * @return {Phaser.GameObjects.Components.TextStyle This TextStyle component. + * @return {Phaser.GameObjects.Components.TextStyle} This TextStyle component. */ setStyle: function (style, updateText) { @@ -565,7 +565,7 @@ var TextStyle = new Class({ * @method Phaser.GameObjects.Components.TextStyle#setBackgroundColor * @since 3.0.0 * - * @param {string color - [description] + * @param {string} color - [description] * * @return {Phaser.GameObjects.Text} The parent Text object. */ diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index ca0f73d10..e846359e3 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -485,7 +485,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param [scope] - Callback context. + * @param {object} scope - Callback context. */ forEachActiveSound: function (callbackfn, scope) { @@ -499,11 +499,21 @@ var BaseSoundManager = new Class({ }); } }); + +/** + * [description] + * + * @name Phaser.Sound.BaseSoundManager#rate + * @type {number} + * @since 3.0.0 + */ Object.defineProperty(BaseSoundManager.prototype, 'rate', { + get: function () { return this._rate; }, + set: function (value) { this._rate = value; @@ -519,12 +529,23 @@ Object.defineProperty(BaseSoundManager.prototype, 'rate', { */ this.emit('rate', this, value); } + }); + +/** + * [description] + * + * @name Phaser.Sound.BaseSoundManager#detune + * @type {number} + * @since 3.0.0 + */ Object.defineProperty(BaseSoundManager.prototype, 'detune', { + get: function () { return this._detune; }, + set: function (value) { this._detune = value; @@ -540,5 +561,7 @@ Object.defineProperty(BaseSoundManager.prototype, 'detune', { */ this.emit('detune', this, value); } + }); + module.exports = BaseSoundManager; From 26f05782618851a6ebcb9c802f52a7f2a3b7a8ef Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:07:30 +0000 Subject: [PATCH 179/200] jsdoc fixes --- src/animations/Animation.js | 2 +- src/boot/PluginManager.js | 2 +- src/cameras/sprite3d/Camera.js | 4 +- src/cameras/sprite3d/CameraManager.js | 22 ++++----- src/device/Features.js | 7 +-- src/math/Vector4.js | 67 ++++++++++++++------------- 6 files changed, 51 insertions(+), 53 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index c842e69c3..c4e512d7b 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -54,7 +54,7 @@ var Animation = new Class({ /** * A frame based animation (as opposed to a bone based animation) * - * @name Phaser.Animations.Animation#key + * @name Phaser.Animations.Animation#type * @type {string} * @default frame * @since 3.0.0 diff --git a/src/boot/PluginManager.js b/src/boot/PluginManager.js index 4dd5bef70..3ae09cba9 100644 --- a/src/boot/PluginManager.js +++ b/src/boot/PluginManager.js @@ -161,7 +161,7 @@ var PluginManager = new Class({ * Plugin is the object to instantiate to create the plugin * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) * - * @name PluginManager.register + * @method PluginManager.register * @since 3.0.0 * * @param {string} key - [description] diff --git a/src/cameras/sprite3d/Camera.js b/src/cameras/sprite3d/Camera.js index d8cc63d4f..7178e0d48 100644 --- a/src/cameras/sprite3d/Camera.js +++ b/src/cameras/sprite3d/Camera.js @@ -54,7 +54,7 @@ var Camera = new Class({ * [description] * * @name Phaser.Cameras.Sprite3D#displayList - * @type {[type]} + * @type {Phaser.GameObjects.DisplayList} * @since 3.0.0 */ this.displayList = scene.sys.displayList; @@ -63,7 +63,7 @@ var Camera = new Class({ * [description] * * @name Phaser.Cameras.Sprite3D#updateList - * @type {[type]} + * @type {Phaser.GameObjects.UpdateList} * @since 3.0.0 */ this.updateList = scene.sys.updateList; diff --git a/src/cameras/sprite3d/CameraManager.js b/src/cameras/sprite3d/CameraManager.js index b79805769..5fe3f40f2 100644 --- a/src/cameras/sprite3d/CameraManager.js +++ b/src/cameras/sprite3d/CameraManager.js @@ -29,7 +29,7 @@ var CameraManager = new Class({ /** * [description] * - * @name Phaser.Cameras.Sprite3D#scene + * @name Phaser.Cameras.Sprite3D.CameraManager#scene * @type {Phaser.Scene} * @since 3.0.0 */ @@ -38,7 +38,7 @@ var CameraManager = new Class({ /** * [description] * - * @name Phaser.Cameras.Sprite3D#systems + * @name Phaser.Cameras.Sprite3D.CameraManager#systems * @type {Phaser.Scenes.Systems} * @since 3.0.0 */ @@ -47,7 +47,7 @@ var CameraManager = new Class({ /** * An Array of the Camera objects being managed by this Camera Manager. * - * @name Phaser.Cameras.Sprite3D#cameras + * @name Phaser.Cameras.Sprite3D.CameraManager#cameras * @type {array} * @since 3.0.0 */ @@ -97,8 +97,8 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#addOrthographicCamera * @since 3.0.0 * - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} width - [description] + * @param {number} height - [description] * * @return {[type]} [description] */ @@ -122,9 +122,9 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#addPerspectiveCamera * @since 3.0.0 * - * @param {[type]} fieldOfView - [description] - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} [fieldOfView=80] - [description] + * @param {number} [width] - [description] + * @param {number} [height] - [description] * * @return {[type]} [description] */ @@ -149,7 +149,7 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#getCamera * @since 3.0.0 * - * @param {[type]} name - [description] + * @param {string} name - [description] * * @return {[type]} [description] */ @@ -210,8 +210,8 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#update * @since 3.0.0 * - * @param {[type]} timestep - [description] - * @param {[type]} delta - [description] + * @param {number} timestep - [description] + * @param {number} delta - [description] */ update: function (timestep, delta) { diff --git a/src/device/Features.js b/src/device/Features.js index bc4f5d412..0b1c7d156 100644 --- a/src/device/Features.js +++ b/src/device/Features.js @@ -117,11 +117,8 @@ function init () // Can't be done on a webgl context var image = ctx2D.createImageData(1, 1); - /** - * Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. - * - * @author Matt DesLauriers (@mattdesl) - */ + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) isUint8 = image.data instanceof Uint8ClampedArray; CanvasPool.remove(canvas); diff --git a/src/math/Vector4.js b/src/math/Vector4.js index 6e8962fc9..58e56c5cb 100644 --- a/src/math/Vector4.js +++ b/src/math/Vector4.js @@ -32,7 +32,7 @@ var Vector4 = new Class({ /** * The x component of this Vector. * - * @name Phaser.Math.Vector3#x + * @name Phaser.Math.Vector4#x * @type {number} * @default 0 * @since 3.0.0 @@ -41,7 +41,7 @@ var Vector4 = new Class({ /** * The y component of this Vector. * - * @name Phaser.Math.Vector3#y + * @name Phaser.Math.Vector4#y * @type {number} * @default 0 * @since 3.0.0 @@ -50,7 +50,7 @@ var Vector4 = new Class({ /** * The z component of this Vector. * - * @name Phaser.Math.Vector3#z + * @name Phaser.Math.Vector4#z * @type {number} * @default 0 * @since 3.0.0 @@ -59,7 +59,7 @@ var Vector4 = new Class({ /** * The w component of this Vector. * - * @name Phaser.Math.Vector3#w + * @name Phaser.Math.Vector4#w * @type {number} * @default 0 * @since 3.0.0 @@ -87,7 +87,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#clone * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} [description] */ clone: function () { @@ -100,9 +100,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#copy * @since 3.0.0 * - * @param {[type]} src - [description] + * @param {Phaser.Math.Vector4} src - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ copy: function (src) { @@ -120,9 +120,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#equals * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {boolean} [description] */ equals: function (v) { @@ -135,12 +135,12 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#set * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} z - [description] - * @param {[type]} w - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} z - [description] + * @param {number} w - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ set: function (x, y, z, w) { @@ -168,9 +168,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#add * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ add: function (v) { @@ -188,9 +188,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#subtract * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ subtract: function (v) { @@ -208,9 +208,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#scale * @since 3.0.0 * - * @param {[type]} scale - [description] + * @param {number} scale - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ scale: function (scale) { @@ -228,7 +228,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#length * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ length: function () { @@ -246,7 +246,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#lengthSq * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ lengthSq: function () { @@ -264,7 +264,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#normalize * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ normalize: function () { @@ -295,7 +295,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ dot: function (v) { @@ -311,7 +311,7 @@ var Vector4 = new Class({ * @param {[type]} v - [description] * @param {[type]} t - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ lerp: function (v, t) { @@ -338,7 +338,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ multiply: function (v) { @@ -358,7 +358,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ divide: function (v) { @@ -378,7 +378,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ distance: function (v) { @@ -398,7 +398,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ distanceSq: function (v) { @@ -416,7 +416,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#negate * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ negate: function () { @@ -436,7 +436,7 @@ var Vector4 = new Class({ * * @param {[type]} mat - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ transformMat4: function (mat) { @@ -464,7 +464,7 @@ var Vector4 = new Class({ * * @param {[type]} q - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ transformQuat: function (q) { @@ -497,7 +497,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#reset * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ reset: function () { @@ -511,6 +511,7 @@ var Vector4 = new Class({ }); +// TODO: Check if these are required internally, if not, remove. Vector4.prototype.sub = Vector4.prototype.subtract; Vector4.prototype.mul = Vector4.prototype.multiply; Vector4.prototype.div = Vector4.prototype.divide; From 4b96ed4d6e7a6a76bac07873ec3e1d9384c175c9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:17:54 +0000 Subject: [PATCH 180/200] jsdoc fixes --- src/renderer/BlendModes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/BlendModes.js b/src/renderer/BlendModes.js index 4211d3a12..5902260d0 100644 --- a/src/renderer/BlendModes.js +++ b/src/renderer/BlendModes.js @@ -103,7 +103,7 @@ module.exports = { /** * Hard Light blend mode. * - * @name Phaser.BlendModes.SOFT_LIGHT + * @name Phaser.BlendModes.HARD_LIGHT * @type {integer} * @since 3.0.0 */ From df341be5200a93d9d92a1e0dfc756eca1dc37669 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:26:36 +0000 Subject: [PATCH 181/200] Removed local properties that were overwritten by the getters / setters --- src/sound/BaseSoundManager.js | 141 ++++++++++++++++------------------ 1 file changed, 65 insertions(+), 76 deletions(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index e846359e3..039c9e2c7 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -70,29 +70,6 @@ var BaseSoundManager = new Class({ */ this.volume = 1; - /** - * Global playback rate at which all the sounds will be played. - * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed - * and 2.0 doubles the audio's playback speed. - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.rate = 1; - - /** - * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). - * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.detune = 0; - /** * Flag indicating if sounds should be paused when game looses focus, * for instance when user switches to another tab/program/app. @@ -103,6 +80,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.pauseOnBlur = true; + game.events.on('blur', function () { if (this.pauseOnBlur) @@ -110,6 +88,7 @@ var BaseSoundManager = new Class({ this.onBlur(); } }, this); + game.events.on('focus', function () { if (this.pauseOnBlur) @@ -117,6 +96,7 @@ var BaseSoundManager = new Class({ this.onFocus(); } }, this); + game.events.once('destroy', this.destroy, this); /** @@ -164,6 +144,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.unlocked = false; + if (this.locked) { this.unlock(); @@ -497,69 +478,77 @@ var BaseSoundManager = new Class({ callbackfn.call(scope || _this, sound, index, _this.sounds); } }); - } -}); - -/** - * [description] - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @since 3.0.0 - */ -Object.defineProperty(BaseSoundManager.prototype, 'rate', { - - get: function () - { - return this._rate; }, - set: function (value) - { - this._rate = value; - this.forEachActiveSound(function (sound) + /** + * Global playback rate at which all the sounds will be played. + * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audio's playback speed. + * + * @name Phaser.Sound.BaseSoundManager#rate + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rate: { + + get: function () { - sound.setRate(); - }); + return this._rate; + }, - /** - * @event Phaser.Sound.BaseSoundManager#rate - * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. - * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#rate property. - */ - this.emit('rate', this, value); - } + set: function (value) + { + this._rate = value; -}); + this.forEachActiveSound(function (sound) + { + sound.setRate(); + }); -/** - * [description] - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @since 3.0.0 - */ -Object.defineProperty(BaseSoundManager.prototype, 'detune', { + /** + * @event Phaser.Sound.BaseSoundManager#rate + * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. + * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#rate property. + */ + this.emit('rate', this, value); + } - get: function () - { - return this._detune; }, - set: function (value) - { - this._detune = value; - this.forEachActiveSound(function (sound) - { - sound.setRate(); - }); + /** + * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + * + * @name Phaser.Sound.BaseSoundManager#detune + * @type {number} + * @default 0 + * @since 3.0.0 + */ + detune: { + + get: function () + { + return this._detune; + }, + + set: function (value) + { + this._detune = value; + + this.forEachActiveSound(function (sound) + { + sound.setRate(); + }); + + /** + * @event Phaser.Sound.BaseSoundManager#detune + * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. + * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#detune property. + */ + this.emit('detune', this, value); + } - /** - * @event Phaser.Sound.BaseSoundManager#detune - * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. - * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#detune property. - */ - this.emit('detune', this, value); } }); From 7126f806156734a1d69918727fd73c961d144461 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:38:19 +0000 Subject: [PATCH 182/200] Fixed jsdocs --- src/tilemaps/Tile.js | 48 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/tilemaps/Tile.js b/src/tilemaps/Tile.js index 48b30d8f8..048a46b7b 100644 --- a/src/tilemaps/Tile.js +++ b/src/tilemaps/Tile.js @@ -51,7 +51,7 @@ var Tile = new Class({ /** * The LayerData in the Tilemap data that this tile belongs to. * - * @name Phaser.Tilemaps.ImageCollection#layer + * @name Phaser.Tilemaps.Tile#layer * @type {Phaser.Tilemaps.LayerData} * @since 3.0.0 */ @@ -61,7 +61,7 @@ var Tile = new Class({ * The index of this tile within the map data corresponding to the tileset, or -1 if this * represents a blank tile. * - * @name Phaser.Tilemaps.ImageCollection#index + * @name Phaser.Tilemaps.Tile#index * @type {integer} * @since 3.0.0 */ @@ -70,7 +70,7 @@ var Tile = new Class({ /** * The x map coordinate of this tile in tile units. * - * @name Phaser.Tilemaps.ImageCollection#x + * @name Phaser.Tilemaps.Tile#x * @type {integer} * @since 3.0.0 */ @@ -79,7 +79,7 @@ var Tile = new Class({ /** * The y map coordinate of this tile in tile units. * - * @name Phaser.Tilemaps.ImageCollection#y + * @name Phaser.Tilemaps.Tile#y * @type {integer} * @since 3.0.0 */ @@ -88,7 +88,7 @@ var Tile = new Class({ /** * The width of the tile in pixels. * - * @name Phaser.Tilemaps.ImageCollection#width + * @name Phaser.Tilemaps.Tile#width * @type {integer} * @since 3.0.0 */ @@ -97,7 +97,7 @@ var Tile = new Class({ /** * The height of the tile in pixels. * - * @name Phaser.Tilemaps.ImageCollection#height + * @name Phaser.Tilemaps.Tile#height * @type {integer} * @since 3.0.0 */ @@ -107,7 +107,7 @@ var Tile = new Class({ * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes * within one map, but they are still placed at intervals of the base tile size. * - * @name Phaser.Tilemaps.ImageCollection#baseWidth + * @name Phaser.Tilemaps.Tile#baseWidth * @type {integer} * @since 3.0.0 */ @@ -117,7 +117,7 @@ var Tile = new Class({ * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes * within one map, but they are still placed at intervals of the base tile size. * - * @name Phaser.Tilemaps.ImageCollection#baseHeight + * @name Phaser.Tilemaps.Tile#baseHeight * @type {integer} * @since 3.0.0 */ @@ -128,7 +128,7 @@ var Tile = new Class({ * of the layer this tile is being rendered within. This property does NOT factor in camera * scroll, layer scale or layer position. * - * @name Phaser.Tilemaps.ImageCollection#pixelX + * @name Phaser.Tilemaps.Tile#pixelX * @type {number} * @since 3.0.0 */ @@ -139,7 +139,7 @@ var Tile = new Class({ * of the layer this tile is being rendered within. This property does NOT factor in camera * scroll, layer scale or layer position. * - * @name Phaser.Tilemaps.ImageCollection#pixelY + * @name Phaser.Tilemaps.Tile#pixelY * @type {number} * @since 3.0.0 */ @@ -150,7 +150,7 @@ var Tile = new Class({ /** * Tile specific properties. These usually come from Tiled. * - * @name Phaser.Tilemaps.ImageCollection#properties + * @name Phaser.Tilemaps.Tile#properties * @type {object} * @since 3.0.0 */ @@ -159,7 +159,7 @@ var Tile = new Class({ /** * The rotation angle of this tile. * - * @name Phaser.Tilemaps.ImageCollection#rotation + * @name Phaser.Tilemaps.Tile#rotation * @type {number} * @since 3.0.0 */ @@ -168,7 +168,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the left side. * - * @name Phaser.Tilemaps.ImageCollection#collideLeft + * @name Phaser.Tilemaps.Tile#collideLeft * @type {boolean} * @since 3.0.0 */ @@ -177,7 +177,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the right side. * - * @name Phaser.Tilemaps.ImageCollection#collideRight + * @name Phaser.Tilemaps.Tile#collideRight * @type {boolean} * @since 3.0.0 */ @@ -186,7 +186,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the top side. * - * @name Phaser.Tilemaps.ImageCollection#collideUp + * @name Phaser.Tilemaps.Tile#collideUp * @type {boolean} * @since 3.0.0 */ @@ -195,7 +195,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the bottom side. * - * @name Phaser.Tilemaps.ImageCollection#collideDown + * @name Phaser.Tilemaps.Tile#collideDown * @type {boolean} * @since 3.0.0 */ @@ -204,7 +204,7 @@ var Tile = new Class({ /** * Whether the tile's left edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceLeft + * @name Phaser.Tilemaps.Tile#faceLeft * @type {boolean} * @since 3.0.0 */ @@ -213,7 +213,7 @@ var Tile = new Class({ /** * Whether the tile's right edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceRight + * @name Phaser.Tilemaps.Tile#faceRight * @type {boolean} * @since 3.0.0 */ @@ -222,7 +222,7 @@ var Tile = new Class({ /** * Whether the tile's top edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceTop + * @name Phaser.Tilemaps.Tile#faceTop * @type {boolean} * @since 3.0.0 */ @@ -231,7 +231,7 @@ var Tile = new Class({ /** * Whether the tile's bottom edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceBottom + * @name Phaser.Tilemaps.Tile#faceBottom * @type {boolean} * @since 3.0.0 */ @@ -240,7 +240,7 @@ var Tile = new Class({ /** * Tile collision callback. * - * @name Phaser.Tilemaps.ImageCollection#collisionCallback + * @name Phaser.Tilemaps.Tile#collisionCallback * @type {function} * @since 3.0.0 */ @@ -249,7 +249,7 @@ var Tile = new Class({ /** * The context in which the collision callback will be called. * - * @name Phaser.Tilemaps.ImageCollection#collisionCallbackContext + * @name Phaser.Tilemaps.Tile#collisionCallbackContext * @type {object} * @since 3.0.0 */ @@ -259,7 +259,7 @@ var Tile = new Class({ * The tint to apply to this tile. Note: tint is currently a single color value instead of * the 4 corner tint component on other GameObjects. * - * @name Phaser.Tilemaps.ImageCollection#tint + * @name Phaser.Tilemaps.Tile#tint * @type {number} * @default * @since 3.0.0 @@ -269,7 +269,7 @@ var Tile = new Class({ /** * An empty object where physics-engine specific information (e.g. bodies) may be stored. * - * @name Phaser.Tilemaps.ImageCollection#physics + * @name Phaser.Tilemaps.Tile#physics * @type {object} * @since 3.0.0 */ From 147dec11ab2a43c0bd453ec25012ea7a9e243d60 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:50:36 +0000 Subject: [PATCH 183/200] Tween.updateTweenData will now check to see if the Tween target still exists before trying to update its properties. --- src/tweens/tween/Tween.js | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/tweens/tween/Tween.js b/src/tweens/tween/Tween.js index 9a359d746..2b70c4ca7 100644 --- a/src/tweens/tween/Tween.js +++ b/src/tweens/tween/Tween.js @@ -1136,6 +1136,12 @@ var Tween = new Class({ case TWEEN_CONST.PLAYING_FORWARD: case TWEEN_CONST.PLAYING_BACKWARD: + if (!tweenData.target) + { + tweenData.state = TWEEN_CONST.COMPLETE; + break; + } + var elapsed = tweenData.elapsed; var duration = tweenData.duration; var diff = 0; @@ -1240,15 +1246,22 @@ var Tween = new Class({ case TWEEN_CONST.PENDING_RENDER: - tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]); + if (tweenData.target) + { + tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]); - tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start); + tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start); - tweenData.current = tweenData.start; + tweenData.current = tweenData.start; - tweenData.target[tweenData.key] = tweenData.start; + tweenData.target[tweenData.key] = tweenData.start; - tweenData.state = TWEEN_CONST.PLAYING_FORWARD; + tweenData.state = TWEEN_CONST.PLAYING_FORWARD; + } + else + { + tweenData.state = TWEEN_CONST.COMPLETE; + } break; } From 9b37a123e2c511125c28740c111f5a0e96cb693f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:50:46 +0000 Subject: [PATCH 184/200] Updated version number and change log --- CHANGELOG.md | 13 +++++++++++++ package.json | 4 ++-- src/const.js | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb47c00a4..2e220a9a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## Version 3.1.2 - In Development + +### Updates + +* Hundreds of JSDoc fixes across the whole API. +* Tween.updateTweenData will now check to see if the Tween target still exists before trying to update its properties. + +### Bug Fixes + + + + + ## Version 3.1.1 - 20th February 2018 ### Updates diff --git a/package.json b/package.json index b22d5025a..e6ebe87f8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phaser", - "version": "3.1.1", - "release": "Onishi.1", + "version": "3.1.2", + "release": "Onishi.2", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", "logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png", diff --git a/src/const.js b/src/const.js index d4b7cd14c..07bd0ea22 100644 --- a/src/const.js +++ b/src/const.js @@ -13,7 +13,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.1.1', + VERSION: '3.1.2', BlendModes: require('./renderer/BlendModes'), From 997338c35b95b1753c68e27b009b6ddfad24c977 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:52:11 +0000 Subject: [PATCH 185/200] jsdoc fixes --- src/tweens/tween/const.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tweens/tween/const.js b/src/tweens/tween/const.js index c8ebac694..a44ce57f6 100644 --- a/src/tweens/tween/const.js +++ b/src/tweens/tween/const.js @@ -27,7 +27,7 @@ var TWEEN_CONST = { /** * TweenData state. * - * @name Phaser.Tweens.OFFSET_DELAY + * @name Phaser.Tweens.DELAY * @type {integer} * @since 3.0.0 */ @@ -45,7 +45,7 @@ var TWEEN_CONST = { /** * TweenData state. * - * @name Phaser.Tweens.PLAYING_FORWARD + * @name Phaser.Tweens.PENDING_RENDER * @type {integer} * @since 3.0.0 */ @@ -110,7 +110,7 @@ var TWEEN_CONST = { /** * Tween state. * - * @name Phaser.Tweens.LOOP_DELAY + * @name Phaser.Tweens.PAUSED * @type {integer} * @since 3.0.0 */ From b57ab091c1c888079151881482928734604ecae4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 01:59:32 +0000 Subject: [PATCH 186/200] The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWAD_SLASH`. Fix #3271 (thanks @josedarioxyz) --- CHANGELOG.md | 1 + src/input/keyboard/keys/KeyCodes.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e220a9a3..00bd9613d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bug Fixes +* The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWAD_SLASH`. Fix #3271 (thanks @josedarioxyz) diff --git a/src/input/keyboard/keys/KeyCodes.js b/src/input/keyboard/keys/KeyCodes.js index 6ada15b84..e33f115d4 100644 --- a/src/input/keyboard/keys/KeyCodes.js +++ b/src/input/keyboard/keys/KeyCodes.js @@ -525,11 +525,11 @@ module.exports = { PERIOD: 190, /** - * @name Phaser.Input.Keyboard.KeyCodes.FORWAD_SLASH + * @name Phaser.Input.Keyboard.KeyCodes.FORWARD_SLASH * @type {integer} * @since 3.0.0 */ - FORWAD_SLASH: 191, + FORWARD_SLASH: 191, /** * @name Phaser.Input.Keyboard.KeyCodes.BACK_SLASH From a218cd5f4ae9db742fd474bfa177a083c4c0253a Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Thu, 22 Feb 2018 01:07:43 -0300 Subject: [PATCH 187/200] Fixed issue with vertex buffer creation on Static Tilemap Layer --- src/renderer/webgl/pipelines/TextureTintPipeline.js | 5 +---- src/tilemaps/staticlayer/StaticTilemapLayer.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index c0355ebfa..eafbc807a 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -347,12 +347,9 @@ var TextureTintPipeline = new Class({ } this.vertexBuffer = tilemap.vertexBuffer; - - renderer.setTexture2D(frame.source.glTexture, 0); renderer.setPipeline(this); - + renderer.setTexture2D(frame.source.glTexture, 0); gl.drawArrays(this.topology, 0, tilemap.vertexCount); - this.vertexBuffer = pipelineVertexBuffer; } diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index fc0da77ba..e1f43b471 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -329,10 +329,10 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (vertexBuffer === null) { vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + this.vertexBuffer = vertexBuffer; } else { From 62932334886a03d02a379ac4824e2a19dff0de7a Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Thu, 22 Feb 2018 01:16:10 -0300 Subject: [PATCH 188/200] Implemented static tilemap layer scale and tilemap alpha --- src/tilemaps/staticlayer/StaticTilemapLayer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index e1f43b471..21b9894be 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -289,7 +289,7 @@ var StaticTilemapLayer = new Class({ var ty2 = tyh; var tx3 = txw; var ty3 = ty; - var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha); + var tint = Utils.getTintAppendFloatAlpha(0xffffff, this.alpha * tile.alpha); vertexViewF32[voffset + 0] = tx0; vertexViewF32[voffset + 1] = ty0; @@ -343,6 +343,7 @@ var StaticTilemapLayer = new Class({ pipeline.modelIdentity(); pipeline.modelTranslate(this.x - (camera.scrollX * this.scrollFactorX), this.y - (camera.scrollY * this.scrollFactorY), 0.0); + pipeline.modelScale(this.scaleX, this.scaleY, 1.0); pipeline.viewLoad2D(camera.matrix.matrix); } From 697d0962217dc752933d48681a1248f44b6493a6 Mon Sep 17 00:00:00 2001 From: AleBles Date: Thu, 22 Feb 2018 12:34:19 +0100 Subject: [PATCH 189/200] Added data to ScenePlugin, fixes #3180 --- src/scene/ScenePlugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scene/ScenePlugin.js b/src/scene/ScenePlugin.js index f236f7769..c8971e7f6 100644 --- a/src/scene/ScenePlugin.js +++ b/src/scene/ScenePlugin.js @@ -101,7 +101,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - start: function (key) + start: function (key, data) { if (key === undefined) { key = this.key; } @@ -115,7 +115,7 @@ var ScenePlugin = new Class({ else { this.manager.stop(this.key); - this.manager.start(key); + this.manager.start(key, data); } } @@ -152,7 +152,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - launch: function (key) + launch: function (key, data) { if (key && key !== this.key) { @@ -162,7 +162,7 @@ var ScenePlugin = new Class({ } else { - this.manager.start(key); + this.manager.start(key, data); } } From fd4e6f8920a41a6eb4725006fa1c239e01b22e68 Mon Sep 17 00:00:00 2001 From: AleBles Date: Thu, 22 Feb 2018 12:50:32 +0100 Subject: [PATCH 190/200] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00bd9613d..f32ca1115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Bug Fixes * The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWAD_SLASH`. Fix #3271 (thanks @josedarioxyz) +* Added missing data parameter to ScenePlugin. Fixes #3810 (thanks @AleBles) From 2b309c06e552b2c1f272bd15d0edfb8efabe15e2 Mon Sep 17 00:00:00 2001 From: samme Date: Thu, 22 Feb 2018 09:28:02 -0800 Subject: [PATCH 191/200] Elevate console message for loading data URIs --- src/loader/File.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/File.js b/src/loader/File.js index 347f4a318..21289f1e5 100644 --- a/src/loader/File.js +++ b/src/loader/File.js @@ -272,7 +272,7 @@ var File = new Class({ if (this.src.indexOf('data:') === 0) { - console.log('Local data URI'); + console.warn('Local data URIs are not supported: ' + this.key); } else { From 57333ea4922793b19419903a1f7c2c4a806c96c5 Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Thu, 22 Feb 2018 20:36:25 -0300 Subject: [PATCH 192/200] Fixed issue with null texture on particle emitter batch generation --- .../webgl/pipelines/TextureTintPipeline.js | 97 +++++++++++++++++-- 1 file changed, 90 insertions(+), 7 deletions(-) diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index eafbc807a..af3431b37 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -277,6 +277,7 @@ var TextureTintPipeline = new Class({ this.vertexCount = 0; batches.length = 0; + this.pushBatch(); this.flushLocked = false; return this; @@ -375,7 +376,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; var cameraScrollY = camera.scrollY; @@ -505,6 +505,8 @@ var TextureTintPipeline = new Class({ } } } + + this.setTexture2D(texture, 0); }, /** @@ -524,7 +526,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var list = blitter.getRenderList(); var length = list.length; var cameraMatrix = camera.matrix.matrix; @@ -643,7 +644,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; var texture = frame.texture.source[frame.sourceIndex].glTexture; @@ -771,7 +771,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; @@ -850,7 +849,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; var cameraHeight = camera.height + 50; @@ -1074,7 +1072,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; var textureSource = bitmapText.texture.source[frame.sourceIndex]; @@ -1535,7 +1532,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); var height = srcHeight * (flipY ? -1.0 : 1.0); @@ -1617,6 +1613,93 @@ var TextureTintPipeline = new Class({ this.vertexCount += 6; }, + drawTexture: function ( + texture, + srcX, srcY, + frameX, frameY, frameWidth, frameHeight, + transformMatrix + ) + { + this.renderer.setPipeline(this); + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + var renderer = this.renderer; + var width = srcWidth; + var height = srcHeight; + var x = srcX; + var y = srcY; + var xw = x + width; + var yh = y + height; + var mva = transformMatrix[0]; + var mvb = transformMatrix[1]; + var mvc = transformMatrix[2]; + var mvd = transformMatrix[3]; + var mve = transformMatrix[4]; + var mvf = transformMatrix[5]; + var tx0 = x * mva + y * mvc + mve; + var ty0 = x * mvb + y * mvd + mvf; + var tx1 = x * mva + yh * mvc + mve; + var ty1 = x * mvb + yh * mvd + mvf; + var tx2 = xw * mva + yh * mvc + mve; + var ty2 = xw * mvb + yh * mvd + mvf; + var tx3 = xw * mva + y * mvc + mve; + var ty3 = xw * mvb + y * mvd + mvf; + var vertexOffset = 0; + var textureWidth = texture.width; + var textureHeight = texture.height; + var u0 = (frameX / textureWidth); + var v0 = (frameY / textureHeight); + var u1 = (frameX + frameWidth) / textureWidth; + var v1 = (frameY + frameHeight) / textureHeight; + var tint = 0xffffffff; + + this.setTexture2D(texture, 0); + + vertexOffset = this.vertexCount * this.vertexComponentCount; + + vertexViewF32[vertexOffset + 0] = tx0; + vertexViewF32[vertexOffset + 1] = ty0; + vertexViewF32[vertexOffset + 2] = u0; + vertexViewF32[vertexOffset + 3] = v0; + vertexViewU32[vertexOffset + 4] = tint; + vertexViewF32[vertexOffset + 5] = tx1; + vertexViewF32[vertexOffset + 6] = ty1; + vertexViewF32[vertexOffset + 7] = u0; + vertexViewF32[vertexOffset + 8] = v1; + vertexViewU32[vertexOffset + 9] = tint; + vertexViewF32[vertexOffset + 10] = tx2; + vertexViewF32[vertexOffset + 11] = ty2; + vertexViewF32[vertexOffset + 12] = u1; + vertexViewF32[vertexOffset + 13] = v1; + vertexViewU32[vertexOffset + 14] = tint; + vertexViewF32[vertexOffset + 15] = tx0; + vertexViewF32[vertexOffset + 16] = ty0; + vertexViewF32[vertexOffset + 17] = u0; + vertexViewF32[vertexOffset + 18] = v0; + vertexViewU32[vertexOffset + 19] = tint; + vertexViewF32[vertexOffset + 20] = tx2; + vertexViewF32[vertexOffset + 21] = ty2; + vertexViewF32[vertexOffset + 22] = u1; + vertexViewF32[vertexOffset + 23] = v1; + vertexViewU32[vertexOffset + 24] = tint; + vertexViewF32[vertexOffset + 25] = tx3; + vertexViewF32[vertexOffset + 26] = ty3; + vertexViewF32[vertexOffset + 27] = u1; + vertexViewF32[vertexOffset + 28] = v0; + vertexViewU32[vertexOffset + 29] = tint; + + this.vertexCount += 6; + + // Force an immediate draw + this.flush(); + }, + /** * [description] * From 024767e1cdc025085cf7e175d4497d1d4290400d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 22 Feb 2018 23:50:45 +0000 Subject: [PATCH 193/200] Updated change log --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00bd9613d..59b382201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,9 @@ ### Bug Fixes * The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWAD_SLASH`. Fix #3271 (thanks @josedarioxyz) - - - +* Fixed issue with vertex buffer creation on Static Tilemap Layer, causing tilemap layers to appear black. Fix #3266 (thanks @akleemans) +* Implemented Static Tilemap Layer scaling and Tile alpha support. +* Fixed issue with null texture on Particle Emitter batch generation. This would manifest if you had particles with blend modes on-top of other images not appearing. ## Version 3.1.1 - 20th February 2018 From 7b42abd60180cdf6c8740185ea9676a4edfe62c4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 23 Feb 2018 02:23:46 +0000 Subject: [PATCH 194/200] Updated change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f06aa2232..ed322fd56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Hundreds of JSDoc fixes across the whole API. * Tween.updateTweenData will now check to see if the Tween target still exists before trying to update its properties. +* If you try to use a local data URI in the Loader it now console warns instead of logs (thanks @samme) ### Bug Fixes From ef8e92dc012b8833629c63450c017d6e2fc7d85e Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Fri, 23 Feb 2018 00:44:22 -0300 Subject: [PATCH 195/200] RenderTexture base webgl implementation --- src/gameobjects/components/MatrixStack.js | 146 ++++++++++++++++++ src/gameobjects/components/index.js | 1 + src/gameobjects/index.js | 3 + .../rendertexture/RenderTexture.js | 75 +++++++++ .../RenderTextureCanvasRenderer.js | 12 ++ .../rendertexture/RenderTextureCreator.js | 18 +++ .../rendertexture/RenderTextureFactory.js | 7 + .../rendertexture/RenderTextureRender.js | 19 +++ .../rendertexture/RenderTextureWebGL.js | 36 +++++ .../RenderTextureWebGLRenderer.js | 28 ++++ src/renderer/webgl/WebGLRenderer.js | 12 +- .../webgl/pipelines/TextureTintPipeline.js | 4 +- 12 files changed, 355 insertions(+), 6 deletions(-) create mode 100644 src/gameobjects/components/MatrixStack.js create mode 100644 src/gameobjects/rendertexture/RenderTexture.js create mode 100644 src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js create mode 100644 src/gameobjects/rendertexture/RenderTextureCreator.js create mode 100644 src/gameobjects/rendertexture/RenderTextureFactory.js create mode 100644 src/gameobjects/rendertexture/RenderTextureRender.js create mode 100644 src/gameobjects/rendertexture/RenderTextureWebGL.js create mode 100644 src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js diff --git a/src/gameobjects/components/MatrixStack.js b/src/gameobjects/components/MatrixStack.js new file mode 100644 index 000000000..5d28db9f5 --- /dev/null +++ b/src/gameobjects/components/MatrixStack.js @@ -0,0 +1,146 @@ +var MatrixStack = { + + matrixStack: null, + currentMatrix: null, + currentMatrixIndex: 0, + + initMatrixStack: function () + { + this.matrixStack = new Float32Array(6000); // up to 1000 matrices + this.currentMatrix = new Float32Array([1.0, 0.0, 0.0, 1.0, 0.0, 0.0]); + this.currentMatrixIndex = 0; + return this; + }, + + save: function () + { + if (this.currentMatrixIndex >= this.matrixStack.length) return this; + + var matrixStack = this.matrixStack; + var currentMatrix = this.currentMatrix; + var currentMatrixIndex = this.currentMatrixIndex; + this.currentMatrixIndex += 6; + + matrixStack[currentMatrixIndex + 0] = currentMatrix[0]; + matrixStack[currentMatrixIndex + 1] = currentMatrix[1]; + matrixStack[currentMatrixIndex + 2] = currentMatrix[2]; + matrixStack[currentMatrixIndex + 3] = currentMatrix[3]; + matrixStack[currentMatrixIndex + 4] = currentMatrix[4]; + matrixStack[currentMatrixIndex + 5] = currentMatrix[5]; + + return this; + }, + + restore: function () + { + if (this.currentMatrixIndex <= 0) return this; + + this.currentMatrixIndex -= 6; + + var matrixStack = this.matrixStack; + var currentMatrix = this.currentMatrix; + var currentMatrixIndex = this.currentMatrixIndex; + + currentMatrix[0] = matrixStack[currentMatrixIndex + 0]; + currentMatrix[1] = matrixStack[currentMatrixIndex + 1]; + currentMatrix[2] = matrixStack[currentMatrixIndex + 2]; + currentMatrix[3] = matrixStack[currentMatrixIndex + 3]; + currentMatrix[4] = matrixStack[currentMatrixIndex + 4]; + currentMatrix[5] = matrixStack[currentMatrixIndex + 5]; + + return this; + }, + + loadIdentity: function () + { + this.setTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); + return this; + }, + + transform: function (a, b, c, d, tx, ty) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var m4 = currentMatrix[4]; + var m5 = currentMatrix[5]; + + currentMatrix[0] = m0 * a + m2 * b; + currentMatrix[1] = m1 * a + m3 * b; + currentMatrix[2] = m0 * c + m2 * d; + currentMatrix[3] = m1 * c + m3 * d; + currentMatrix[4] = m0 * tx + m2 * ty + m4; + currentMatrix[5] = m1 * tx + m3 * ty + m5; + + return this; + }, + + setTransform: function (a, b, c, d, tx, ty) + { + var currentMatrix = this.currentMatrix; + + currentMatrix[0] = a; + currentMatrix[1] = b; + currentMatrix[2] = c; + currentMatrix[3] = d; + currentMatrix[4] = tx; + currentMatrix[5] = ty; + + return this; + }, + + translate: function (x, y) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var m4 = currentMatrix[4]; + var m5 = currentMatrix[5]; + + currentMatrix[4] = m0 * x + m2 * y + m4; + currentMatrix[5] = m1 * x + m3 * y + m5; + + return this; + }, + + scale: function (x, y) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + + currentMatrix[0] = m0 * x; + currentMatrix[1] = m1 * x; + currentMatrix[2] = m2 * y; + currentMatrix[3] = m3 * y; + + return this; + }, + + rotate: function (t) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var st = Math.sin(t); + var ct = Math.cos(t); + + currentMatrix[0] = m0 * ct + m2 * st; + currentMatrix[1] = m1 * ct + m3 * st; + currentMatrix[2] = m2 * -st + m2 * ct; + currentMatrix[3] = m3 * -st + m3 * ct; + + return this; + } + +}; + +module.exports = MatrixStack; diff --git a/src/gameobjects/components/index.js b/src/gameobjects/components/index.js index ca8fadff8..c3ac6b341 100644 --- a/src/gameobjects/components/index.js +++ b/src/gameobjects/components/index.js @@ -17,6 +17,7 @@ module.exports = { Depth: require('./Depth'), Flip: require('./Flip'), GetBounds: require('./GetBounds'), + MatrixStack: require('./MatrixStack'), Origin: require('./Origin'), Pipeline: require('./Pipeline'), ScaleMode: require('./ScaleMode'), diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index fc7db35b9..c9b18357d 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -25,6 +25,7 @@ var GameObjects = { Image: require('./image/Image'), Particles: require('./particles/ParticleEmitterManager'), PathFollower: require('./pathfollower/PathFollower'), + RenderTexture: require('./rendertexture/RenderTexture'), Sprite3D: require('./sprite3d/Sprite3D'), Sprite: require('./sprite/Sprite'), Text: require('./text/static/Text'), @@ -41,6 +42,7 @@ var GameObjects = { Image: require('./image/ImageFactory'), Particles: require('./particles/ParticleManagerFactory'), PathFollower: require('./pathfollower/PathFollowerFactory'), + RenderTexture: require('./rendertexture/RenderTextureFactory'), Sprite3D: require('./sprite3d/Sprite3DFactory'), Sprite: require('./sprite/SpriteFactory'), StaticBitmapText: require('./bitmaptext/static/BitmapTextFactory'), @@ -56,6 +58,7 @@ var GameObjects = { Group: require('./group/GroupCreator'), Image: require('./image/ImageCreator'), Particles: require('./particles/ParticleManagerCreator'), + RenderTexture: require('./rendertexture/RenderTextureCreator'), Sprite3D: require('./sprite3d/Sprite3DCreator'), Sprite: require('./sprite/SpriteCreator'), StaticBitmapText: require('./bitmaptext/static/BitmapTextCreator'), diff --git a/src/gameobjects/rendertexture/RenderTexture.js b/src/gameobjects/rendertexture/RenderTexture.js new file mode 100644 index 000000000..dcfb0c640 --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTexture.js @@ -0,0 +1,75 @@ +var Class = require('../../utils/Class'); +var Components = require('../components'); +var GameObject = require('../GameObject'); +var RenderTextureWebGL = require('./RenderTextureWebGL'); +var Render = require('./RenderTextureRender'); + +var RenderTexture = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.MatrixStack, + Components.Origin, + Components.Pipeline, + Components.ScaleMode, + Components.ScrollFactor, + Components.Size, + Components.Tint, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function RenderTexture(scene, x, y, width, height) + { + GameObject.call(this, scene, 'RenderTexture'); + this.initMatrixStack(); + + this.renderer = scene.sys.game.renderer; + + if (this.renderer.type === Phaser.WEBGL) + { + var gl = this.renderer.gl; + this.gl = gl; + this.fill = RenderTextureWebGL.fill; + this.clear = RenderTextureWebGL.clear; + this.draw = RenderTextureWebGL.draw; + this.drawFrame = RenderTextureWebGL.drawFrame; + this.texture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false); + this.framebuffer = this.renderer.createFramebuffer(width, height, this.texture, false); + } + else + { + // For now we'll just add canvas stubs + this.fill = function () {}; + this.clear = function () {}; + this.draw = function () {}; + this.drawFrame = function () {}; + } + + this.setPosition(x, y); + this.setSize(width, height); + this.initPipeline('TextureTintPipeline'); + }, + + destroy: function () + { + GameObject.destroy.call(this); + if (this.renderer.type === Phaser.WEBGL) + { + this.renderer.deleteTexture(this.texture); + this.renderer.deleteFramebuffer(this.framebuffer); + } + } + +}); + +module.exports = RenderTexture; diff --git a/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js b/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js new file mode 100644 index 000000000..e5528cbcb --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js @@ -0,0 +1,12 @@ +var GameObject = require('../GameObject'); + +var RenderTextureCanvasRenderer = function (renderer, renderTexture, interpolationPercentage, camera) +{ + if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id))) + { + return; + } + +}; + +module.exports = RenderTextureCanvasRenderer; diff --git a/src/gameobjects/rendertexture/RenderTextureCreator.js b/src/gameobjects/rendertexture/RenderTextureCreator.js new file mode 100644 index 000000000..cb411782d --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTextureCreator.js @@ -0,0 +1,18 @@ +var BuildGameObject = require('../BuildGameObject'); +var BuildGameObjectAnimation = require('../BuildGameObjectAnimation'); +var GameObjectCreator = require('../GameObjectCreator'); +var GetAdvancedValue = require('../../utils/object/GetAdvancedValue'); +var RenderTexture = require('./RenderTexture'); + +GameObjectCreator.register('renderTexture', function (config) +{ + var x = GetAdvancedValue(config, 'x', 0); + var y = GetAdvancedValue(config, 'y', 0); + var width = GetAdvancedValue(config, 'width', 32); + var height = GetAdvancedValue(config, 'height', 32); + var renderTexture = new RenderTexture(this.scene, x, y, width, height); + + BuildGameObject(this.scene, renderTexture, config); + + return renderTexture; +}); diff --git a/src/gameobjects/rendertexture/RenderTextureFactory.js b/src/gameobjects/rendertexture/RenderTextureFactory.js new file mode 100644 index 000000000..91c2c6f0c --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTextureFactory.js @@ -0,0 +1,7 @@ +var GameObjectFactory = require('../GameObjectFactory'); +var RenderTexture = require('./RenderTexture'); + +GameObjectFactory.register('renderTexture', function (x, y, width, height) +{ + return this.displayList.add(new RenderTexture(this.scene, x, y, width, height)); +}); diff --git a/src/gameobjects/rendertexture/RenderTextureRender.js b/src/gameobjects/rendertexture/RenderTextureRender.js new file mode 100644 index 000000000..3892e4a05 --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTextureRender.js @@ -0,0 +1,19 @@ +var renderWebGL = require('../../utils/NOOP'); +var renderCanvas = require('../../utils/NOOP'); + +if (WEBGL_RENDERER) +{ + renderWebGL = require('./RenderTextureWebGLRenderer'); +} + +if (CANVAS_RENDERER) +{ + renderCanvas = require('./RenderTextureCanvasRenderer'); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; diff --git a/src/gameobjects/rendertexture/RenderTextureWebGL.js b/src/gameobjects/rendertexture/RenderTextureWebGL.js new file mode 100644 index 000000000..39124073c --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTextureWebGL.js @@ -0,0 +1,36 @@ +var RenderTextureWebGL = { + + fill: function (color) + { + return this; + }, + + clear: function () + { + this.renderer.setFramebuffer(this.framebuffer); + var gl = this.gl; + gl.clearColor(0, 0, 0, 0); + gl.clear(gl.COLOR_BUFFER_BIT); + this.renderer.setFramebuffer(null); + return this; + }, + + draw: function (texture, x, y) + { + this.renderer.setFramebuffer(this.framebuffer); + this.renderer.pipelines.TextureTintPipeline.drawTexture(texture, x, y, 0, 0, texture.width, texture.height, this.currentMatrix); + this.renderer.setFramebuffer(null); + return this; + }, + + drawFrame: function (texture, x, y, frame) + { + this.renderer.setFramebuffer(this.framebuffer); + this.renderer.pipelines.TextureTintPipeline.drawTexture(texture, frame.x, frame.y, frame.width, frame.height, texture.width, texture.height, this.currentMatrix); + this.renderer.setFramebuffer(null); + return this; + } + +}; + +module.exports = RenderTextureWebGL; diff --git a/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js new file mode 100644 index 000000000..411dbee2a --- /dev/null +++ b/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js @@ -0,0 +1,28 @@ +var GameObject = require('../GameObject'); + +var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolationPercentage, camera) +{ + if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id))) + { + return; + } + + this.pipeline.batchTexture( + renderTexture, + renderTexture.texture, + renderTexture.texture.width, renderTexture.texture.height, + renderTexture.x, renderTexture.y, + renderTexture.width, renderTexture.height, + renderTexture.scaleX, renderTexture.scaleY, + renderTexture.rotation, + renderTexture.flipX, renderTexture.flipY, + renderTexture.scrollFactorX, renderTexture.scrollFactorY, + renderTexture.displayOriginX, renderTexture.displayOriginY, + 0, 0, renderTexture.texture.width, renderTexture.texture.height, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0, 0, + camera + ); +}; + +module.exports = RenderTextureWebGLRenderer; diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 89aaf871f..18518250c 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -1203,8 +1203,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteTexture: function () + deleteTexture: function (texture) { + this.gl.deleteTexture(texture); return this; }, @@ -1218,8 +1219,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteFramebuffer: function () + deleteFramebuffer: function (framebuffer) { + this.gl.deleteFramebuffer(framebuffer); return this; }, @@ -1233,8 +1235,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteProgram: function () + deleteProgram: function (program) { + this.gl.deleteProgram(program); return this; }, @@ -1248,8 +1251,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteBuffer: function () + deleteBuffer: function (buffer) { + this.gl.deleteBuffer(buffer); return this; }, diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index af3431b37..c98e89d6a 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -1630,8 +1630,8 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var width = srcWidth; - var height = srcHeight; + var width = frameWidth; + var height = frameHeight; var x = srcX; var y = srcY; var xw = x + width; From b1b5c863f36cdffb0ec2eed8ccf454f0483e5d96 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 23 Feb 2018 13:29:52 +0000 Subject: [PATCH 196/200] 3.1.2 Release --- CHANGELOG.md | 8 +- README.md | 46 +- dist/phaser-arcade-physics.js | 5835 +++++++++++++++------------ dist/phaser-arcade-physics.min.js | 2 +- dist/phaser.js | 6269 ++++++++++++++++------------- dist/phaser.min.js | 2 +- 6 files changed, 6584 insertions(+), 5578 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed322fd56..844a94572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log -## Version 3.1.2 - In Development +## Version 3.2.0 - In Development + +### New Features +### Bug Fixes +### Updates + +## Version 3.1.2 - 23rd February 2018 ### Updates diff --git a/README.md b/README.md index aa1308a60..b1c9fc4c2 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Grab the source and join in the fun!
-> 20th February 2018 +> 23rd February 2018 -**Updated:** Thank you for the amazing response to the 3.0.0 release! We've been hard at work and have now prepared 3.1.1 for you, which is available today. Check out the [Change Log](#changelog) for more details. +**Updated:** Thank you for the continued amazing response to the 3.0.0 release! We've carried on working hard and now prepared 3.1.2 for you, which is available today. Check out the [Change Log](#changelog) for more details. After 1.5 years in the making, tens of thousands of lines of code, hundreds of examples and countless hours of relentless work: Phaser 3 is finally out. It has been a real labor of love and then some! @@ -94,13 +94,13 @@ npm install phaser [Phaser is on jsDelivr](http://www.jsdelivr.com/projects/phaser), a "super-fast CDN for developers". Include the following in your html: ```html - + ``` or the minified version: ```html - + ``` ### License @@ -112,7 +112,13 @@ Phaser is released under the [MIT License](https://opensource.org/licenses/MIT). -Phaser 3 is so brand new the paint is still wet. As such we don't yet have any guides or tutorials! This will change in the coming weeks and we'll update this area as they emerge. For now, please subscribe to the [Phaser World](https://phaser.io/community/newsletter) newsletter as we'll publish them in there first. +Phaser 3 is so brand new the paint is still wet, but tutorials and guides are starting to come out! + +* [Getting Started with Phaser 3](https://phaser.io/tutorials/getting-started-phaser3) (useful if you are completely new to Phaser) +* [Making your first Phaser 3 Game](https://phaser.io/tutorials/making-your-first-phaser-3-game) +* [Phaser 3 Bootstrap and Platformer Example](https://phaser.io/news/2018/02/phaser-3-bootstrap-platformer) + +Also, please subscribe to the [Phaser World](https://phaser.io/community/newsletter) newsletter for details about new tutorials as they are published. ### Source Code Examples @@ -233,29 +239,21 @@ You can then run `webpack` to perform a dev build to the `build` folder, includi ![Change Log](https://phaser.io/images/github/div-change-log.png "Change Log") -## Version 3.1.1 - 20th February 2018 +## Version 3.1.2 - 23rd February 2018 ### Updates -* The entire codebase now passes our eslint config (which helped highlight a few errors), if you're submitting a PR, please ensure your PR passes the config too. -* The Web Audio Context is now suspended instead of closed to allow for prevention of 'Failed to construct AudioContext: maximum number of hardware contexts reached' errors from Chrome in a hot reload environment. We still strongly recommend reusing the same context in a production environment. See [this example](http://labs.phaser.io/view.html?src=src%5Caudio%5CWeb%20Audio%5CReuse%20AudioContext.js) for details. Fixes #3238 (thanks @z0y1 @Ziao) -* The Webpack shell plugin now fires on `onBuildExit`, meaning it'll update the examples if you use `webpack watch` (thanks @rblopes) -* Added `root: true` flag to the eslint config to stop it scanning further-up the filesystem. +* Hundreds of JSDoc fixes across the whole API. +* Tween.updateTweenData will now check to see if the Tween target still exists before trying to update its properties. +* If you try to use a local data URI in the Loader it now console warns instead of logs (thanks @samme) ### Bug Fixes -* Math.Fuzzy.Floor had an incorrect method signature. -* Arcade Physics World didn't import GetOverlapX or GetOverlapY, causing `separateCircle` to break. -* TileSprite was missing a gl reference, causing it to fail during a context loss and restore. -* The Mesh Game Object Factory entry had incorrect arguments passed to Mesh constructor. -* Removed unused `_queue` property from `ScenePlugin` class (thanks @rblopes) -* The variable `static` is no longer used in Arcade Physics, fixing the 'static is a reserved word' in strict mode error (thanks @samme) -* Fixed `Set.union`, `Set.intersect` and `Set.difference` (thanks @yupaul) -* The corner tints were being applied in the wrong order. Fixes #3252 (thanks @Rybar) -* BitmapText objects would ignore calls to setOrigin. Fixes #3249 (thanks @amkazan) -* Fixed a 1px camera jitter and bleeding issue in the renderer. Fixes #3245 (thanks @bradharms) -* Fixed the error `WebGL: INVALID_ENUM: blendEquation: invalid mode.` that would arise on iOS. Fixes #3244 (thanks @Ziao) -* The `drawBlitter` function would crash if `roundPixels` was true. Fixes #3243 (thanks @Jerenaux and @vulcanoidlogic) +* The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWAD_SLASH`. Fix #3271 (thanks @josedarioxyz) +* Fixed issue with vertex buffer creation on Static Tilemap Layer, causing tilemap layers to appear black. Fix #3266 (thanks @akleemans) +* Implemented Static Tilemap Layer scaling and Tile alpha support. +* Fixed issue with null texture on Particle Emitter batch generation. This would manifest if you had particles with blend modes on-top of other images not appearing. +* Added missing data parameter to ScenePlugin. Fixes #3810 (thanks @AleBles) Please see the complete [Change Log]((https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md)) for previous releases. @@ -288,8 +286,8 @@ All rights reserved. "Above all, video games are meant to be just one thing: fun. Fun for everyone." - Satoru Iwata -[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.0.0/phaser.js -[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.0.0/phaser.min.js +[get-js]: https://github.com/photonstorm/phaser/releases/download/v3.1.2/phaser.js +[get-minjs]: https://github.com/photonstorm/phaser/releases/download/v3.1.2/phaser.min.js [clone-http]: https://github.com/photonstorm/phaser.git [clone-ssh]: git@github.com:photonstorm/phaser.git [clone-ghwin]: github-windows://openRepo/https://github.com/photonstorm/phaser diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index f7c84671a..5efb03e9e 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 989); +/******/ return __webpack_require__(__webpack_require__.s = 997); /******/ }) /************************************************************************/ /******/ ([ @@ -313,53 +313,6 @@ module.exports = Class; /***/ }), /* 1 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Source object -// The key as a string, can only be 1 level deep (no periods), must exist at the top level of the source object -// The default value to use if the key doesn't exist - -/** - * [description] - * - * @function Phaser.Utils.Object.GetFastValue - * @since 3.0.0 - * - * @param {object} source - [description] - * @param {string} key - [description] - * @param {any} defaultValue - [description] - * - * @return {any} [description] - */ -var GetFastValue = function (source, key, defaultValue) -{ - var t = typeof(source); - - if (!source || t === 'number' || t === 'string') - { - return defaultValue; - } - else if (source.hasOwnProperty(key) && source[key] !== undefined) - { - return source[key]; - } - else - { - return defaultValue; - } -}; - -module.exports = GetFastValue; - - -/***/ }), -/* 2 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -369,9 +322,9 @@ module.exports = GetFastValue; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var DataManager = __webpack_require__(79); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); /** * @classdesc @@ -737,6 +690,53 @@ GameObject.RENDER_MASK = 15; module.exports = GameObject; +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Source object +// The key as a string, can only be 1 level deep (no periods), must exist at the top level of the source object +// The default value to use if the key doesn't exist + +/** + * [description] + * + * @function Phaser.Utils.Object.GetFastValue + * @since 3.0.0 + * + * @param {object} source - [description] + * @param {string} key - [description] + * @param {any} defaultValue - [description] + * + * @return {any} [description] + */ +var GetFastValue = function (source, key, defaultValue) +{ + var t = typeof(source); + + if (!source || t === 'number' || t === 'string') + { + return defaultValue; + } + else if (source.hasOwnProperty(key) && source[key] !== undefined) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetFastValue; + + /***/ }), /* 3 */ /***/ (function(module, exports) { @@ -1518,7 +1518,7 @@ module.exports = FileTypesManager; var Class = __webpack_require__(0); var Contains = __webpack_require__(33); var GetPoint = __webpack_require__(106); -var GetPoints = __webpack_require__(182); +var GetPoints = __webpack_require__(184); var Random = __webpack_require__(107); /** @@ -1971,7 +1971,7 @@ module.exports = Rectangle; */ var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -2216,6 +2216,45 @@ module.exports = GetAdvancedValue; /* 11 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(381), + Animation: __webpack_require__(364), + BlendMode: __webpack_require__(382), + ComputedSize: __webpack_require__(383), + Depth: __webpack_require__(384), + Flip: __webpack_require__(385), + GetBounds: __webpack_require__(386), + MatrixStack: __webpack_require__(387), + Origin: __webpack_require__(388), + Pipeline: __webpack_require__(186), + ScaleMode: __webpack_require__(389), + ScrollFactor: __webpack_require__(390), + Size: __webpack_require__(391), + Texture: __webpack_require__(392), + Tint: __webpack_require__(393), + ToJSON: __webpack_require__(394), + Transform: __webpack_require__(395), + TransformMatrix: __webpack_require__(187), + Visible: __webpack_require__(396) + +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -2379,7 +2418,7 @@ var PluginManager = new Class({ * Plugin is the object to instantiate to create the plugin * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) * - * @name PluginManager.register + * @method PluginManager.register * @since 3.0.0 * * @param {string} key - [description] @@ -2395,7 +2434,7 @@ module.exports = PluginManager; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2404,36 +2443,137 @@ module.exports = PluginManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var Class = __webpack_require__(0); +var PluginManager = __webpack_require__(12); + /** - * @namespace Phaser.GameObjects.Components + * @classdesc + * The Game Object Creator is a Scene plugin that allows you to quickly create many common + * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically + * added to the Scene. + * + * Game Objects directly register themselves with the Creator and inject their own creation + * methods into the class. + * + * @class GameObjectCreator + * @memberOf Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. */ +var GameObjectCreator = new Class({ -module.exports = { + initialize: - Alpha: __webpack_require__(380), - Animation: __webpack_require__(363), - BlendMode: __webpack_require__(381), - ComputedSize: __webpack_require__(382), - Depth: __webpack_require__(383), - Flip: __webpack_require__(384), - GetBounds: __webpack_require__(385), - Origin: __webpack_require__(386), - Pipeline: __webpack_require__(184), - ScaleMode: __webpack_require__(387), - ScrollFactor: __webpack_require__(388), - Size: __webpack_require__(389), - Texture: __webpack_require__(390), - Tint: __webpack_require__(391), - ToJSON: __webpack_require__(392), - Transform: __webpack_require__(393), - TransformMatrix: __webpack_require__(185), - Visible: __webpack_require__(394) + function GameObjectCreator (scene) + { + /** + * The Scene to which this Game Object Creator belongs. + * + * @name Phaser.GameObjects.GameObjectCreator#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + /** + * A reference to the Scene.Systems. + * + * @name Phaser.GameObjects.GameObjectCreator#systems + * @type {Phaser.Scenes.Systems} + * @protected + * @since 3.0.0 + */ + this.systems = scene.sys; + + if (!scene.sys.settings.isBooted) + { + scene.sys.events.once('boot', this.boot, this); + } + + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.GameObjectCreator#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectCreator#updateList; + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + }, + + /** + * Boots the plugin. + * + * @method Phaser.GameObjects.GameObjectCreator#boot + * @private + * @since 3.0.0 + */ + boot: function () + { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + var eventEmitter = this.systems.events; + + eventEmitter.on('shutdown', this.shutdown, this); + eventEmitter.on('destroy', this.destroy, this); + }, + + /** + * Shuts this plugin down. + * + * @method Phaser.GameObjects.GameObjectCreator#shutdown + * @since 3.0.0 + */ + shutdown: function () + { + }, + + /** + * Destroys this plugin. + * + * @method Phaser.GameObjects.GameObjectCreator#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.scene = null; + this.displayList = null; + this.updateList = null; + } + +}); + +// Static method called directly by the Game Object creator functions + +GameObjectCreator.register = function (type, factoryFunction) +{ + if (!GameObjectCreator.prototype.hasOwnProperty(type)) + { + GameObjectCreator.prototype[type] = factoryFunction; + } }; +PluginManager.register('GameObjectCreator', GameObjectCreator, 'make'); + +module.exports = GameObjectCreator; + /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2775,145 +2915,6 @@ if (true) { } -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); - -/** - * @classdesc - * The Game Object Creator is a Scene plugin that allows you to quickly create many common - * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically - * added to the Scene. - * - * Game Objects directly register themselves with the Creator and inject their own creation - * methods into the class. - * - * @class GameObjectCreator - * @memberOf Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. - */ -var GameObjectCreator = new Class({ - - initialize: - - function GameObjectCreator (scene) - { - /** - * The Scene to which this Game Object Creator belongs. - * - * @name Phaser.GameObjects.GameObjectCreator#scene - * @type {Phaser.Scene} - * @protected - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A reference to the Scene.Systems. - * - * @name Phaser.GameObjects.GameObjectCreator#systems - * @type {Phaser.Scenes.Systems} - * @protected - * @since 3.0.0 - */ - this.systems = scene.sys; - - if (!scene.sys.settings.isBooted) - { - scene.sys.events.once('boot', this.boot, this); - } - - /** - * A reference to the Scene Display List. - * - * @name Phaser.GameObjects.GameObjectCreator#displayList - * @type {Phaser.GameObjects.DisplayList} - * @protected - * @since 3.0.0 - */ - this.displayList; - - /** - * A reference to the Scene Update List. - * - * @name Phaser.GameObjects.GameObjectCreator#updateList; - * @type {Phaser.GameObjects.UpdateList} - * @protected - * @since 3.0.0 - */ - this.updateList; - }, - - /** - * Boots the plugin. - * - * @method Phaser.GameObjects.GameObjectCreator#boot - * @private - * @since 3.0.0 - */ - boot: function () - { - this.displayList = this.systems.displayList; - this.updateList = this.systems.updateList; - - var eventEmitter = this.systems.events; - - eventEmitter.on('shutdown', this.shutdown, this); - eventEmitter.on('destroy', this.destroy, this); - }, - - /** - * Shuts this plugin down. - * - * @method Phaser.GameObjects.GameObjectCreator#shutdown - * @since 3.0.0 - */ - shutdown: function () - { - }, - - /** - * Destroys this plugin. - * - * @method Phaser.GameObjects.GameObjectCreator#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.scene = null; - this.displayList = null; - this.updateList = null; - } - -}); - -// Static method called directly by the Game Object creator functions - -GameObjectCreator.register = function (type, factoryFunction) -{ - if (!GameObjectCreator.prototype.hasOwnProperty(type)) - { - GameObjectCreator.prototype[type] = factoryFunction; - } -}; - -PluginManager.register('GameObjectCreator', GameObjectCreator, 'make'); - -module.exports = GameObjectCreator; - - /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { @@ -2924,7 +2925,7 @@ module.exports = GameObjectCreator; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. @@ -3013,7 +3014,7 @@ module.exports = GetTilesWithin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RND = __webpack_require__(379); +var RND = __webpack_require__(380); var MATH_CONST = { @@ -3267,10 +3268,10 @@ module.exports = FILE_CONST; var Class = __webpack_require__(0); var CONST = __webpack_require__(17); -var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(147); -var MergeXHRSettings = __webpack_require__(148); -var XHRLoader = __webpack_require__(313); +var GetFastValue = __webpack_require__(2); +var GetURL = __webpack_require__(149); +var MergeXHRSettings = __webpack_require__(150); +var XHRLoader = __webpack_require__(314); var XHRSettings = __webpack_require__(90); /** @@ -3533,7 +3534,7 @@ var File = new Class({ if (this.src.indexOf('data:') === 0) { - console.log('Local data URI'); + console.warn('Local data URIs are not supported: ' + this.key); } else { @@ -3703,6 +3704,139 @@ module.exports = File; /***/ }), /* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BlendModes = __webpack_require__(45); +var GetAdvancedValue = __webpack_require__(10); +var ScaleModes = __webpack_require__(62); + +/** + * Builds a Game Object using the provided configuration object. + * + * @function Phaser.Gameobjects.BuildGameObject + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {object} config - [description] + * + * @return {Phaser.GameObjects.GameObject} The built Game Object. + */ +var BuildGameObject = function (scene, gameObject, config) +{ + // Position + + gameObject.x = GetAdvancedValue(config, 'x', 0); + gameObject.y = GetAdvancedValue(config, 'y', 0); + gameObject.depth = GetAdvancedValue(config, 'depth', 0); + + // Flip + + gameObject.flipX = GetAdvancedValue(config, 'flipX', false); + gameObject.flipY = GetAdvancedValue(config, 'flipY', false); + + // Scale + // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} + + var scale = GetAdvancedValue(config, 'scale', null); + + if (typeof scale === 'number') + { + gameObject.setScale(scale); + } + else if (scale !== null) + { + gameObject.scaleX = GetAdvancedValue(scale, 'x', 1); + gameObject.scaleY = GetAdvancedValue(scale, 'y', 1); + } + + // ScrollFactor + // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} + + var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null); + + if (typeof scrollFactor === 'number') + { + gameObject.setScrollFactor(scrollFactor); + } + else if (scrollFactor !== null) + { + gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1); + gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1); + } + + // Rotation + + gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); + + var angle = GetAdvancedValue(config, 'angle', null); + + if (angle !== null) + { + gameObject.angle = angle; + } + + // Alpha + + gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); + + // Origin + // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} + + var origin = GetAdvancedValue(config, 'origin', null); + + if (typeof origin === 'number') + { + gameObject.setOrigin(origin); + } + else if (origin !== null) + { + var ox = GetAdvancedValue(origin, 'x', 0.5); + var oy = GetAdvancedValue(origin, 'y', 0.5); + + gameObject.setOrigin(ox, oy); + } + + // ScaleMode + + gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT); + + // BlendMode + + gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); + + // Visible + + gameObject.visible = GetAdvancedValue(config, 'visible', true); + + // Add to Scene + + var add = GetAdvancedValue(config, 'add', true); + + if (add) + { + scene.sys.displayList.add(gameObject); + } + + if (gameObject.preUpdate) + { + scene.sys.updateList.add(gameObject); + } + + return gameObject; +}; + +module.exports = BuildGameObject; + + +/***/ }), +/* 20 */ /***/ (function(module, exports) { /** @@ -3757,7 +3891,7 @@ module.exports = { /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4001,139 +4135,6 @@ var CanvasPool = function () module.exports = CanvasPool(); -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BlendModes = __webpack_require__(45); -var GetAdvancedValue = __webpack_require__(10); -var ScaleModes = __webpack_require__(62); - -/** - * Builds a Game Object using the provided configuration object. - * - * @function Phaser.Gameobjects.BuildGameObject - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {object} config - [description] - * - * @return {Phaser.GameObjects.GameObject} The built Game Object. - */ -var BuildGameObject = function (scene, gameObject, config) -{ - // Position - - gameObject.x = GetAdvancedValue(config, 'x', 0); - gameObject.y = GetAdvancedValue(config, 'y', 0); - gameObject.depth = GetAdvancedValue(config, 'depth', 0); - - // Flip - - gameObject.flipX = GetAdvancedValue(config, 'flipX', false); - gameObject.flipY = GetAdvancedValue(config, 'flipY', false); - - // Scale - // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} - - var scale = GetAdvancedValue(config, 'scale', null); - - if (typeof scale === 'number') - { - gameObject.setScale(scale); - } - else if (scale !== null) - { - gameObject.scaleX = GetAdvancedValue(scale, 'x', 1); - gameObject.scaleY = GetAdvancedValue(scale, 'y', 1); - } - - // ScrollFactor - // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} - - var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null); - - if (typeof scrollFactor === 'number') - { - gameObject.setScrollFactor(scrollFactor); - } - else if (scrollFactor !== null) - { - gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1); - gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1); - } - - // Rotation - - gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); - - var angle = GetAdvancedValue(config, 'angle', null); - - if (angle !== null) - { - gameObject.angle = angle; - } - - // Alpha - - gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); - - // Origin - // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} - - var origin = GetAdvancedValue(config, 'origin', null); - - if (typeof origin === 'number') - { - gameObject.setOrigin(origin); - } - else if (origin !== null) - { - var ox = GetAdvancedValue(origin, 'x', 0.5); - var oy = GetAdvancedValue(origin, 'y', 0.5); - - gameObject.setOrigin(ox, oy); - } - - // ScaleMode - - gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT); - - // BlendMode - - gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); - - // Visible - - gameObject.visible = GetAdvancedValue(config, 'visible', true); - - // Add to Scene - - var add = GetAdvancedValue(config, 'add', true); - - if (add) - { - scene.sys.displayList.add(gameObject); - } - - if (gameObject.preUpdate) - { - scene.sys.updateList.add(gameObject); - } - - return gameObject; -}; - -module.exports = BuildGameObject; - - /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { @@ -4153,7 +4154,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.1.1', + VERSION: '3.1.2', BlendModes: __webpack_require__(45), @@ -4265,7 +4266,7 @@ module.exports = CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsPlainObject = __webpack_require__(165); +var IsPlainObject = __webpack_require__(167); // @param {boolean} deep - Perform a deep copy? // @param {object} target - The target object to copy to. @@ -4773,7 +4774,7 @@ module.exports = DegToRad; var Class = __webpack_require__(0); var GetColor = __webpack_require__(116); -var GetColor32 = __webpack_require__(199); +var GetColor32 = __webpack_require__(201); /** * @classdesc @@ -5286,9 +5287,9 @@ module.exports = Color; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var SpriteRender = __webpack_require__(445); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var SpriteRender = __webpack_require__(447); /** * @classdesc @@ -5743,8 +5744,8 @@ module.exports = SetTileCollision; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(305); +var Components = __webpack_require__(11); +var Rectangle = __webpack_require__(306); /** * @classdesc @@ -5789,7 +5790,7 @@ var Tile = new Class({ /** * The LayerData in the Tilemap data that this tile belongs to. * - * @name Phaser.Tilemaps.ImageCollection#layer + * @name Phaser.Tilemaps.Tile#layer * @type {Phaser.Tilemaps.LayerData} * @since 3.0.0 */ @@ -5799,7 +5800,7 @@ var Tile = new Class({ * The index of this tile within the map data corresponding to the tileset, or -1 if this * represents a blank tile. * - * @name Phaser.Tilemaps.ImageCollection#index + * @name Phaser.Tilemaps.Tile#index * @type {integer} * @since 3.0.0 */ @@ -5808,7 +5809,7 @@ var Tile = new Class({ /** * The x map coordinate of this tile in tile units. * - * @name Phaser.Tilemaps.ImageCollection#x + * @name Phaser.Tilemaps.Tile#x * @type {integer} * @since 3.0.0 */ @@ -5817,7 +5818,7 @@ var Tile = new Class({ /** * The y map coordinate of this tile in tile units. * - * @name Phaser.Tilemaps.ImageCollection#y + * @name Phaser.Tilemaps.Tile#y * @type {integer} * @since 3.0.0 */ @@ -5826,7 +5827,7 @@ var Tile = new Class({ /** * The width of the tile in pixels. * - * @name Phaser.Tilemaps.ImageCollection#width + * @name Phaser.Tilemaps.Tile#width * @type {integer} * @since 3.0.0 */ @@ -5835,7 +5836,7 @@ var Tile = new Class({ /** * The height of the tile in pixels. * - * @name Phaser.Tilemaps.ImageCollection#height + * @name Phaser.Tilemaps.Tile#height * @type {integer} * @since 3.0.0 */ @@ -5845,7 +5846,7 @@ var Tile = new Class({ * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes * within one map, but they are still placed at intervals of the base tile size. * - * @name Phaser.Tilemaps.ImageCollection#baseWidth + * @name Phaser.Tilemaps.Tile#baseWidth * @type {integer} * @since 3.0.0 */ @@ -5855,7 +5856,7 @@ var Tile = new Class({ * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes * within one map, but they are still placed at intervals of the base tile size. * - * @name Phaser.Tilemaps.ImageCollection#baseHeight + * @name Phaser.Tilemaps.Tile#baseHeight * @type {integer} * @since 3.0.0 */ @@ -5866,7 +5867,7 @@ var Tile = new Class({ * of the layer this tile is being rendered within. This property does NOT factor in camera * scroll, layer scale or layer position. * - * @name Phaser.Tilemaps.ImageCollection#pixelX + * @name Phaser.Tilemaps.Tile#pixelX * @type {number} * @since 3.0.0 */ @@ -5877,7 +5878,7 @@ var Tile = new Class({ * of the layer this tile is being rendered within. This property does NOT factor in camera * scroll, layer scale or layer position. * - * @name Phaser.Tilemaps.ImageCollection#pixelY + * @name Phaser.Tilemaps.Tile#pixelY * @type {number} * @since 3.0.0 */ @@ -5888,7 +5889,7 @@ var Tile = new Class({ /** * Tile specific properties. These usually come from Tiled. * - * @name Phaser.Tilemaps.ImageCollection#properties + * @name Phaser.Tilemaps.Tile#properties * @type {object} * @since 3.0.0 */ @@ -5897,7 +5898,7 @@ var Tile = new Class({ /** * The rotation angle of this tile. * - * @name Phaser.Tilemaps.ImageCollection#rotation + * @name Phaser.Tilemaps.Tile#rotation * @type {number} * @since 3.0.0 */ @@ -5906,7 +5907,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the left side. * - * @name Phaser.Tilemaps.ImageCollection#collideLeft + * @name Phaser.Tilemaps.Tile#collideLeft * @type {boolean} * @since 3.0.0 */ @@ -5915,7 +5916,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the right side. * - * @name Phaser.Tilemaps.ImageCollection#collideRight + * @name Phaser.Tilemaps.Tile#collideRight * @type {boolean} * @since 3.0.0 */ @@ -5924,7 +5925,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the top side. * - * @name Phaser.Tilemaps.ImageCollection#collideUp + * @name Phaser.Tilemaps.Tile#collideUp * @type {boolean} * @since 3.0.0 */ @@ -5933,7 +5934,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the bottom side. * - * @name Phaser.Tilemaps.ImageCollection#collideDown + * @name Phaser.Tilemaps.Tile#collideDown * @type {boolean} * @since 3.0.0 */ @@ -5942,7 +5943,7 @@ var Tile = new Class({ /** * Whether the tile's left edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceLeft + * @name Phaser.Tilemaps.Tile#faceLeft * @type {boolean} * @since 3.0.0 */ @@ -5951,7 +5952,7 @@ var Tile = new Class({ /** * Whether the tile's right edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceRight + * @name Phaser.Tilemaps.Tile#faceRight * @type {boolean} * @since 3.0.0 */ @@ -5960,7 +5961,7 @@ var Tile = new Class({ /** * Whether the tile's top edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceTop + * @name Phaser.Tilemaps.Tile#faceTop * @type {boolean} * @since 3.0.0 */ @@ -5969,7 +5970,7 @@ var Tile = new Class({ /** * Whether the tile's bottom edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceBottom + * @name Phaser.Tilemaps.Tile#faceBottom * @type {boolean} * @since 3.0.0 */ @@ -5978,7 +5979,7 @@ var Tile = new Class({ /** * Tile collision callback. * - * @name Phaser.Tilemaps.ImageCollection#collisionCallback + * @name Phaser.Tilemaps.Tile#collisionCallback * @type {function} * @since 3.0.0 */ @@ -5987,7 +5988,7 @@ var Tile = new Class({ /** * The context in which the collision callback will be called. * - * @name Phaser.Tilemaps.ImageCollection#collisionCallbackContext + * @name Phaser.Tilemaps.Tile#collisionCallbackContext * @type {object} * @since 3.0.0 */ @@ -5997,7 +5998,7 @@ var Tile = new Class({ * The tint to apply to this tile. Note: tint is currently a single color value instead of * the 4 corner tint component on other GameObjects. * - * @name Phaser.Tilemaps.ImageCollection#tint + * @name Phaser.Tilemaps.Tile#tint * @type {number} * @default * @since 3.0.0 @@ -6007,7 +6008,7 @@ var Tile = new Class({ /** * An empty object where physics-engine specific information (e.g. bodies) may be stored. * - * @name Phaser.Tilemaps.ImageCollection#physics + * @name Phaser.Tilemaps.Tile#physics * @type {object} * @since 3.0.0 */ @@ -6663,7 +6664,7 @@ module.exports = { /** * Hard Light blend mode. * - * @name Phaser.BlendModes.SOFT_LIGHT + * @name Phaser.BlendModes.HARD_LIGHT * @type {integer} * @since 3.0.0 */ @@ -7808,8 +7809,8 @@ module.exports = Angle; var Class = __webpack_require__(0); var Contains = __webpack_require__(53); -var GetPoint = __webpack_require__(307); -var GetPoints = __webpack_require__(308); +var GetPoint = __webpack_require__(308); +var GetPoints = __webpack_require__(309); var Random = __webpack_require__(111); /** @@ -8214,7 +8215,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -8330,7 +8331,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -9068,8 +9069,8 @@ module.exports = { var Class = __webpack_require__(0); var Contains = __webpack_require__(32); -var GetPoint = __webpack_require__(179); -var GetPoints = __webpack_require__(180); +var GetPoint = __webpack_require__(181); +var GetPoints = __webpack_require__(182); var Random = __webpack_require__(105); /** @@ -10225,7 +10226,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(494))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(496))) /***/ }), /* 68 */ @@ -10279,11 +10280,11 @@ module.exports = Contains; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Actions = __webpack_require__(166); +var Actions = __webpack_require__(168); var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(4); -var Range = __webpack_require__(272); +var Range = __webpack_require__(274); var Set = __webpack_require__(61); var Sprite = __webpack_require__(37); @@ -11117,9 +11118,9 @@ module.exports = Group; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var ImageRender = __webpack_require__(567); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var ImageRender = __webpack_require__(569); /** * @classdesc @@ -11207,7 +11208,7 @@ module.exports = Image; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(575); +var EaseMap = __webpack_require__(577); /** * [description] @@ -11370,7 +11371,7 @@ module.exports = IsInLayerBounds; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -11590,7 +11591,7 @@ module.exports = LayerData; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -11795,8 +11796,8 @@ var BlendModes = __webpack_require__(45); var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); @@ -12578,7 +12579,7 @@ module.exports = Shuffle; */ var Class = __webpack_require__(0); -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); var Sprite = __webpack_require__(37); var Vector2 = __webpack_require__(6); var Vector4 = __webpack_require__(119); @@ -13060,7 +13061,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var NOOP = __webpack_require__(3); /** @@ -13126,29 +13127,6 @@ var BaseSoundManager = new Class({ */ this.volume = 1; - /** - * Global playback rate at which all the sounds will be played. - * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed - * and 2.0 doubles the audio's playback speed. - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.rate = 1; - - /** - * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). - * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.detune = 0; - /** * Flag indicating if sounds should be paused when game looses focus, * for instance when user switches to another tab/program/app. @@ -13159,6 +13137,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.pauseOnBlur = true; + game.events.on('blur', function () { if (this.pauseOnBlur) @@ -13166,6 +13145,7 @@ var BaseSoundManager = new Class({ this.onBlur(); } }, this); + game.events.on('focus', function () { if (this.pauseOnBlur) @@ -13173,6 +13153,7 @@ var BaseSoundManager = new Class({ this.onFocus(); } }, this); + game.events.once('destroy', this.destroy, this); /** @@ -13220,6 +13201,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.unlocked = false; + if (this.locked) { this.unlock(); @@ -13541,7 +13523,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param [scope] - Callback context. + * @param {object} scope - Callback context. */ forEachActiveSound: function (callbackfn, scope) { @@ -13553,50 +13535,81 @@ var BaseSoundManager = new Class({ callbackfn.call(scope || _this, sound, index, _this.sounds); } }); - } -}); -Object.defineProperty(BaseSoundManager.prototype, 'rate', { - get: function () - { - return this._rate; }, - set: function (value) - { - this._rate = value; - this.forEachActiveSound(function (sound) - { - sound.setRate(); - }); - /** - * @event Phaser.Sound.BaseSoundManager#rate - * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. - * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#rate property. - */ - this.emit('rate', this, value); - } -}); -Object.defineProperty(BaseSoundManager.prototype, 'detune', { - get: function () - { - return this._detune; + /** + * Global playback rate at which all the sounds will be played. + * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audio's playback speed. + * + * @name Phaser.Sound.BaseSoundManager#rate + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rate: { + + get: function () + { + return this._rate; + }, + + set: function (value) + { + this._rate = value; + + this.forEachActiveSound(function (sound) + { + sound.setRate(); + }); + + /** + * @event Phaser.Sound.BaseSoundManager#rate + * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. + * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#rate property. + */ + this.emit('rate', this, value); + } + }, - set: function (value) - { - this._detune = value; - this.forEachActiveSound(function (sound) - { - sound.setRate(); - }); - /** - * @event Phaser.Sound.BaseSoundManager#detune - * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. - * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#detune property. - */ - this.emit('detune', this, value); + /** + * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + * + * @name Phaser.Sound.BaseSoundManager#detune + * @type {number} + * @default 0 + * @since 3.0.0 + */ + detune: { + + get: function () + { + return this._detune; + }, + + set: function (value) + { + this._detune = value; + + this.forEachActiveSound(function (sound) + { + sound.setRate(); + }); + + /** + * @event Phaser.Sound.BaseSoundManager#detune + * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. + * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#detune property. + */ + this.emit('detune', this, value); + } + } + }); + module.exports = BaseSoundManager; @@ -13610,7 +13623,7 @@ module.exports = BaseSoundManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var Extend = __webpack_require__(23); var NOOP = __webpack_require__(3); @@ -15109,7 +15122,7 @@ var TWEEN_CONST = { /** * TweenData state. * - * @name Phaser.Tweens.OFFSET_DELAY + * @name Phaser.Tweens.DELAY * @type {integer} * @since 3.0.0 */ @@ -15127,7 +15140,7 @@ var TWEEN_CONST = { /** * TweenData state. * - * @name Phaser.Tweens.PLAYING_FORWARD + * @name Phaser.Tweens.PENDING_RENDER * @type {integer} * @since 3.0.0 */ @@ -15192,7 +15205,7 @@ var TWEEN_CONST = { /** * Tween state. * - * @name Phaser.Tweens.LOOP_DELAY + * @name Phaser.Tweens.PAUSED * @type {integer} * @since 3.0.0 */ @@ -15259,9 +15272,9 @@ module.exports = TWEEN_CONST; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var MeshRender = __webpack_require__(647); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var MeshRender = __webpack_require__(655); /** * @classdesc @@ -15558,7 +15571,7 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(326); +var Components = __webpack_require__(327); var Sprite = __webpack_require__(37); /** @@ -15664,47 +15677,47 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(150), + CalculateFacesAt: __webpack_require__(152), CalculateFacesWithin: __webpack_require__(34), - Copy: __webpack_require__(863), - CreateFromTiles: __webpack_require__(864), - CullTiles: __webpack_require__(865), - Fill: __webpack_require__(866), - FilterTiles: __webpack_require__(867), - FindByIndex: __webpack_require__(868), - FindTile: __webpack_require__(869), - ForEachTile: __webpack_require__(870), + Copy: __webpack_require__(871), + CreateFromTiles: __webpack_require__(872), + CullTiles: __webpack_require__(873), + Fill: __webpack_require__(874), + FilterTiles: __webpack_require__(875), + FindByIndex: __webpack_require__(876), + FindTile: __webpack_require__(877), + ForEachTile: __webpack_require__(878), GetTileAt: __webpack_require__(97), - GetTileAtWorldXY: __webpack_require__(871), + GetTileAtWorldXY: __webpack_require__(879), GetTilesWithin: __webpack_require__(15), - GetTilesWithinShape: __webpack_require__(872), - GetTilesWithinWorldXY: __webpack_require__(873), - HasTileAt: __webpack_require__(343), - HasTileAtWorldXY: __webpack_require__(874), + GetTilesWithinShape: __webpack_require__(880), + GetTilesWithinWorldXY: __webpack_require__(881), + HasTileAt: __webpack_require__(344), + HasTileAtWorldXY: __webpack_require__(882), IsInLayerBounds: __webpack_require__(74), - PutTileAt: __webpack_require__(151), - PutTileAtWorldXY: __webpack_require__(875), - PutTilesAt: __webpack_require__(876), - Randomize: __webpack_require__(877), - RemoveTileAt: __webpack_require__(344), - RemoveTileAtWorldXY: __webpack_require__(878), - RenderDebug: __webpack_require__(879), - ReplaceByIndex: __webpack_require__(342), - SetCollision: __webpack_require__(880), - SetCollisionBetween: __webpack_require__(881), - SetCollisionByExclusion: __webpack_require__(882), - SetCollisionByProperty: __webpack_require__(883), - SetCollisionFromCollisionGroup: __webpack_require__(884), - SetTileIndexCallback: __webpack_require__(885), - SetTileLocationCallback: __webpack_require__(886), - Shuffle: __webpack_require__(887), - SwapByIndex: __webpack_require__(888), + PutTileAt: __webpack_require__(153), + PutTileAtWorldXY: __webpack_require__(883), + PutTilesAt: __webpack_require__(884), + Randomize: __webpack_require__(885), + RemoveTileAt: __webpack_require__(345), + RemoveTileAtWorldXY: __webpack_require__(886), + RenderDebug: __webpack_require__(887), + ReplaceByIndex: __webpack_require__(343), + SetCollision: __webpack_require__(888), + SetCollisionBetween: __webpack_require__(889), + SetCollisionByExclusion: __webpack_require__(890), + SetCollisionByProperty: __webpack_require__(891), + SetCollisionFromCollisionGroup: __webpack_require__(892), + SetTileIndexCallback: __webpack_require__(893), + SetTileLocationCallback: __webpack_require__(894), + Shuffle: __webpack_require__(895), + SwapByIndex: __webpack_require__(896), TileToWorldX: __webpack_require__(98), - TileToWorldXY: __webpack_require__(889), + TileToWorldXY: __webpack_require__(897), TileToWorldY: __webpack_require__(99), - WeightedRandomize: __webpack_require__(890), + WeightedRandomize: __webpack_require__(898), WorldToTileX: __webpack_require__(39), - WorldToTileXY: __webpack_require__(891), + WorldToTileXY: __webpack_require__(899), WorldToTileY: __webpack_require__(40) }; @@ -16319,17 +16332,17 @@ module.exports = GetNewValue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(157); +var Defaults = __webpack_require__(159); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); var GetNewValue = __webpack_require__(101); -var GetProps = __webpack_require__(357); -var GetTargets = __webpack_require__(155); +var GetProps = __webpack_require__(358); +var GetTargets = __webpack_require__(157); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(156); -var Tween = __webpack_require__(158); -var TweenData = __webpack_require__(159); +var GetValueOp = __webpack_require__(158); +var Tween = __webpack_require__(160); +var TweenData = __webpack_require__(161); /** * [description] @@ -17238,7 +17251,7 @@ module.exports = Map; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var Rectangle = __webpack_require__(8); -var TransformMatrix = __webpack_require__(185); +var TransformMatrix = __webpack_require__(187); var ValueToColor = __webpack_require__(115); var Vector2 = __webpack_require__(6); @@ -18593,10 +18606,10 @@ module.exports = Camera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HexStringToColor = __webpack_require__(198); -var IntegerToColor = __webpack_require__(200); -var ObjectToColor = __webpack_require__(202); -var RGBStringToColor = __webpack_require__(203); +var HexStringToColor = __webpack_require__(200); +var IntegerToColor = __webpack_require__(202); +var ObjectToColor = __webpack_require__(204); +var RGBStringToColor = __webpack_require__(205); /** * Converts the given source color value into an instance of a Color class. @@ -18681,9 +18694,9 @@ module.exports = GetColor; var Class = __webpack_require__(0); var Matrix4 = __webpack_require__(118); -var RandomXYZ = __webpack_require__(204); -var RandomXYZW = __webpack_require__(205); -var RotateVec3 = __webpack_require__(206); +var RandomXYZ = __webpack_require__(206); +var RandomXYZW = __webpack_require__(207); +var RotateVec3 = __webpack_require__(208); var Set = __webpack_require__(61); var Sprite3D = __webpack_require__(81); var Vector2 = __webpack_require__(6); @@ -18729,7 +18742,7 @@ var Camera = new Class({ * [description] * * @name Phaser.Cameras.Sprite3D#displayList - * @type {[type]} + * @type {Phaser.GameObjects.DisplayList} * @since 3.0.0 */ this.displayList = scene.sys.displayList; @@ -18738,7 +18751,7 @@ var Camera = new Class({ * [description] * * @name Phaser.Cameras.Sprite3D#updateList - * @type {[type]} + * @type {Phaser.GameObjects.UpdateList} * @since 3.0.0 */ this.updateList = scene.sys.updateList; @@ -21216,7 +21229,7 @@ var Vector4 = new Class({ /** * The x component of this Vector. * - * @name Phaser.Math.Vector3#x + * @name Phaser.Math.Vector4#x * @type {number} * @default 0 * @since 3.0.0 @@ -21225,7 +21238,7 @@ var Vector4 = new Class({ /** * The y component of this Vector. * - * @name Phaser.Math.Vector3#y + * @name Phaser.Math.Vector4#y * @type {number} * @default 0 * @since 3.0.0 @@ -21234,7 +21247,7 @@ var Vector4 = new Class({ /** * The z component of this Vector. * - * @name Phaser.Math.Vector3#z + * @name Phaser.Math.Vector4#z * @type {number} * @default 0 * @since 3.0.0 @@ -21243,7 +21256,7 @@ var Vector4 = new Class({ /** * The w component of this Vector. * - * @name Phaser.Math.Vector3#w + * @name Phaser.Math.Vector4#w * @type {number} * @default 0 * @since 3.0.0 @@ -21271,7 +21284,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#clone * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} [description] */ clone: function () { @@ -21284,9 +21297,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#copy * @since 3.0.0 * - * @param {[type]} src - [description] + * @param {Phaser.Math.Vector4} src - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ copy: function (src) { @@ -21304,9 +21317,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#equals * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {boolean} [description] */ equals: function (v) { @@ -21319,12 +21332,12 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#set * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} z - [description] - * @param {[type]} w - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} z - [description] + * @param {number} w - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ set: function (x, y, z, w) { @@ -21352,9 +21365,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#add * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ add: function (v) { @@ -21372,9 +21385,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#subtract * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ subtract: function (v) { @@ -21392,9 +21405,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#scale * @since 3.0.0 * - * @param {[type]} scale - [description] + * @param {number} scale - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ scale: function (scale) { @@ -21412,7 +21425,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#length * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ length: function () { @@ -21430,7 +21443,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#lengthSq * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ lengthSq: function () { @@ -21448,7 +21461,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#normalize * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ normalize: function () { @@ -21479,7 +21492,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ dot: function (v) { @@ -21495,7 +21508,7 @@ var Vector4 = new Class({ * @param {[type]} v - [description] * @param {[type]} t - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ lerp: function (v, t) { @@ -21522,7 +21535,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ multiply: function (v) { @@ -21542,7 +21555,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ divide: function (v) { @@ -21562,7 +21575,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ distance: function (v) { @@ -21582,7 +21595,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ distanceSq: function (v) { @@ -21600,7 +21613,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#negate * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ negate: function () { @@ -21620,7 +21633,7 @@ var Vector4 = new Class({ * * @param {[type]} mat - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ transformMat4: function (mat) { @@ -21648,7 +21661,7 @@ var Vector4 = new Class({ * * @param {[type]} q - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ transformQuat: function (q) { @@ -21681,7 +21694,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#reset * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ reset: function () { @@ -21695,6 +21708,7 @@ var Vector4 = new Class({ }); +// TODO: Check if these are required internally, if not, remove. Vector4.prototype.sub = Vector4.prototype.subtract; Vector4.prototype.mul = Vector4.prototype.multiply; Vector4.prototype.div = Vector4.prototype.divide; @@ -22032,7 +22046,7 @@ module.exports = AddToDOM; var OS = __webpack_require__(67); var Browser = __webpack_require__(82); -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); /** * Determines the features of the browser running this Phaser Game instance. @@ -22143,11 +22157,8 @@ function init () // Can't be done on a webgl context var image = ctx2D.createImageData(1, 1); - /** - * Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. - * - * @author Matt DesLauriers (@mattdesl) - */ + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) isUint8 = image.data instanceof Uint8ClampedArray; CanvasPool.remove(canvas); @@ -23216,11 +23227,11 @@ module.exports = { PERIOD: 190, /** - * @name Phaser.Input.Keyboard.KeyCodes.FORWAD_SLASH + * @name Phaser.Input.Keyboard.KeyCodes.FORWARD_SLASH * @type {integer} * @since 3.0.0 */ - FORWAD_SLASH: 191, + FORWARD_SLASH: 191, /** * @name Phaser.Input.Keyboard.KeyCodes.BACK_SLASH @@ -23272,10 +23283,10 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(83); -var GetPhysicsPlugins = __webpack_require__(527); -var GetScenePlugins = __webpack_require__(528); -var Plugins = __webpack_require__(231); -var Settings = __webpack_require__(252); +var GetPhysicsPlugins = __webpack_require__(529); +var GetScenePlugins = __webpack_require__(530); +var Plugins = __webpack_require__(233); +var Settings = __webpack_require__(254); /** * @classdesc @@ -24408,12 +24419,12 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(265); -var ParseFromAtlas = __webpack_require__(544); -var ParseRetroFont = __webpack_require__(545); -var Render = __webpack_require__(546); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetBitmapTextSize = __webpack_require__(267); +var ParseFromAtlas = __webpack_require__(546); +var ParseRetroFont = __webpack_require__(547); +var Render = __webpack_require__(548); /** * @classdesc @@ -24676,12 +24687,12 @@ module.exports = BitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(549); -var Bob = __webpack_require__(552); +var BlitterRender = __webpack_require__(551); +var Bob = __webpack_require__(554); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var Frame = __webpack_require__(130); -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); var List = __webpack_require__(86); /** @@ -24935,10 +24946,10 @@ module.exports = Blitter; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(265); -var Render = __webpack_require__(553); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetBitmapTextSize = __webpack_require__(267); +var Render = __webpack_require__(555); /** * @classdesc @@ -25318,12 +25329,12 @@ module.exports = DynamicBitmapText; var Camera = __webpack_require__(114); var Class = __webpack_require__(0); var Commands = __webpack_require__(127); -var Components = __webpack_require__(12); -var Ellipse = __webpack_require__(267); -var GameObject = __webpack_require__(2); +var Components = __webpack_require__(11); +var Ellipse = __webpack_require__(269); +var GameObject = __webpack_require__(1); var GetValue = __webpack_require__(4); var MATH_CONST = __webpack_require__(16); -var Render = __webpack_require__(565); +var Render = __webpack_require__(567); /** * @classdesc @@ -26450,8 +26461,8 @@ module.exports = Graphics; var Class = __webpack_require__(0); var Contains = __webpack_require__(68); -var GetPoint = __webpack_require__(268); -var GetPoints = __webpack_require__(269); +var GetPoint = __webpack_require__(270); +var GetPoints = __webpack_require__(271); var Random = __webpack_require__(109); /** @@ -26853,12 +26864,12 @@ module.exports = CircumferencePoint; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GravityWell = __webpack_require__(570); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GravityWell = __webpack_require__(572); var List = __webpack_require__(86); -var ParticleEmitter = __webpack_require__(571); -var Render = __webpack_require__(610); +var ParticleEmitter = __webpack_require__(573); +var Render = __webpack_require__(612); /** * @classdesc @@ -27304,6 +27315,87 @@ module.exports = GetRandomElement; /* 139 */ /***/ (function(module, exports, __webpack_require__) { +var Class = __webpack_require__(0); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var RenderTextureWebGL = __webpack_require__(615); +var Render = __webpack_require__(616); + +var RenderTexture = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.MatrixStack, + Components.Origin, + Components.Pipeline, + Components.ScaleMode, + Components.ScrollFactor, + Components.Size, + Components.Tint, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function RenderTexture(scene, x, y, width, height) + { + GameObject.call(this, scene, 'RenderTexture'); + this.initMatrixStack(); + + this.renderer = scene.sys.game.renderer; + + if (this.renderer.type === Phaser.WEBGL) + { + var gl = this.renderer.gl; + this.gl = gl; + this.fill = RenderTextureWebGL.fill; + this.clear = RenderTextureWebGL.clear; + this.draw = RenderTextureWebGL.draw; + this.drawFrame = RenderTextureWebGL.drawFrame; + this.texture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false); + this.framebuffer = this.renderer.createFramebuffer(width, height, this.texture, false); + } + else + { + // For now we'll just add canvas stubs + this.fill = function () {}; + this.clear = function () {}; + this.draw = function () {}; + this.drawFrame = function () {}; + } + + this.setPosition(x, y); + this.setSize(width, height); + this.initPipeline('TextureTintPipeline'); + }, + + destroy: function () + { + GameObject.destroy.call(this); + if (this.renderer.type === Phaser.WEBGL) + { + this.renderer.deleteTexture(this.texture); + this.renderer.deleteFramebuffer(this.framebuffer); + } + } + +}); + +module.exports = RenderTexture; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -27311,15 +27403,15 @@ module.exports = GetRandomElement; */ var AddToDOM = __webpack_require__(123); -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetTextSize = __webpack_require__(613); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetTextSize = __webpack_require__(619); var GetValue = __webpack_require__(4); -var RemoveFromDOM = __webpack_require__(229); -var TextRender = __webpack_require__(614); -var TextStyle = __webpack_require__(617); +var RemoveFromDOM = __webpack_require__(231); +var TextRender = __webpack_require__(620); +var TextStyle = __webpack_require__(623); /** * @classdesc @@ -28403,7 +28495,7 @@ module.exports = Text; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28412,12 +28504,12 @@ module.exports = Text; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetPowerOfTwo = __webpack_require__(288); -var TileSpriteRender = __webpack_require__(619); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetPowerOfTwo = __webpack_require__(290); +var TileSpriteRender = __webpack_require__(625); /** * @classdesc @@ -28656,7 +28748,96 @@ module.exports = TileSprite; /***/ }), -/* 141 */ +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetAdvancedValue = __webpack_require__(10); + +/** + * Adds an Animation component to a Sprite and populates it based on the given config. + * + * @function Phaser.Gameobjects.BuildGameObjectAnimation + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Sprite} sprite - [description] + * @param {object} config - [description] + * + * @return {Phaser.GameObjects.Sprite} The updated Sprite. + */ +var BuildGameObjectAnimation = function (sprite, config) +{ + var animConfig = GetAdvancedValue(config, 'anims', null); + + if (animConfig === null) + { + return sprite; + } + + if (typeof animConfig === 'string') + { + // { anims: 'key' } + sprite.anims.play(animConfig); + } + else if (typeof animConfig === 'object') + { + // { anims: { + // key: string + // startFrame: [string|integer] + // delay: [float] + // repeat: [integer] + // repeatDelay: [float] + // yoyo: [boolean] + // play: [boolean] + // delayedPlay: [boolean] + // } + // } + + var anims = sprite.anims; + + var key = GetAdvancedValue(animConfig, 'key', undefined); + var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); + + var delay = GetAdvancedValue(animConfig, 'delay', 0); + var repeat = GetAdvancedValue(animConfig, 'repeat', 0); + var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); + var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); + + var play = GetAdvancedValue(animConfig, 'play', false); + var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); + + anims.delay(delay); + anims.repeat(repeat); + anims.repeatDelay(repeatDelay); + anims.yoyo(yoyo); + + if (play) + { + anims.play(key, startFrame); + } + else if (delayedPlay > 0) + { + anims.delayedPlay(delayedPlay, key, startFrame); + } + else + { + anims.load(key); + } + } + + return sprite; +}; + +module.exports = BuildGameObjectAnimation; + + +/***/ }), +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29255,7 +29436,7 @@ module.exports = Quad; /***/ }), -/* 142 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -29341,7 +29522,7 @@ module.exports = ContainsArray; /***/ }), -/* 143 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -29387,7 +29568,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 144 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -29436,7 +29617,7 @@ module.exports = Contains; /***/ }), -/* 145 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -29464,7 +29645,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 146 */ +/* 148 */ /***/ (function(module, exports) { /** @@ -29516,7 +29697,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 147 */ +/* 149 */ /***/ (function(module, exports) { /** @@ -29557,7 +29738,7 @@ module.exports = GetURL; /***/ }), -/* 148 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29605,8 +29786,8 @@ module.exports = MergeXHRSettings; /***/ }), -/* 149 */, -/* 150 */ +/* 151 */, +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29681,7 +29862,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 151 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29692,7 +29873,7 @@ module.exports = CalculateFacesAt; var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(150); +var CalculateFacesAt = __webpack_require__(152); var SetTileCollision = __webpack_require__(43); /** @@ -29760,7 +29941,7 @@ module.exports = PutTileAt; /***/ }), -/* 152 */ +/* 154 */ /***/ (function(module, exports) { /** @@ -29798,7 +29979,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 153 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29807,7 +29988,7 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var LayerData = __webpack_require__(75); var MapData = __webpack_require__(76); var Tile = __webpack_require__(44); @@ -29890,7 +30071,7 @@ module.exports = Parse2DArray; /***/ }), -/* 154 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29899,10 +30080,10 @@ module.exports = Parse2DArray; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var MapData = __webpack_require__(76); -var Parse = __webpack_require__(345); -var Tilemap = __webpack_require__(353); +var Parse = __webpack_require__(346); +var Tilemap = __webpack_require__(354); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -29976,7 +30157,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 155 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30023,7 +30204,7 @@ module.exports = GetTargets; /***/ }), -/* 156 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -30196,7 +30377,7 @@ module.exports = GetValueOp; /***/ }), -/* 157 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -30238,7 +30419,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 158 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30248,7 +30429,7 @@ module.exports = TWEEN_DEFAULTS; */ var Class = __webpack_require__(0); -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var GameObjectFactory = __webpack_require__(9); var TWEEN_CONST = __webpack_require__(87); @@ -31379,6 +31560,12 @@ var Tween = new Class({ case TWEEN_CONST.PLAYING_FORWARD: case TWEEN_CONST.PLAYING_BACKWARD: + if (!tweenData.target) + { + tweenData.state = TWEEN_CONST.COMPLETE; + break; + } + var elapsed = tweenData.elapsed; var duration = tweenData.duration; var diff = 0; @@ -31483,15 +31670,22 @@ var Tween = new Class({ case TWEEN_CONST.PENDING_RENDER: - tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]); + if (tweenData.target) + { + tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]); - tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start); + tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start); - tweenData.current = tweenData.start; + tweenData.current = tweenData.start; - tweenData.target[tweenData.key] = tweenData.start; + tweenData.target[tweenData.key] = tweenData.start; - tweenData.state = TWEEN_CONST.PLAYING_FORWARD; + tweenData.state = TWEEN_CONST.PLAYING_FORWARD; + } + else + { + tweenData.state = TWEEN_CONST.COMPLETE; + } break; } @@ -31559,7 +31753,7 @@ module.exports = Tween; /***/ }), -/* 159 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -31673,7 +31867,7 @@ module.exports = TweenData; /***/ }), -/* 160 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31703,7 +31897,7 @@ module.exports = Wrap; /***/ }), -/* 161 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31733,9 +31927,9 @@ module.exports = WrapDegrees; /***/ }), -/* 162 */, -/* 163 */, -/* 164 */ +/* 164 */, +/* 165 */, +/* 166 */ /***/ (function(module, exports) { var g; @@ -31762,7 +31956,7 @@ module.exports = g; /***/ }), -/* 165 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -31818,7 +32012,7 @@ module.exports = IsPlainObject; /***/ }), -/* 166 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31833,57 +32027,57 @@ module.exports = IsPlainObject; module.exports = { - Angle: __webpack_require__(375), - Call: __webpack_require__(376), - GetFirst: __webpack_require__(377), - GridAlign: __webpack_require__(378), - IncAlpha: __webpack_require__(395), - IncX: __webpack_require__(396), - IncXY: __webpack_require__(397), - IncY: __webpack_require__(398), - PlaceOnCircle: __webpack_require__(399), - PlaceOnEllipse: __webpack_require__(400), - PlaceOnLine: __webpack_require__(401), - PlaceOnRectangle: __webpack_require__(402), - PlaceOnTriangle: __webpack_require__(403), - PlayAnimation: __webpack_require__(404), - RandomCircle: __webpack_require__(405), - RandomEllipse: __webpack_require__(406), - RandomLine: __webpack_require__(407), - RandomRectangle: __webpack_require__(408), - RandomTriangle: __webpack_require__(409), - Rotate: __webpack_require__(410), - RotateAround: __webpack_require__(411), - RotateAroundDistance: __webpack_require__(412), - ScaleX: __webpack_require__(413), - ScaleXY: __webpack_require__(414), - ScaleY: __webpack_require__(415), - SetAlpha: __webpack_require__(416), - SetBlendMode: __webpack_require__(417), - SetDepth: __webpack_require__(418), - SetHitArea: __webpack_require__(419), - SetOrigin: __webpack_require__(420), - SetRotation: __webpack_require__(421), - SetScale: __webpack_require__(422), - SetScaleX: __webpack_require__(423), - SetScaleY: __webpack_require__(424), - SetTint: __webpack_require__(425), - SetVisible: __webpack_require__(426), - SetX: __webpack_require__(427), - SetXY: __webpack_require__(428), - SetY: __webpack_require__(429), - ShiftPosition: __webpack_require__(430), - Shuffle: __webpack_require__(431), - SmootherStep: __webpack_require__(432), - SmoothStep: __webpack_require__(433), - Spread: __webpack_require__(434), - ToggleVisible: __webpack_require__(435) + Angle: __webpack_require__(376), + Call: __webpack_require__(377), + GetFirst: __webpack_require__(378), + GridAlign: __webpack_require__(379), + IncAlpha: __webpack_require__(397), + IncX: __webpack_require__(398), + IncXY: __webpack_require__(399), + IncY: __webpack_require__(400), + PlaceOnCircle: __webpack_require__(401), + PlaceOnEllipse: __webpack_require__(402), + PlaceOnLine: __webpack_require__(403), + PlaceOnRectangle: __webpack_require__(404), + PlaceOnTriangle: __webpack_require__(405), + PlayAnimation: __webpack_require__(406), + RandomCircle: __webpack_require__(407), + RandomEllipse: __webpack_require__(408), + RandomLine: __webpack_require__(409), + RandomRectangle: __webpack_require__(410), + RandomTriangle: __webpack_require__(411), + Rotate: __webpack_require__(412), + RotateAround: __webpack_require__(413), + RotateAroundDistance: __webpack_require__(414), + ScaleX: __webpack_require__(415), + ScaleXY: __webpack_require__(416), + ScaleY: __webpack_require__(417), + SetAlpha: __webpack_require__(418), + SetBlendMode: __webpack_require__(419), + SetDepth: __webpack_require__(420), + SetHitArea: __webpack_require__(421), + SetOrigin: __webpack_require__(422), + SetRotation: __webpack_require__(423), + SetScale: __webpack_require__(424), + SetScaleX: __webpack_require__(425), + SetScaleY: __webpack_require__(426), + SetTint: __webpack_require__(427), + SetVisible: __webpack_require__(428), + SetX: __webpack_require__(429), + SetXY: __webpack_require__(430), + SetY: __webpack_require__(431), + ShiftPosition: __webpack_require__(432), + Shuffle: __webpack_require__(433), + SmootherStep: __webpack_require__(434), + SmoothStep: __webpack_require__(435), + Spread: __webpack_require__(436), + ToggleVisible: __webpack_require__(437) }; /***/ }), -/* 167 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31892,19 +32086,19 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ALIGN_CONST = __webpack_require__(168); +var ALIGN_CONST = __webpack_require__(170); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(169); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(170); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(171); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(172); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(174); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(175); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(176); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(177); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(178); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(171); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(172); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(173); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(174); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(176); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(177); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(178); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(179); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(180); /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -31930,7 +32124,7 @@ module.exports = QuickSet; /***/ }), -/* 168 */ +/* 170 */ /***/ (function(module, exports) { /** @@ -32064,7 +32258,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32106,7 +32300,7 @@ module.exports = BottomCenter; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32148,7 +32342,7 @@ module.exports = BottomLeft; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32190,7 +32384,7 @@ module.exports = BottomRight; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32199,7 +32393,7 @@ module.exports = BottomRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(173); +var CenterOn = __webpack_require__(175); var GetCenterX = __webpack_require__(46); var GetCenterY = __webpack_require__(49); @@ -32230,7 +32424,7 @@ module.exports = Center; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32265,7 +32459,7 @@ module.exports = CenterOn; /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32307,7 +32501,7 @@ module.exports = LeftCenter; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32349,7 +32543,7 @@ module.exports = RightCenter; /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32391,7 +32585,7 @@ module.exports = TopCenter; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32433,7 +32627,7 @@ module.exports = TopLeft; /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32475,7 +32669,7 @@ module.exports = TopRight; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32516,7 +32710,7 @@ module.exports = GetPoint; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32525,7 +32719,7 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(181); +var Circumference = __webpack_require__(183); var CircumferencePoint = __webpack_require__(104); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -32568,7 +32762,7 @@ module.exports = GetPoints; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -32596,7 +32790,7 @@ module.exports = Circumference; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32648,7 +32842,7 @@ module.exports = GetPoints; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -32688,7 +32882,7 @@ module.exports = RotateAround; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -32814,7 +33008,7 @@ module.exports = Pipeline; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33207,7 +33401,7 @@ module.exports = TransformMatrix; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33325,7 +33519,7 @@ module.exports = MarchingAnts; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -33365,7 +33559,7 @@ module.exports = RotateLeft; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -33405,7 +33599,7 @@ module.exports = RotateRight; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -33478,7 +33672,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 190 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -33510,7 +33704,7 @@ module.exports = SmootherStep; /***/ }), -/* 191 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -33542,7 +33736,7 @@ module.exports = SmoothStep; /***/ }), -/* 192 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33552,7 +33746,7 @@ module.exports = SmoothStep; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(193); +var Frame = __webpack_require__(195); var GetValue = __webpack_require__(4); /** @@ -33601,7 +33795,7 @@ var Animation = new Class({ /** * A frame based animation (as opposed to a bone based animation) * - * @name Phaser.Animations.Animation#key + * @name Phaser.Animations.Animation#type * @type {string} * @default frame * @since 3.0.0 @@ -34444,7 +34638,7 @@ module.exports = Animation; /***/ }), -/* 193 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34630,7 +34824,7 @@ module.exports = AnimationFrame; /***/ }), -/* 194 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34639,12 +34833,12 @@ module.exports = AnimationFrame; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(192); +var Animation = __webpack_require__(194); var Class = __webpack_require__(0); var CustomMap = __webpack_require__(113); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var GetValue = __webpack_require__(4); -var Pad = __webpack_require__(195); +var Pad = __webpack_require__(197); /** * @classdesc @@ -35227,7 +35421,7 @@ module.exports = AnimationManager; /***/ }), -/* 195 */ +/* 197 */ /***/ (function(module, exports) { /** @@ -35303,7 +35497,7 @@ module.exports = Pad; /***/ }), -/* 196 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35314,7 +35508,7 @@ module.exports = Pad; var Class = __webpack_require__(0); var CustomMap = __webpack_require__(113); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); /** * @classdesc @@ -35480,7 +35674,7 @@ module.exports = BaseCache; /***/ }), -/* 197 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35489,7 +35683,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(196); +var BaseCache = __webpack_require__(198); var Class = __webpack_require__(0); /** @@ -35704,7 +35898,7 @@ module.exports = CacheManager; /***/ }), -/* 198 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35757,7 +35951,7 @@ module.exports = HexStringToColor; /***/ }), -/* 199 */ +/* 201 */ /***/ (function(module, exports) { /** @@ -35788,7 +35982,7 @@ module.exports = GetColor32; /***/ }), -/* 200 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35798,7 +35992,7 @@ module.exports = GetColor32; */ var Color = __webpack_require__(36); -var IntegerToRGB = __webpack_require__(201); +var IntegerToRGB = __webpack_require__(203); /** * Converts the given color value into an instance of a Color object. @@ -35821,7 +36015,7 @@ module.exports = IntegerToColor; /***/ }), -/* 201 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -35869,7 +36063,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 202 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35899,7 +36093,7 @@ module.exports = ObjectToColor; /***/ }), -/* 203 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35945,7 +36139,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 204 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -35985,7 +36179,7 @@ module.exports = RandomXYZ; /***/ }), -/* 205 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -36022,7 +36216,7 @@ module.exports = RandomXYZW; /***/ }), -/* 206 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36033,7 +36227,7 @@ module.exports = RandomXYZW; var Vector3 = __webpack_require__(51); var Matrix4 = __webpack_require__(118); -var Quaternion = __webpack_require__(207); +var Quaternion = __webpack_require__(209); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -36070,7 +36264,7 @@ module.exports = RotateVec3; /***/ }), -/* 207 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36084,7 +36278,7 @@ module.exports = RotateVec3; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); -var Matrix3 = __webpack_require__(208); +var Matrix3 = __webpack_require__(210); var EPSILON = 0.000001; @@ -36838,7 +37032,7 @@ module.exports = Quaternion; /***/ }), -/* 208 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37428,7 +37622,7 @@ module.exports = Matrix3; /***/ }), -/* 209 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37615,7 +37809,7 @@ module.exports = OrthographicCamera; /***/ }), -/* 210 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37755,7 +37949,7 @@ module.exports = PerspectiveCamera; /***/ }), -/* 211 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37764,8 +37958,8 @@ module.exports = PerspectiveCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Arne16 = __webpack_require__(212); -var CanvasPool = __webpack_require__(20); +var Arne16 = __webpack_require__(214); +var CanvasPool = __webpack_require__(21); var GetValue = __webpack_require__(4); /** @@ -37849,7 +38043,7 @@ module.exports = GenerateTexture; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports) { /** @@ -37903,7 +38097,7 @@ module.exports = { /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37915,7 +38109,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__(214); +var CubicBezier = __webpack_require__(216); var Curve = __webpack_require__(66); var Vector2 = __webpack_require__(6); @@ -38114,7 +38308,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports) { /** @@ -38177,7 +38371,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38192,7 +38386,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(66); var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(4); -var RadToDeg = __webpack_require__(216); +var RadToDeg = __webpack_require__(218); var Vector2 = __webpack_require__(6); /** @@ -38764,7 +38958,7 @@ module.exports = EllipseCurve; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38794,7 +38988,7 @@ module.exports = RadToDeg; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39020,7 +39214,7 @@ module.exports = LineCurve; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39231,7 +39425,7 @@ module.exports = SplineCurve; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -39294,7 +39488,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39309,30 +39503,30 @@ module.exports = CanvasInterpolation; var Color = __webpack_require__(36); -Color.ColorToRGBA = __webpack_require__(482); -Color.ComponentToHex = __webpack_require__(221); +Color.ColorToRGBA = __webpack_require__(484); +Color.ComponentToHex = __webpack_require__(223); Color.GetColor = __webpack_require__(116); -Color.GetColor32 = __webpack_require__(199); -Color.HexStringToColor = __webpack_require__(198); -Color.HSLToColor = __webpack_require__(483); -Color.HSVColorWheel = __webpack_require__(485); -Color.HSVToRGB = __webpack_require__(223); -Color.HueToComponent = __webpack_require__(222); -Color.IntegerToColor = __webpack_require__(200); -Color.IntegerToRGB = __webpack_require__(201); -Color.Interpolate = __webpack_require__(486); -Color.ObjectToColor = __webpack_require__(202); -Color.RandomRGB = __webpack_require__(487); -Color.RGBStringToColor = __webpack_require__(203); -Color.RGBToHSV = __webpack_require__(488); -Color.RGBToString = __webpack_require__(489); +Color.GetColor32 = __webpack_require__(201); +Color.HexStringToColor = __webpack_require__(200); +Color.HSLToColor = __webpack_require__(485); +Color.HSVColorWheel = __webpack_require__(487); +Color.HSVToRGB = __webpack_require__(225); +Color.HueToComponent = __webpack_require__(224); +Color.IntegerToColor = __webpack_require__(202); +Color.IntegerToRGB = __webpack_require__(203); +Color.Interpolate = __webpack_require__(488); +Color.ObjectToColor = __webpack_require__(204); +Color.RandomRGB = __webpack_require__(489); +Color.RGBStringToColor = __webpack_require__(205); +Color.RGBToHSV = __webpack_require__(490); +Color.RGBToString = __webpack_require__(491); Color.ValueToColor = __webpack_require__(115); module.exports = Color; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -39362,7 +39556,7 @@ module.exports = ComponentToHex; /***/ }), -/* 222 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/** @@ -39416,10 +39610,10 @@ var HueToComponent = function (p, q, t) module.export = HueToComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(484)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(486)(module))) /***/ }), -/* 223 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39503,7 +39697,7 @@ module.exports = HSVToRGB; /***/ }), -/* 224 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39512,7 +39706,7 @@ module.exports = HSVToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(225); +var Linear = __webpack_require__(227); /** * [description] @@ -39548,7 +39742,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 225 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -39578,7 +39772,7 @@ module.exports = Linear; /***/ }), -/* 226 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -39607,7 +39801,7 @@ module.exports = Between; /***/ }), -/* 227 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39666,7 +39860,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 228 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -39723,7 +39917,7 @@ module.exports = ParseXML; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -39752,7 +39946,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39949,7 +40143,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 231 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -40043,7 +40237,7 @@ module.exports = Plugins; /***/ }), -/* 232 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40052,7 +40246,7 @@ module.exports = Plugins; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); /** * Determines the canvas features of the browser running this Phaser Game instance. @@ -40158,7 +40352,7 @@ module.exports = init(); /***/ }), -/* 233 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40833,7 +41027,7 @@ earcut.flatten = function (data) { }; /***/ }), -/* 234 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -41336,7 +41530,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41346,8 +41540,8 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(512); -var TextureTintPipeline = __webpack_require__(236); +var ShaderSourceFS = __webpack_require__(514); +var TextureTintPipeline = __webpack_require__(238); var LIGHT_COUNT = 10; @@ -41733,7 +41927,7 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 236 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41743,9 +41937,9 @@ module.exports = ForwardDiffuseLightPipeline; */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(513); -var ShaderSourceVS = __webpack_require__(514); +var ModelViewProjection = __webpack_require__(236); +var ShaderSourceFS = __webpack_require__(515); +var ShaderSourceVS = __webpack_require__(516); var Utils = __webpack_require__(42); var WebGLPipeline = __webpack_require__(126); @@ -42015,6 +42209,7 @@ var TextureTintPipeline = new Class({ this.vertexCount = 0; batches.length = 0; + this.pushBatch(); this.flushLocked = false; return this; @@ -42085,12 +42280,9 @@ var TextureTintPipeline = new Class({ } this.vertexBuffer = tilemap.vertexBuffer; - - renderer.setTexture2D(frame.source.glTexture, 0); renderer.setPipeline(this); - + renderer.setTexture2D(frame.source.glTexture, 0); gl.drawArrays(this.topology, 0, tilemap.vertexCount); - this.vertexBuffer = pipelineVertexBuffer; } @@ -42116,7 +42308,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; var cameraScrollY = camera.scrollY; @@ -42246,6 +42437,8 @@ var TextureTintPipeline = new Class({ } } } + + this.setTexture2D(texture, 0); }, /** @@ -42265,7 +42458,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var list = blitter.getRenderList(); var length = list.length; var cameraMatrix = camera.matrix.matrix; @@ -42384,7 +42576,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; var texture = frame.texture.source[frame.sourceIndex].glTexture; @@ -42512,7 +42703,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; @@ -42591,7 +42781,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; var cameraHeight = camera.height + 50; @@ -42815,7 +43004,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; var textureSource = bitmapText.texture.source[frame.sourceIndex]; @@ -43276,7 +43464,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); var height = srcHeight * (flipY ? -1.0 : 1.0); @@ -43358,6 +43545,93 @@ var TextureTintPipeline = new Class({ this.vertexCount += 6; }, + drawTexture: function ( + texture, + srcX, srcY, + frameX, frameY, frameWidth, frameHeight, + transformMatrix + ) + { + this.renderer.setPipeline(this); + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + var renderer = this.renderer; + var width = frameWidth; + var height = frameHeight; + var x = srcX; + var y = srcY; + var xw = x + width; + var yh = y + height; + var mva = transformMatrix[0]; + var mvb = transformMatrix[1]; + var mvc = transformMatrix[2]; + var mvd = transformMatrix[3]; + var mve = transformMatrix[4]; + var mvf = transformMatrix[5]; + var tx0 = x * mva + y * mvc + mve; + var ty0 = x * mvb + y * mvd + mvf; + var tx1 = x * mva + yh * mvc + mve; + var ty1 = x * mvb + yh * mvd + mvf; + var tx2 = xw * mva + yh * mvc + mve; + var ty2 = xw * mvb + yh * mvd + mvf; + var tx3 = xw * mva + y * mvc + mve; + var ty3 = xw * mvb + y * mvd + mvf; + var vertexOffset = 0; + var textureWidth = texture.width; + var textureHeight = texture.height; + var u0 = (frameX / textureWidth); + var v0 = (frameY / textureHeight); + var u1 = (frameX + frameWidth) / textureWidth; + var v1 = (frameY + frameHeight) / textureHeight; + var tint = 0xffffffff; + + this.setTexture2D(texture, 0); + + vertexOffset = this.vertexCount * this.vertexComponentCount; + + vertexViewF32[vertexOffset + 0] = tx0; + vertexViewF32[vertexOffset + 1] = ty0; + vertexViewF32[vertexOffset + 2] = u0; + vertexViewF32[vertexOffset + 3] = v0; + vertexViewU32[vertexOffset + 4] = tint; + vertexViewF32[vertexOffset + 5] = tx1; + vertexViewF32[vertexOffset + 6] = ty1; + vertexViewF32[vertexOffset + 7] = u0; + vertexViewF32[vertexOffset + 8] = v1; + vertexViewU32[vertexOffset + 9] = tint; + vertexViewF32[vertexOffset + 10] = tx2; + vertexViewF32[vertexOffset + 11] = ty2; + vertexViewF32[vertexOffset + 12] = u1; + vertexViewF32[vertexOffset + 13] = v1; + vertexViewU32[vertexOffset + 14] = tint; + vertexViewF32[vertexOffset + 15] = tx0; + vertexViewF32[vertexOffset + 16] = ty0; + vertexViewF32[vertexOffset + 17] = u0; + vertexViewF32[vertexOffset + 18] = v0; + vertexViewU32[vertexOffset + 19] = tint; + vertexViewF32[vertexOffset + 20] = tx2; + vertexViewF32[vertexOffset + 21] = ty2; + vertexViewF32[vertexOffset + 22] = u1; + vertexViewF32[vertexOffset + 23] = v1; + vertexViewU32[vertexOffset + 24] = tint; + vertexViewF32[vertexOffset + 25] = tx3; + vertexViewF32[vertexOffset + 26] = ty3; + vertexViewF32[vertexOffset + 27] = u1; + vertexViewF32[vertexOffset + 28] = v0; + vertexViewU32[vertexOffset + 29] = tint; + + this.vertexCount += 6; + + // Force an immediate draw + this.flush(); + }, + /** * [description] * @@ -43378,7 +43652,7 @@ module.exports = TextureTintPipeline; /***/ }), -/* 237 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43388,14 +43662,14 @@ module.exports = TextureTintPipeline; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); -var Gamepad = __webpack_require__(238); -var Keyboard = __webpack_require__(242); -var Mouse = __webpack_require__(245); -var Pointer = __webpack_require__(246); +var EventEmitter = __webpack_require__(14); +var Gamepad = __webpack_require__(240); +var Keyboard = __webpack_require__(244); +var Mouse = __webpack_require__(247); +var Pointer = __webpack_require__(248); var Rectangle = __webpack_require__(8); -var Touch = __webpack_require__(247); -var TransformXY = __webpack_require__(248); +var Touch = __webpack_require__(249); +var TransformXY = __webpack_require__(250); /** * @classdesc @@ -43937,7 +44211,7 @@ module.exports = InputManager; /***/ }), -/* 238 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43947,7 +44221,7 @@ module.exports = InputManager; */ var Class = __webpack_require__(0); -var Gamepad = __webpack_require__(239); +var Gamepad = __webpack_require__(241); // https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API // https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API @@ -44330,7 +44604,7 @@ module.exports = GamepadManager; /***/ }), -/* 239 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44339,8 +44613,8 @@ module.exports = GamepadManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Axis = __webpack_require__(240); -var Button = __webpack_require__(241); +var Axis = __webpack_require__(242); +var Button = __webpack_require__(243); var Class = __webpack_require__(0); /** @@ -44489,7 +44763,7 @@ module.exports = Gamepad; /***/ }), -/* 240 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44597,7 +44871,7 @@ module.exports = Axis; /***/ }), -/* 241 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44717,7 +44991,7 @@ module.exports = Button; /***/ }), -/* 242 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44727,13 +45001,13 @@ module.exports = Button; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); -var Key = __webpack_require__(243); +var EventEmitter = __webpack_require__(14); +var Key = __webpack_require__(245); var KeyCodes = __webpack_require__(128); -var KeyCombo = __webpack_require__(244); -var KeyMap = __webpack_require__(524); -var ProcessKeyDown = __webpack_require__(525); -var ProcessKeyUp = __webpack_require__(526); +var KeyCombo = __webpack_require__(246); +var KeyMap = __webpack_require__(526); +var ProcessKeyDown = __webpack_require__(527); +var ProcessKeyUp = __webpack_require__(528); /** * @classdesc @@ -45149,7 +45423,7 @@ module.exports = KeyboardManager; /***/ }), -/* 243 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45347,7 +45621,7 @@ module.exports = Key; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45357,9 +45631,9 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(521); -var ResetKeyCombo = __webpack_require__(523); +var GetFastValue = __webpack_require__(2); +var ProcessKeyCombo = __webpack_require__(523); +var ResetKeyCombo = __webpack_require__(525); /** * @classdesc @@ -45617,7 +45891,7 @@ module.exports = KeyCombo; /***/ }), -/* 245 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45923,7 +46197,7 @@ module.exports = MouseManager; /***/ }), -/* 246 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46562,7 +46836,7 @@ module.exports = Pointer; /***/ }), -/* 247 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46759,7 +47033,7 @@ module.exports = TouchManager; /***/ }), -/* 248 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46825,7 +47099,7 @@ module.exports = TransformXY; /***/ }), -/* 249 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46838,7 +47112,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); -var Scene = __webpack_require__(250); +var Scene = __webpack_require__(252); var Systems = __webpack_require__(129); /** @@ -47984,7 +48258,7 @@ module.exports = SceneManager; /***/ }), -/* 250 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48040,7 +48314,7 @@ module.exports = Scene; /***/ }), -/* 251 */ +/* 253 */ /***/ (function(module, exports) { /** @@ -48068,7 +48342,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 252 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48079,7 +48353,7 @@ module.exports = UppercaseFirst; var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); -var InjectionMap = __webpack_require__(529); +var InjectionMap = __webpack_require__(531); /** * Takes a Scene configuration object and returns a fully formed Systems object. @@ -48150,7 +48424,7 @@ module.exports = Settings; /***/ }), -/* 253 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48159,9 +48433,9 @@ module.exports = Settings; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(254); -var NoAudioSoundManager = __webpack_require__(256); -var WebAudioSoundManager = __webpack_require__(258); +var HTML5AudioSoundManager = __webpack_require__(256); +var NoAudioSoundManager = __webpack_require__(258); +var WebAudioSoundManager = __webpack_require__(260); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -48198,7 +48472,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 254 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48208,7 +48482,7 @@ module.exports = SoundManagerCreator; */ var Class = __webpack_require__(0); var BaseSoundManager = __webpack_require__(84); -var HTML5AudioSound = __webpack_require__(255); +var HTML5AudioSound = __webpack_require__(257); /** * HTML5 Audio implementation of the sound manager. @@ -48535,7 +48809,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 255 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49233,7 +49507,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 256 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49243,8 +49517,8 @@ module.exports = HTML5AudioSound; */ var BaseSoundManager = __webpack_require__(84); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); -var NoAudioSound = __webpack_require__(257); +var EventEmitter = __webpack_require__(14); +var NoAudioSound = __webpack_require__(259); var NOOP = __webpack_require__(3); /** @@ -49326,7 +49600,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 257 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49336,7 +49610,7 @@ module.exports = NoAudioSoundManager; */ var BaseSound = __webpack_require__(85); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var Extend = __webpack_require__(23); /** @@ -49434,7 +49708,7 @@ module.exports = NoAudioSound; /***/ }), -/* 258 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49444,7 +49718,7 @@ module.exports = NoAudioSound; */ var Class = __webpack_require__(0); var BaseSoundManager = __webpack_require__(84); -var WebAudioSound = __webpack_require__(259); +var WebAudioSound = __webpack_require__(261); /** * @classdesc @@ -49667,7 +49941,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 259 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50337,7 +50611,7 @@ module.exports = WebAudioSound; /***/ }), -/* 260 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50346,14 +50620,14 @@ module.exports = WebAudioSound; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); var Color = __webpack_require__(36); -var EventEmitter = __webpack_require__(13); -var GenerateTexture = __webpack_require__(211); +var EventEmitter = __webpack_require__(14); +var GenerateTexture = __webpack_require__(213); var GetValue = __webpack_require__(4); -var Parser = __webpack_require__(261); -var Texture = __webpack_require__(262); +var Parser = __webpack_require__(263); +var Texture = __webpack_require__(264); /** * @classdesc @@ -51123,7 +51397,7 @@ module.exports = TextureManager; /***/ }), -/* 261 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51138,21 +51412,21 @@ module.exports = TextureManager; module.exports = { - Canvas: __webpack_require__(530), - Image: __webpack_require__(531), - JSONArray: __webpack_require__(532), - JSONHash: __webpack_require__(533), - Pyxel: __webpack_require__(534), - SpriteSheet: __webpack_require__(535), - SpriteSheetFromAtlas: __webpack_require__(536), - StarlingXML: __webpack_require__(537), - UnityYAML: __webpack_require__(538) + Canvas: __webpack_require__(532), + Image: __webpack_require__(533), + JSONArray: __webpack_require__(534), + JSONHash: __webpack_require__(535), + Pyxel: __webpack_require__(536), + SpriteSheet: __webpack_require__(537), + SpriteSheetFromAtlas: __webpack_require__(538), + StarlingXML: __webpack_require__(539), + UnityYAML: __webpack_require__(540) }; /***/ }), -/* 262 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51163,7 +51437,7 @@ module.exports = { var Class = __webpack_require__(0); var Frame = __webpack_require__(130); -var TextureSource = __webpack_require__(263); +var TextureSource = __webpack_require__(265); /** * @classdesc @@ -51585,7 +51859,7 @@ module.exports = Texture; /***/ }), -/* 263 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51785,7 +52059,7 @@ module.exports = TextureSource; /***/ }), -/* 264 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51907,7 +52181,7 @@ else { })(); /***/ }), -/* 265 */ +/* 267 */ /***/ (function(module, exports) { /** @@ -52046,7 +52320,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 266 */ +/* 268 */ /***/ (function(module, exports) { /** @@ -52161,7 +52435,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 267 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52172,27 +52446,27 @@ module.exports = ParseXMLBitmapFont; var Ellipse = __webpack_require__(135); -Ellipse.Area = __webpack_require__(556); -Ellipse.Circumference = __webpack_require__(270); +Ellipse.Area = __webpack_require__(558); +Ellipse.Circumference = __webpack_require__(272); Ellipse.CircumferencePoint = __webpack_require__(136); -Ellipse.Clone = __webpack_require__(557); +Ellipse.Clone = __webpack_require__(559); Ellipse.Contains = __webpack_require__(68); -Ellipse.ContainsPoint = __webpack_require__(558); -Ellipse.ContainsRect = __webpack_require__(559); -Ellipse.CopyFrom = __webpack_require__(560); -Ellipse.Equals = __webpack_require__(561); -Ellipse.GetBounds = __webpack_require__(562); -Ellipse.GetPoint = __webpack_require__(268); -Ellipse.GetPoints = __webpack_require__(269); -Ellipse.Offset = __webpack_require__(563); -Ellipse.OffsetPoint = __webpack_require__(564); +Ellipse.ContainsPoint = __webpack_require__(560); +Ellipse.ContainsRect = __webpack_require__(561); +Ellipse.CopyFrom = __webpack_require__(562); +Ellipse.Equals = __webpack_require__(563); +Ellipse.GetBounds = __webpack_require__(564); +Ellipse.GetPoint = __webpack_require__(270); +Ellipse.GetPoints = __webpack_require__(271); +Ellipse.Offset = __webpack_require__(565); +Ellipse.OffsetPoint = __webpack_require__(566); Ellipse.Random = __webpack_require__(109); module.exports = Ellipse; /***/ }), -/* 268 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52233,7 +52507,7 @@ module.exports = GetPoint; /***/ }), -/* 269 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52242,7 +52516,7 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(270); +var Circumference = __webpack_require__(272); var CircumferencePoint = __webpack_require__(136); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -52285,7 +52559,7 @@ module.exports = GetPoints; /***/ }), -/* 270 */ +/* 272 */ /***/ (function(module, exports) { /** @@ -52317,7 +52591,7 @@ module.exports = Circumference; /***/ }), -/* 271 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52327,7 +52601,7 @@ module.exports = Circumference; */ var Commands = __webpack_require__(127); -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -52583,7 +52857,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 272 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52723,7 +52997,7 @@ module.exports = Range; /***/ }), -/* 273 */ +/* 275 */ /***/ (function(module, exports) { /** @@ -52752,7 +53026,7 @@ module.exports = FloatBetween; /***/ }), -/* 274 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52765,51 +53039,9 @@ module.exports = FloatBetween; module.exports = { - In: __webpack_require__(576), - Out: __webpack_require__(577), - InOut: __webpack_require__(578) - -}; - - -/***/ }), -/* 275 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Phaser.Math.Easing.Bounce - -module.exports = { - - In: __webpack_require__(579), - Out: __webpack_require__(580), - InOut: __webpack_require__(581) - -}; - - -/***/ }), -/* 276 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Phaser.Math.Easing.Circular - -module.exports = { - - In: __webpack_require__(582), - Out: __webpack_require__(583), - InOut: __webpack_require__(584) + In: __webpack_require__(578), + Out: __webpack_require__(579), + InOut: __webpack_require__(580) }; @@ -52824,13 +53056,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Cubic +// Phaser.Math.Easing.Bounce module.exports = { - In: __webpack_require__(585), - Out: __webpack_require__(586), - InOut: __webpack_require__(587) + In: __webpack_require__(581), + Out: __webpack_require__(582), + InOut: __webpack_require__(583) }; @@ -52845,13 +53077,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Elastic +// Phaser.Math.Easing.Circular module.exports = { - In: __webpack_require__(588), - Out: __webpack_require__(589), - InOut: __webpack_require__(590) + In: __webpack_require__(584), + Out: __webpack_require__(585), + InOut: __webpack_require__(586) }; @@ -52866,13 +53098,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Expo +// Phaser.Math.Easing.Cubic module.exports = { - In: __webpack_require__(591), - Out: __webpack_require__(592), - InOut: __webpack_require__(593) + In: __webpack_require__(587), + Out: __webpack_require__(588), + InOut: __webpack_require__(589) }; @@ -52887,9 +53119,15 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Linear +// Phaser.Math.Easing.Elastic -module.exports = __webpack_require__(594); +module.exports = { + + In: __webpack_require__(590), + Out: __webpack_require__(591), + InOut: __webpack_require__(592) + +}; /***/ }), @@ -52902,13 +53140,13 @@ module.exports = __webpack_require__(594); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Quadratic +// Phaser.Math.Easing.Expo module.exports = { - In: __webpack_require__(595), - Out: __webpack_require__(596), - InOut: __webpack_require__(597) + In: __webpack_require__(593), + Out: __webpack_require__(594), + InOut: __webpack_require__(595) }; @@ -52923,15 +53161,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Quartic +// Phaser.Math.Easing.Linear -module.exports = { - - In: __webpack_require__(598), - Out: __webpack_require__(599), - InOut: __webpack_require__(600) - -}; +module.exports = __webpack_require__(596); /***/ }), @@ -52944,13 +53176,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Quintic +// Phaser.Math.Easing.Quadratic module.exports = { - In: __webpack_require__(601), - Out: __webpack_require__(602), - InOut: __webpack_require__(603) + In: __webpack_require__(597), + Out: __webpack_require__(598), + InOut: __webpack_require__(599) }; @@ -52965,13 +53197,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Sine +// Phaser.Math.Easing.Quartic module.exports = { - In: __webpack_require__(604), - Out: __webpack_require__(605), - InOut: __webpack_require__(606) + In: __webpack_require__(600), + Out: __webpack_require__(601), + InOut: __webpack_require__(602) }; @@ -52986,13 +53218,55 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Stepped +// Phaser.Math.Easing.Quintic -module.exports = __webpack_require__(607); +module.exports = { + + In: __webpack_require__(603), + Out: __webpack_require__(604), + InOut: __webpack_require__(605) + +}; /***/ }), /* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Phaser.Math.Easing.Sine + +module.exports = { + + In: __webpack_require__(606), + Out: __webpack_require__(607), + InOut: __webpack_require__(608) + +}; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Phaser.Math.Easing.Stepped + +module.exports = __webpack_require__(609); + + +/***/ }), +/* 288 */ /***/ (function(module, exports) { /** @@ -53029,7 +53303,7 @@ module.exports = HasAny; /***/ }), -/* 287 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53451,7 +53725,7 @@ module.exports = PathFollower; /***/ }), -/* 288 */ +/* 290 */ /***/ (function(module, exports) { /** @@ -53482,96 +53756,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var GetAdvancedValue = __webpack_require__(10); - -/** - * Adds an Animation component to a Sprite and populates it based on the given config. - * - * @function Phaser.Gameobjects.BuildGameObjectAnimation - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Sprite} sprite - [description] - * @param {object} config - [description] - * - * @return {Phaser.GameObjects.Sprite} The updated Sprite. - */ -var BuildGameObjectAnimation = function (sprite, config) -{ - var animConfig = GetAdvancedValue(config, 'anims', null); - - if (animConfig === null) - { - return sprite; - } - - if (typeof animConfig === 'string') - { - // { anims: 'key' } - sprite.anims.play(animConfig); - } - else if (typeof animConfig === 'object') - { - // { anims: { - // key: string - // startFrame: [string|integer] - // delay: [float] - // repeat: [integer] - // repeatDelay: [float] - // yoyo: [boolean] - // play: [boolean] - // delayedPlay: [boolean] - // } - // } - - var anims = sprite.anims; - - var key = GetAdvancedValue(animConfig, 'key', undefined); - var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); - - var delay = GetAdvancedValue(animConfig, 'delay', 0); - var repeat = GetAdvancedValue(animConfig, 'repeat', 0); - var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); - var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); - - var play = GetAdvancedValue(animConfig, 'play', false); - var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); - - anims.delay(delay); - anims.repeat(repeat); - anims.repeatDelay(repeatDelay); - anims.yoyo(yoyo); - - if (play) - { - anims.play(key, startFrame); - } - else if (delayedPlay > 0) - { - anims.delayedPlay(delayedPlay, key, startFrame); - } - else - { - anims.load(key); - } - } - - return sprite; -}; - -module.exports = BuildGameObjectAnimation; - - -/***/ }), -/* 290 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53825,7 +54010,7 @@ module.exports = Light; /***/ }), -/* 291 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53835,8 +54020,8 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(290); -var LightPipeline = __webpack_require__(235); +var Light = __webpack_require__(291); +var LightPipeline = __webpack_require__(237); var Utils = __webpack_require__(42); /** @@ -54155,7 +54340,7 @@ module.exports = LightsManager; /***/ }), -/* 292 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54170,20 +54355,20 @@ module.exports = LightsManager; module.exports = { - Circle: __webpack_require__(655), - Ellipse: __webpack_require__(267), - Intersects: __webpack_require__(293), - Line: __webpack_require__(675), - Point: __webpack_require__(693), - Polygon: __webpack_require__(707), - Rectangle: __webpack_require__(305), - Triangle: __webpack_require__(736) + Circle: __webpack_require__(663), + Ellipse: __webpack_require__(269), + Intersects: __webpack_require__(294), + Line: __webpack_require__(683), + Point: __webpack_require__(701), + Polygon: __webpack_require__(715), + Rectangle: __webpack_require__(306), + Triangle: __webpack_require__(744) }; /***/ }), -/* 293 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54198,26 +54383,26 @@ module.exports = { module.exports = { - CircleToCircle: __webpack_require__(665), - CircleToRectangle: __webpack_require__(666), - GetRectangleIntersection: __webpack_require__(667), - LineToCircle: __webpack_require__(295), + CircleToCircle: __webpack_require__(673), + CircleToRectangle: __webpack_require__(674), + GetRectangleIntersection: __webpack_require__(675), + LineToCircle: __webpack_require__(296), LineToLine: __webpack_require__(89), - LineToRectangle: __webpack_require__(668), - PointToLine: __webpack_require__(296), - PointToLineSegment: __webpack_require__(669), - RectangleToRectangle: __webpack_require__(294), - RectangleToTriangle: __webpack_require__(670), - RectangleToValues: __webpack_require__(671), - TriangleToCircle: __webpack_require__(672), - TriangleToLine: __webpack_require__(673), - TriangleToTriangle: __webpack_require__(674) + LineToRectangle: __webpack_require__(676), + PointToLine: __webpack_require__(297), + PointToLineSegment: __webpack_require__(677), + RectangleToRectangle: __webpack_require__(295), + RectangleToTriangle: __webpack_require__(678), + RectangleToValues: __webpack_require__(679), + TriangleToCircle: __webpack_require__(680), + TriangleToLine: __webpack_require__(681), + TriangleToTriangle: __webpack_require__(682) }; /***/ }), -/* 294 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -54251,7 +54436,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 295 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54336,7 +54521,7 @@ module.exports = LineToCircle; /***/ }), -/* 296 */ +/* 297 */ /***/ (function(module, exports) { /** @@ -54365,7 +54550,7 @@ module.exports = PointToLine; /***/ }), -/* 297 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -54401,7 +54586,7 @@ module.exports = Decompose; /***/ }), -/* 298 */ +/* 299 */ /***/ (function(module, exports) { /** @@ -54436,7 +54621,7 @@ module.exports = Decompose; /***/ }), -/* 299 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54446,7 +54631,7 @@ module.exports = Decompose; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(300); +var GetPoint = __webpack_require__(301); var GetPoints = __webpack_require__(108); var Random = __webpack_require__(110); @@ -54733,7 +54918,7 @@ module.exports = Line; /***/ }), -/* 300 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54773,7 +54958,7 @@ module.exports = GetPoint; /***/ }), -/* 301 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54807,7 +54992,7 @@ module.exports = NormalAngle; /***/ }), -/* 302 */ +/* 303 */ /***/ (function(module, exports) { /** @@ -54835,7 +55020,7 @@ module.exports = GetMagnitude; /***/ }), -/* 303 */ +/* 304 */ /***/ (function(module, exports) { /** @@ -54863,7 +55048,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 304 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54873,7 +55058,7 @@ module.exports = GetMagnitudeSq; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(144); +var Contains = __webpack_require__(146); /** * @classdesc @@ -55048,7 +55233,7 @@ module.exports = Polygon; /***/ }), -/* 305 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55059,46 +55244,46 @@ module.exports = Polygon; var Rectangle = __webpack_require__(8); -Rectangle.Area = __webpack_require__(712); -Rectangle.Ceil = __webpack_require__(713); -Rectangle.CeilAll = __webpack_require__(714); -Rectangle.CenterOn = __webpack_require__(306); -Rectangle.Clone = __webpack_require__(715); +Rectangle.Area = __webpack_require__(720); +Rectangle.Ceil = __webpack_require__(721); +Rectangle.CeilAll = __webpack_require__(722); +Rectangle.CenterOn = __webpack_require__(307); +Rectangle.Clone = __webpack_require__(723); Rectangle.Contains = __webpack_require__(33); -Rectangle.ContainsPoint = __webpack_require__(716); -Rectangle.ContainsRect = __webpack_require__(717); -Rectangle.CopyFrom = __webpack_require__(718); -Rectangle.Decompose = __webpack_require__(297); -Rectangle.Equals = __webpack_require__(719); -Rectangle.FitInside = __webpack_require__(720); -Rectangle.FitOutside = __webpack_require__(721); -Rectangle.Floor = __webpack_require__(722); -Rectangle.FloorAll = __webpack_require__(723); +Rectangle.ContainsPoint = __webpack_require__(724); +Rectangle.ContainsRect = __webpack_require__(725); +Rectangle.CopyFrom = __webpack_require__(726); +Rectangle.Decompose = __webpack_require__(298); +Rectangle.Equals = __webpack_require__(727); +Rectangle.FitInside = __webpack_require__(728); +Rectangle.FitOutside = __webpack_require__(729); +Rectangle.Floor = __webpack_require__(730); +Rectangle.FloorAll = __webpack_require__(731); Rectangle.FromPoints = __webpack_require__(121); -Rectangle.GetAspectRatio = __webpack_require__(145); -Rectangle.GetCenter = __webpack_require__(724); +Rectangle.GetAspectRatio = __webpack_require__(147); +Rectangle.GetCenter = __webpack_require__(732); Rectangle.GetPoint = __webpack_require__(106); -Rectangle.GetPoints = __webpack_require__(182); -Rectangle.GetSize = __webpack_require__(725); -Rectangle.Inflate = __webpack_require__(726); -Rectangle.MarchingAnts = __webpack_require__(186); -Rectangle.MergePoints = __webpack_require__(727); -Rectangle.MergeRect = __webpack_require__(728); -Rectangle.MergeXY = __webpack_require__(729); -Rectangle.Offset = __webpack_require__(730); -Rectangle.OffsetPoint = __webpack_require__(731); -Rectangle.Overlaps = __webpack_require__(732); +Rectangle.GetPoints = __webpack_require__(184); +Rectangle.GetSize = __webpack_require__(733); +Rectangle.Inflate = __webpack_require__(734); +Rectangle.MarchingAnts = __webpack_require__(188); +Rectangle.MergePoints = __webpack_require__(735); +Rectangle.MergeRect = __webpack_require__(736); +Rectangle.MergeXY = __webpack_require__(737); +Rectangle.Offset = __webpack_require__(738); +Rectangle.OffsetPoint = __webpack_require__(739); +Rectangle.Overlaps = __webpack_require__(740); Rectangle.Perimeter = __webpack_require__(78); -Rectangle.PerimeterPoint = __webpack_require__(733); +Rectangle.PerimeterPoint = __webpack_require__(741); Rectangle.Random = __webpack_require__(107); -Rectangle.Scale = __webpack_require__(734); -Rectangle.Union = __webpack_require__(735); +Rectangle.Scale = __webpack_require__(742); +Rectangle.Union = __webpack_require__(743); module.exports = Rectangle; /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports) { /** @@ -55133,7 +55318,7 @@ module.exports = CenterOn; /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55219,7 +55404,7 @@ module.exports = GetPoint; /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55310,7 +55495,7 @@ module.exports = GetPoints; /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55350,7 +55535,7 @@ module.exports = Centroid; /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, exports) { /** @@ -55389,7 +55574,7 @@ module.exports = Offset; /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55452,7 +55637,7 @@ module.exports = InCenter; /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, exports) { /** @@ -55501,7 +55686,7 @@ module.exports = InteractiveObject; /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55510,7 +55695,7 @@ module.exports = InteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(148); +var MergeXHRSettings = __webpack_require__(150); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -55564,7 +55749,7 @@ module.exports = XHRLoader; /***/ }), -/* 314 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55577,8 +55762,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(22); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(315); +var GetFastValue = __webpack_require__(2); +var HTML5AudioFile = __webpack_require__(316); /** * @classdesc @@ -55804,7 +55989,7 @@ module.exports = AudioFile; /***/ }), -/* 315 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55815,8 +56000,8 @@ module.exports = AudioFile; var Class = __webpack_require__(0); var File = __webpack_require__(18); -var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(147); +var GetFastValue = __webpack_require__(2); +var GetURL = __webpack_require__(149); /** * @classdesc @@ -55952,7 +56137,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 316 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55965,8 +56150,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var ParseXML = __webpack_require__(228); +var GetFastValue = __webpack_require__(2); +var ParseXML = __webpack_require__(230); /** * @classdesc @@ -56064,7 +56249,7 @@ module.exports = XMLFile; /***/ }), -/* 317 */ +/* 318 */ /***/ (function(module, exports) { /** @@ -56128,7 +56313,7 @@ module.exports = NumberArray; /***/ }), -/* 318 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56231,7 +56416,7 @@ module.exports = TextFile; /***/ }), -/* 319 */ +/* 320 */ /***/ (function(module, exports) { /** @@ -56268,7 +56453,7 @@ module.exports = Normalize; /***/ }), -/* 320 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56277,7 +56462,7 @@ module.exports = Normalize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Factorial = __webpack_require__(321); +var Factorial = __webpack_require__(322); /** * [description] @@ -56299,7 +56484,7 @@ module.exports = Bernstein; /***/ }), -/* 321 */ +/* 322 */ /***/ (function(module, exports) { /** @@ -56339,7 +56524,7 @@ module.exports = Factorial; /***/ }), -/* 322 */ +/* 323 */ /***/ (function(module, exports) { /** @@ -56374,7 +56559,7 @@ module.exports = Rotate; /***/ }), -/* 323 */ +/* 324 */ /***/ (function(module, exports) { /** @@ -56403,7 +56588,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 324 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56412,12 +56597,12 @@ module.exports = RoundAwayFromZero; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeImage = __webpack_require__(325); +var ArcadeImage = __webpack_require__(326); var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var PhysicsGroup = __webpack_require__(327); -var StaticPhysicsGroup = __webpack_require__(328); +var PhysicsGroup = __webpack_require__(328); +var StaticPhysicsGroup = __webpack_require__(329); /** * @classdesc @@ -56661,7 +56846,7 @@ module.exports = Factory; /***/ }), -/* 325 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56671,7 +56856,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(326); +var Components = __webpack_require__(327); var Image = __webpack_require__(70); /** @@ -56754,7 +56939,7 @@ module.exports = ArcadeImage; /***/ }), -/* 326 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56767,24 +56952,24 @@ module.exports = ArcadeImage; module.exports = { - Acceleration: __webpack_require__(827), - Angular: __webpack_require__(828), - Bounce: __webpack_require__(829), - Debug: __webpack_require__(830), - Drag: __webpack_require__(831), - Enable: __webpack_require__(832), - Friction: __webpack_require__(833), - Gravity: __webpack_require__(834), - Immovable: __webpack_require__(835), - Mass: __webpack_require__(836), - Size: __webpack_require__(837), - Velocity: __webpack_require__(838) + Acceleration: __webpack_require__(835), + Angular: __webpack_require__(836), + Bounce: __webpack_require__(837), + Debug: __webpack_require__(838), + Drag: __webpack_require__(839), + Enable: __webpack_require__(840), + Friction: __webpack_require__(841), + Gravity: __webpack_require__(842), + Immovable: __webpack_require__(843), + Mass: __webpack_require__(844), + Size: __webpack_require__(845), + Velocity: __webpack_require__(846) }; /***/ }), -/* 327 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56796,7 +56981,7 @@ module.exports = { var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var Group = __webpack_require__(69); /** @@ -57009,7 +57194,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 328 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57156,7 +57341,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 329 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57165,26 +57350,26 @@ module.exports = StaticPhysicsGroup; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(330); +var Body = __webpack_require__(331); var Clamp = __webpack_require__(60); var Class = __webpack_require__(0); -var Collider = __webpack_require__(331); +var Collider = __webpack_require__(332); var CONST = __webpack_require__(58); var DistanceBetween = __webpack_require__(41); -var EventEmitter = __webpack_require__(13); -var GetOverlapX = __webpack_require__(332); -var GetOverlapY = __webpack_require__(333); +var EventEmitter = __webpack_require__(14); +var GetOverlapX = __webpack_require__(333); +var GetOverlapY = __webpack_require__(334); var GetValue = __webpack_require__(4); -var ProcessQueue = __webpack_require__(334); -var ProcessTileCallbacks = __webpack_require__(839); +var ProcessQueue = __webpack_require__(335); +var ProcessTileCallbacks = __webpack_require__(847); var Rectangle = __webpack_require__(8); -var RTree = __webpack_require__(335); -var SeparateTile = __webpack_require__(840); -var SeparateX = __webpack_require__(845); -var SeparateY = __webpack_require__(846); +var RTree = __webpack_require__(336); +var SeparateTile = __webpack_require__(848); +var SeparateX = __webpack_require__(853); +var SeparateY = __webpack_require__(854); var Set = __webpack_require__(61); -var StaticBody = __webpack_require__(338); -var TileIntersectsBody = __webpack_require__(337); +var StaticBody = __webpack_require__(339); +var TileIntersectsBody = __webpack_require__(338); var Vector2 = __webpack_require__(6); /** @@ -58884,7 +59069,7 @@ module.exports = World; /***/ }), -/* 330 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60740,7 +60925,7 @@ module.exports = Body; /***/ }), -/* 331 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60920,7 +61105,7 @@ module.exports = Collider; /***/ }), -/* 332 */ +/* 333 */ /***/ (function(module, exports) { /** @@ -60999,7 +61184,7 @@ module.exports = GetOverlapX; /***/ }), -/* 333 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -61078,7 +61263,7 @@ module.exports = GetOverlapY; /***/ }), -/* 334 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61276,7 +61461,7 @@ module.exports = ProcessQueue; /***/ }), -/* 335 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61285,7 +61470,7 @@ module.exports = ProcessQueue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(336); +var quickselect = __webpack_require__(337); /** * @classdesc @@ -61885,7 +62070,7 @@ module.exports = rbush; /***/ }), -/* 336 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -62003,7 +62188,7 @@ module.exports = QuickSelect; /***/ }), -/* 337 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -62040,7 +62225,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 338 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62896,10 +63081,10 @@ module.exports = StaticBody; /***/ }), -/* 339 */, /* 340 */, /* 341 */, -/* 342 */ +/* 342 */, +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62942,7 +63127,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 343 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62984,7 +63169,7 @@ module.exports = HasTileAt; /***/ }), -/* 344 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62995,7 +63180,7 @@ module.exports = HasTileAt; var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(150); +var CalculateFacesAt = __webpack_require__(152); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -63045,7 +63230,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 345 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63054,11 +63239,11 @@ module.exports = RemoveTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(153); -var ParseCSV = __webpack_require__(346); -var ParseJSONTiled = __webpack_require__(347); -var ParseWeltmeister = __webpack_require__(352); +var Formats = __webpack_require__(20); +var Parse2DArray = __webpack_require__(155); +var ParseCSV = __webpack_require__(347); +var ParseJSONTiled = __webpack_require__(348); +var ParseWeltmeister = __webpack_require__(353); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -63115,7 +63300,7 @@ module.exports = Parse; /***/ }), -/* 346 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63124,8 +63309,8 @@ module.exports = Parse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(153); +var Formats = __webpack_require__(20); +var Parse2DArray = __webpack_require__(155); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -63163,7 +63348,7 @@ module.exports = ParseCSV; /***/ }), -/* 347 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63172,14 +63357,14 @@ module.exports = ParseCSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var MapData = __webpack_require__(76); -var ParseTileLayers = __webpack_require__(893); -var ParseImageLayers = __webpack_require__(895); -var ParseTilesets = __webpack_require__(896); -var ParseObjectLayers = __webpack_require__(898); -var BuildTilesetIndex = __webpack_require__(899); -var AssignTileProperties = __webpack_require__(900); +var ParseTileLayers = __webpack_require__(901); +var ParseImageLayers = __webpack_require__(903); +var ParseTilesets = __webpack_require__(904); +var ParseObjectLayers = __webpack_require__(906); +var BuildTilesetIndex = __webpack_require__(907); +var AssignTileProperties = __webpack_require__(908); /** * Parses a Tiled JSON object into a new MapData object. @@ -63239,7 +63424,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 348 */ +/* 349 */ /***/ (function(module, exports) { /** @@ -63329,7 +63514,7 @@ module.exports = ParseGID; /***/ }), -/* 349 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63501,7 +63686,7 @@ module.exports = ImageCollection; /***/ }), -/* 350 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63510,8 +63695,8 @@ module.exports = ImageCollection; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Pick = __webpack_require__(897); -var ParseGID = __webpack_require__(348); +var Pick = __webpack_require__(905); +var ParseGID = __webpack_require__(349); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -63583,7 +63768,7 @@ module.exports = ParseObject; /***/ }), -/* 351 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63593,7 +63778,7 @@ module.exports = ParseObject; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -63689,7 +63874,7 @@ module.exports = ObjectLayer; /***/ }), -/* 352 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63698,10 +63883,10 @@ module.exports = ObjectLayer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var MapData = __webpack_require__(76); -var ParseTileLayers = __webpack_require__(901); -var ParseTilesets = __webpack_require__(902); +var ParseTileLayers = __webpack_require__(909); +var ParseTilesets = __webpack_require__(910); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -63756,7 +63941,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 353 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63767,12 +63952,12 @@ module.exports = ParseWeltmeister; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(354); +var DynamicTilemapLayer = __webpack_require__(355); var Extend = __webpack_require__(23); -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var LayerData = __webpack_require__(75); -var Rotate = __webpack_require__(322); -var StaticTilemapLayer = __webpack_require__(355); +var Rotate = __webpack_require__(323); +var StaticTilemapLayer = __webpack_require__(356); var Tile = __webpack_require__(44); var TilemapComponents = __webpack_require__(96); var Tileset = __webpack_require__(100); @@ -66015,7 +66200,7 @@ module.exports = Tilemap; /***/ }), -/* 354 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66025,9 +66210,9 @@ module.exports = Tilemap; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(903); -var GameObject = __webpack_require__(2); +var Components = __webpack_require__(11); +var DynamicTilemapLayerRender = __webpack_require__(911); +var GameObject = __webpack_require__(1); var TilemapComponents = __webpack_require__(96); /** @@ -67134,7 +67319,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 355 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67144,9 +67329,9 @@ module.exports = DynamicTilemapLayer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var StaticTilemapLayerRender = __webpack_require__(906); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var StaticTilemapLayerRender = __webpack_require__(914); var TilemapComponents = __webpack_require__(96); var Utils = __webpack_require__(42); @@ -67428,7 +67613,7 @@ var StaticTilemapLayer = new Class({ var ty2 = tyh; var tx3 = txw; var ty3 = ty; - var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha); + var tint = Utils.getTintAppendFloatAlpha(0xffffff, this.alpha * tile.alpha); vertexViewF32[voffset + 0] = tx0; vertexViewF32[voffset + 1] = ty0; @@ -67468,10 +67653,10 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (vertexBuffer === null) { vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + this.vertexBuffer = vertexBuffer; } else { @@ -67482,6 +67667,7 @@ var StaticTilemapLayer = new Class({ pipeline.modelIdentity(); pipeline.modelTranslate(this.x - (camera.scrollX * this.scrollFactorX), this.y - (camera.scrollY * this.scrollFactorY), 0.0); + pipeline.modelScale(this.scaleX, this.scaleY, 1.0); pipeline.viewLoad2D(camera.matrix.matrix); } @@ -68170,7 +68356,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 356 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68180,7 +68366,7 @@ module.exports = StaticTilemapLayer; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -68473,7 +68659,7 @@ module.exports = TimerEvent; /***/ }), -/* 357 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68482,7 +68668,7 @@ module.exports = TimerEvent; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RESERVED = __webpack_require__(915); +var RESERVED = __webpack_require__(923); /** * [description] @@ -68531,7 +68717,7 @@ module.exports = GetProps; /***/ }), -/* 358 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68577,7 +68763,7 @@ module.exports = GetTweens; /***/ }), -/* 359 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68586,15 +68772,15 @@ module.exports = GetTweens; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(157); +var Defaults = __webpack_require__(159); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); var GetNewValue = __webpack_require__(101); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(156); -var Tween = __webpack_require__(158); -var TweenData = __webpack_require__(159); +var GetValueOp = __webpack_require__(158); +var Tween = __webpack_require__(160); +var TweenData = __webpack_require__(161); /** * [description] @@ -68705,7 +68891,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 360 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68715,15 +68901,15 @@ module.exports = NumberTweenBuilder; */ var Clone = __webpack_require__(52); -var Defaults = __webpack_require__(157); +var Defaults = __webpack_require__(159); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); var GetNewValue = __webpack_require__(101); -var GetTargets = __webpack_require__(155); -var GetTweens = __webpack_require__(358); +var GetTargets = __webpack_require__(157); +var GetTweens = __webpack_require__(359); var GetValue = __webpack_require__(4); -var Timeline = __webpack_require__(361); +var Timeline = __webpack_require__(362); var TweenBuilder = __webpack_require__(102); /** @@ -68857,7 +69043,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 361 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68867,7 +69053,7 @@ module.exports = TimelineBuilder; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var TweenBuilder = __webpack_require__(102); var TWEEN_CONST = __webpack_require__(87); @@ -69711,7 +69897,7 @@ module.exports = Timeline; /***/ }), -/* 362 */ +/* 363 */ /***/ (function(module, exports) { /** @@ -69758,7 +69944,7 @@ module.exports = SpliceOne; /***/ }), -/* 363 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70578,11 +70764,10 @@ module.exports = Animation; /***/ }), -/* 364 */, -/* 365 */ +/* 365 */, +/* 366 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(366); __webpack_require__(367); __webpack_require__(368); __webpack_require__(369); @@ -70591,10 +70776,11 @@ __webpack_require__(371); __webpack_require__(372); __webpack_require__(373); __webpack_require__(374); +__webpack_require__(375); /***/ }), -/* 366 */ +/* 367 */ /***/ (function(module, exports) { /** @@ -70634,7 +70820,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 367 */ +/* 368 */ /***/ (function(module, exports) { /** @@ -70650,7 +70836,7 @@ if (!Array.isArray) /***/ }), -/* 368 */ +/* 369 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -70838,7 +71024,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 369 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -70853,7 +71039,7 @@ if (!window.console) /***/ }), -/* 370 */ +/* 371 */ /***/ (function(module, exports) { /** @@ -70901,7 +71087,7 @@ if (!Function.prototype.bind) { /***/ }), -/* 371 */ +/* 372 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -70913,7 +71099,7 @@ if (!Math.trunc) { /***/ }), -/* 372 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -70950,7 +71136,7 @@ if (!Math.trunc) { /***/ }), -/* 373 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -71020,10 +71206,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(166))) /***/ }), -/* 374 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -71075,7 +71261,7 @@ if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "o /***/ }), -/* 375 */ +/* 376 */ /***/ (function(module, exports) { /** @@ -71109,7 +71295,7 @@ module.exports = Angle; /***/ }), -/* 376 */ +/* 377 */ /***/ (function(module, exports) { /** @@ -71146,7 +71332,7 @@ module.exports = Call; /***/ }), -/* 377 */ +/* 378 */ /***/ (function(module, exports) { /** @@ -71202,7 +71388,7 @@ module.exports = GetFirst; /***/ }), -/* 378 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71211,8 +71397,8 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AlignIn = __webpack_require__(167); -var CONST = __webpack_require__(168); +var AlignIn = __webpack_require__(169); +var CONST = __webpack_require__(170); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Zone = __webpack_require__(77); @@ -71316,7 +71502,7 @@ module.exports = GridAlign; /***/ }), -/* 379 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71764,7 +71950,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 380 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72010,7 +72196,7 @@ module.exports = Alpha; /***/ }), -/* 381 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72121,7 +72307,7 @@ module.exports = BlendMode; /***/ }), -/* 382 */ +/* 383 */ /***/ (function(module, exports) { /** @@ -72208,7 +72394,7 @@ module.exports = ComputedSize; /***/ }), -/* 383 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -72292,7 +72478,7 @@ module.exports = Depth; /***/ }), -/* 384 */ +/* 385 */ /***/ (function(module, exports) { /** @@ -72440,7 +72626,7 @@ module.exports = Flip; /***/ }), -/* 385 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72450,7 +72636,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(8); -var RotateAround = __webpack_require__(183); +var RotateAround = __webpack_require__(185); var Vector2 = __webpack_require__(6); /** @@ -72634,7 +72820,159 @@ module.exports = GetBounds; /***/ }), -/* 386 */ +/* 387 */ +/***/ (function(module, exports) { + +var MatrixStack = { + + matrixStack: null, + currentMatrix: null, + currentMatrixIndex: 0, + + initMatrixStack: function () + { + this.matrixStack = new Float32Array(6000); // up to 1000 matrices + this.currentMatrix = new Float32Array([1.0, 0.0, 0.0, 1.0, 0.0, 0.0]); + this.currentMatrixIndex = 0; + return this; + }, + + save: function () + { + if (this.currentMatrixIndex >= this.matrixStack.length) return this; + + var matrixStack = this.matrixStack; + var currentMatrix = this.currentMatrix; + var currentMatrixIndex = this.currentMatrixIndex; + this.currentMatrixIndex += 6; + + matrixStack[currentMatrixIndex + 0] = currentMatrix[0]; + matrixStack[currentMatrixIndex + 1] = currentMatrix[1]; + matrixStack[currentMatrixIndex + 2] = currentMatrix[2]; + matrixStack[currentMatrixIndex + 3] = currentMatrix[3]; + matrixStack[currentMatrixIndex + 4] = currentMatrix[4]; + matrixStack[currentMatrixIndex + 5] = currentMatrix[5]; + + return this; + }, + + restore: function () + { + if (this.currentMatrixIndex <= 0) return this; + + this.currentMatrixIndex -= 6; + + var matrixStack = this.matrixStack; + var currentMatrix = this.currentMatrix; + var currentMatrixIndex = this.currentMatrixIndex; + + currentMatrix[0] = matrixStack[currentMatrixIndex + 0]; + currentMatrix[1] = matrixStack[currentMatrixIndex + 1]; + currentMatrix[2] = matrixStack[currentMatrixIndex + 2]; + currentMatrix[3] = matrixStack[currentMatrixIndex + 3]; + currentMatrix[4] = matrixStack[currentMatrixIndex + 4]; + currentMatrix[5] = matrixStack[currentMatrixIndex + 5]; + + return this; + }, + + loadIdentity: function () + { + this.setTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); + return this; + }, + + transform: function (a, b, c, d, tx, ty) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var m4 = currentMatrix[4]; + var m5 = currentMatrix[5]; + + currentMatrix[0] = m0 * a + m2 * b; + currentMatrix[1] = m1 * a + m3 * b; + currentMatrix[2] = m0 * c + m2 * d; + currentMatrix[3] = m1 * c + m3 * d; + currentMatrix[4] = m0 * tx + m2 * ty + m4; + currentMatrix[5] = m1 * tx + m3 * ty + m5; + + return this; + }, + + setTransform: function (a, b, c, d, tx, ty) + { + var currentMatrix = this.currentMatrix; + + currentMatrix[0] = a; + currentMatrix[1] = b; + currentMatrix[2] = c; + currentMatrix[3] = d; + currentMatrix[4] = tx; + currentMatrix[5] = ty; + + return this; + }, + + translate: function (x, y) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var m4 = currentMatrix[4]; + var m5 = currentMatrix[5]; + + currentMatrix[4] = m0 * x + m2 * y + m4; + currentMatrix[5] = m1 * x + m3 * y + m5; + + return this; + }, + + scale: function (x, y) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + + currentMatrix[0] = m0 * x; + currentMatrix[1] = m1 * x; + currentMatrix[2] = m2 * y; + currentMatrix[3] = m3 * y; + + return this; + }, + + rotate: function (t) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var st = Math.sin(t); + var ct = Math.cos(t); + + currentMatrix[0] = m0 * ct + m2 * st; + currentMatrix[1] = m1 * ct + m3 * st; + currentMatrix[2] = m2 * -st + m2 * ct; + currentMatrix[3] = m3 * -st + m3 * ct; + + return this; + } + +}; + +module.exports = MatrixStack; + + +/***/ }), +/* 388 */ /***/ (function(module, exports) { /** @@ -72826,7 +73164,7 @@ module.exports = Origin; /***/ }), -/* 387 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72897,7 +73235,7 @@ module.exports = ScaleMode; /***/ }), -/* 388 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -72989,7 +73327,7 @@ module.exports = ScrollFactor; /***/ }), -/* 389 */ +/* 391 */ /***/ (function(module, exports) { /** @@ -73134,7 +73472,7 @@ module.exports = Size; /***/ }), -/* 390 */ +/* 392 */ /***/ (function(module, exports) { /** @@ -73234,7 +73572,7 @@ module.exports = Texture; /***/ }), -/* 391 */ +/* 393 */ /***/ (function(module, exports) { /** @@ -73429,7 +73767,7 @@ module.exports = Tint; /***/ }), -/* 392 */ +/* 394 */ /***/ (function(module, exports) { /** @@ -73482,7 +73820,7 @@ module.exports = ToJSON; /***/ }), -/* 393 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73492,8 +73830,8 @@ module.exports = ToJSON; */ var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(160); -var WrapAngleDegrees = __webpack_require__(161); +var WrapAngle = __webpack_require__(162); +var WrapAngleDegrees = __webpack_require__(163); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -73835,7 +74173,7 @@ module.exports = Transform; /***/ }), -/* 394 */ +/* 396 */ /***/ (function(module, exports) { /** @@ -73915,7 +74253,7 @@ module.exports = Visible; /***/ }), -/* 395 */ +/* 397 */ /***/ (function(module, exports) { /** @@ -73949,7 +74287,7 @@ module.exports = IncAlpha; /***/ }), -/* 396 */ +/* 398 */ /***/ (function(module, exports) { /** @@ -73983,7 +74321,7 @@ module.exports = IncX; /***/ }), -/* 397 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -74019,7 +74357,7 @@ module.exports = IncXY; /***/ }), -/* 398 */ +/* 400 */ /***/ (function(module, exports) { /** @@ -74053,7 +74391,7 @@ module.exports = IncY; /***/ }), -/* 399 */ +/* 401 */ /***/ (function(module, exports) { /** @@ -74098,7 +74436,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 400 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -74146,7 +74484,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 401 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74188,7 +74526,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 402 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74197,9 +74535,9 @@ module.exports = PlaceOnLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MarchingAnts = __webpack_require__(186); -var RotateLeft = __webpack_require__(187); -var RotateRight = __webpack_require__(188); +var MarchingAnts = __webpack_require__(188); +var RotateLeft = __webpack_require__(189); +var RotateRight = __webpack_require__(190); // Place the items in the array around the perimeter of the given rectangle. @@ -74247,7 +74585,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 403 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74257,7 +74595,7 @@ module.exports = PlaceOnRectangle; */ // var GetPointsOnLine = require('../geom/line/GetPointsOnLine'); -var BresenhamPoints = __webpack_require__(189); +var BresenhamPoints = __webpack_require__(191); /** * [description] @@ -74305,7 +74643,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 404 */ +/* 406 */ /***/ (function(module, exports) { /** @@ -74340,7 +74678,7 @@ module.exports = PlayAnimation; /***/ }), -/* 405 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74376,7 +74714,7 @@ module.exports = RandomCircle; /***/ }), -/* 406 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74412,7 +74750,7 @@ module.exports = RandomEllipse; /***/ }), -/* 407 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74448,7 +74786,7 @@ module.exports = RandomLine; /***/ }), -/* 408 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74484,7 +74822,7 @@ module.exports = RandomRectangle; /***/ }), -/* 409 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74520,7 +74858,7 @@ module.exports = RandomTriangle; /***/ }), -/* 410 */ +/* 412 */ /***/ (function(module, exports) { /** @@ -74557,7 +74895,7 @@ module.exports = Rotate; /***/ }), -/* 411 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74600,7 +74938,7 @@ module.exports = RotateAround; /***/ }), -/* 412 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74647,7 +74985,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 413 */ +/* 415 */ /***/ (function(module, exports) { /** @@ -74681,7 +75019,7 @@ module.exports = ScaleX; /***/ }), -/* 414 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -74717,7 +75055,7 @@ module.exports = ScaleXY; /***/ }), -/* 415 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -74751,7 +75089,7 @@ module.exports = ScaleY; /***/ }), -/* 416 */ +/* 418 */ /***/ (function(module, exports) { /** @@ -74788,7 +75126,7 @@ module.exports = SetAlpha; /***/ }), -/* 417 */ +/* 419 */ /***/ (function(module, exports) { /** @@ -74822,7 +75160,7 @@ module.exports = SetBlendMode; /***/ }), -/* 418 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -74859,7 +75197,7 @@ module.exports = SetDepth; /***/ }), -/* 419 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -74894,7 +75232,7 @@ module.exports = SetHitArea; /***/ }), -/* 420 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -74929,7 +75267,7 @@ module.exports = SetOrigin; /***/ }), -/* 421 */ +/* 423 */ /***/ (function(module, exports) { /** @@ -74966,7 +75304,7 @@ module.exports = SetRotation; /***/ }), -/* 422 */ +/* 424 */ /***/ (function(module, exports) { /** @@ -75009,7 +75347,7 @@ module.exports = SetScale; /***/ }), -/* 423 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -75046,7 +75384,7 @@ module.exports = SetScaleX; /***/ }), -/* 424 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -75083,7 +75421,7 @@ module.exports = SetScaleY; /***/ }), -/* 425 */ +/* 427 */ /***/ (function(module, exports) { /** @@ -75120,7 +75458,7 @@ module.exports = SetTint; /***/ }), -/* 426 */ +/* 428 */ /***/ (function(module, exports) { /** @@ -75154,7 +75492,7 @@ module.exports = SetVisible; /***/ }), -/* 427 */ +/* 429 */ /***/ (function(module, exports) { /** @@ -75191,7 +75529,7 @@ module.exports = SetX; /***/ }), -/* 428 */ +/* 430 */ /***/ (function(module, exports) { /** @@ -75232,7 +75570,7 @@ module.exports = SetXY; /***/ }), -/* 429 */ +/* 431 */ /***/ (function(module, exports) { /** @@ -75269,7 +75607,7 @@ module.exports = SetY; /***/ }), -/* 430 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75396,7 +75734,7 @@ module.exports = ShiftPosition; /***/ }), -/* 431 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75426,7 +75764,7 @@ module.exports = Shuffle; /***/ }), -/* 432 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75435,7 +75773,7 @@ module.exports = Shuffle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmootherStep = __webpack_require__(190); +var MathSmootherStep = __webpack_require__(192); /** * [description] @@ -75480,7 +75818,7 @@ module.exports = SmootherStep; /***/ }), -/* 433 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75489,7 +75827,7 @@ module.exports = SmootherStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmoothStep = __webpack_require__(191); +var MathSmoothStep = __webpack_require__(193); /** * [description] @@ -75534,7 +75872,7 @@ module.exports = SmoothStep; /***/ }), -/* 434 */ +/* 436 */ /***/ (function(module, exports) { /** @@ -75586,7 +75924,7 @@ module.exports = Spread; /***/ }), -/* 435 */ +/* 437 */ /***/ (function(module, exports) { /** @@ -75619,7 +75957,7 @@ module.exports = ToggleVisible; /***/ }), -/* 436 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75634,54 +75972,9 @@ module.exports = ToggleVisible; module.exports = { - Animation: __webpack_require__(192), - AnimationFrame: __webpack_require__(193), - AnimationManager: __webpack_require__(194) - -}; - - -/***/ }), -/* 437 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Cache - */ - -module.exports = { - - BaseCache: __webpack_require__(196), - CacheManager: __webpack_require__(197) - -}; - - -/***/ }), -/* 438 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Cameras - */ - -module.exports = { - - Controls: __webpack_require__(439), - Scene2D: __webpack_require__(442), - Sprite3D: __webpack_require__(444) + Animation: __webpack_require__(194), + AnimationFrame: __webpack_require__(195), + AnimationManager: __webpack_require__(196) }; @@ -75697,13 +75990,13 @@ module.exports = { */ /** - * @namespace Phaser.Cameras.Controls + * @namespace Phaser.Cache */ module.exports = { - Fixed: __webpack_require__(440), - Smoothed: __webpack_require__(441) + BaseCache: __webpack_require__(198), + CacheManager: __webpack_require__(199) }; @@ -75712,6 +76005,51 @@ module.exports = { /* 440 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Cameras + */ + +module.exports = { + + Controls: __webpack_require__(441), + Scene2D: __webpack_require__(444), + Sprite3D: __webpack_require__(446) + +}; + + +/***/ }), +/* 441 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Cameras.Controls + */ + +module.exports = { + + Fixed: __webpack_require__(442), + Smoothed: __webpack_require__(443) + +}; + + +/***/ }), +/* 442 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -76002,7 +76340,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 441 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76467,7 +76805,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 442 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76483,13 +76821,13 @@ module.exports = SmoothedKeyControl; module.exports = { Camera: __webpack_require__(114), - CameraManager: __webpack_require__(443) + CameraManager: __webpack_require__(445) }; /***/ }), -/* 443 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76500,8 +76838,8 @@ module.exports = { var Camera = __webpack_require__(114); var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); -var PluginManager = __webpack_require__(11); +var GetFastValue = __webpack_require__(2); +var PluginManager = __webpack_require__(12); var RectangleContains = __webpack_require__(33); /** @@ -76969,7 +77307,7 @@ module.exports = CameraManager; /***/ }), -/* 444 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76985,15 +77323,15 @@ module.exports = CameraManager; module.exports = { Camera: __webpack_require__(117), - CameraManager: __webpack_require__(448), - OrthographicCamera: __webpack_require__(209), - PerspectiveCamera: __webpack_require__(210) + CameraManager: __webpack_require__(450), + OrthographicCamera: __webpack_require__(211), + PerspectiveCamera: __webpack_require__(212) }; /***/ }), -/* 445 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77007,12 +77345,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(446); + renderWebGL = __webpack_require__(448); } if (true) { - renderCanvas = __webpack_require__(447); + renderCanvas = __webpack_require__(449); } module.exports = { @@ -77024,7 +77362,7 @@ module.exports = { /***/ }), -/* 446 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77033,7 +77371,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -77063,7 +77401,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 447 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77072,7 +77410,7 @@ module.exports = SpriteWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -77102,7 +77440,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 448 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77112,9 +77450,9 @@ module.exports = SpriteCanvasRenderer; */ var Class = __webpack_require__(0); -var OrthographicCamera = __webpack_require__(209); -var PerspectiveCamera = __webpack_require__(210); -var PluginManager = __webpack_require__(11); +var OrthographicCamera = __webpack_require__(211); +var PerspectiveCamera = __webpack_require__(212); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -77136,7 +77474,7 @@ var CameraManager = new Class({ /** * [description] * - * @name Phaser.Cameras.Sprite3D#scene + * @name Phaser.Cameras.Sprite3D.CameraManager#scene * @type {Phaser.Scene} * @since 3.0.0 */ @@ -77145,7 +77483,7 @@ var CameraManager = new Class({ /** * [description] * - * @name Phaser.Cameras.Sprite3D#systems + * @name Phaser.Cameras.Sprite3D.CameraManager#systems * @type {Phaser.Scenes.Systems} * @since 3.0.0 */ @@ -77154,7 +77492,7 @@ var CameraManager = new Class({ /** * An Array of the Camera objects being managed by this Camera Manager. * - * @name Phaser.Cameras.Sprite3D#cameras + * @name Phaser.Cameras.Sprite3D.CameraManager#cameras * @type {array} * @since 3.0.0 */ @@ -77204,8 +77542,8 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#addOrthographicCamera * @since 3.0.0 * - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} width - [description] + * @param {number} height - [description] * * @return {[type]} [description] */ @@ -77229,9 +77567,9 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#addPerspectiveCamera * @since 3.0.0 * - * @param {[type]} fieldOfView - [description] - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} [fieldOfView=80] - [description] + * @param {number} [width] - [description] + * @param {number} [height] - [description] * * @return {[type]} [description] */ @@ -77256,7 +77594,7 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#getCamera * @since 3.0.0 * - * @param {[type]} name - [description] + * @param {string} name - [description] * * @return {[type]} [description] */ @@ -77317,8 +77655,8 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#update * @since 3.0.0 * - * @param {[type]} timestep - [description] - * @param {[type]} delta - [description] + * @param {number} timestep - [description] + * @param {number} delta - [description] */ update: function (timestep, delta) { @@ -77357,7 +77695,7 @@ module.exports = CameraManager; /***/ }), -/* 449 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77372,14 +77710,14 @@ module.exports = CameraManager; module.exports = { - GenerateTexture: __webpack_require__(211), - Palettes: __webpack_require__(450) + GenerateTexture: __webpack_require__(213), + Palettes: __webpack_require__(452) }; /***/ }), -/* 450 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77394,17 +77732,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(212), - C64: __webpack_require__(451), - CGA: __webpack_require__(452), - JMP: __webpack_require__(453), - MSX: __webpack_require__(454) + ARNE16: __webpack_require__(214), + C64: __webpack_require__(453), + CGA: __webpack_require__(454), + JMP: __webpack_require__(455), + MSX: __webpack_require__(456) }; /***/ }), -/* 451 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -77458,7 +77796,7 @@ module.exports = { /***/ }), -/* 452 */ +/* 454 */ /***/ (function(module, exports) { /** @@ -77512,7 +77850,7 @@ module.exports = { /***/ }), -/* 453 */ +/* 455 */ /***/ (function(module, exports) { /** @@ -77566,7 +77904,7 @@ module.exports = { /***/ }), -/* 454 */ +/* 456 */ /***/ (function(module, exports) { /** @@ -77620,7 +77958,7 @@ module.exports = { /***/ }), -/* 455 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77635,19 +77973,19 @@ module.exports = { module.exports = { - Path: __webpack_require__(456), + Path: __webpack_require__(458), - CubicBezier: __webpack_require__(213), + CubicBezier: __webpack_require__(215), Curve: __webpack_require__(66), - Ellipse: __webpack_require__(215), - Line: __webpack_require__(217), - Spline: __webpack_require__(218) + Ellipse: __webpack_require__(217), + Line: __webpack_require__(219), + Spline: __webpack_require__(220) }; /***/ }), -/* 456 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77659,13 +77997,13 @@ 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__(213); -var EllipseCurve = __webpack_require__(215); +var CubicBezierCurve = __webpack_require__(215); +var EllipseCurve = __webpack_require__(217); var GameObjectFactory = __webpack_require__(9); -var LineCurve = __webpack_require__(217); -var MovePathTo = __webpack_require__(457); +var LineCurve = __webpack_require__(219); +var MovePathTo = __webpack_require__(459); var Rectangle = __webpack_require__(8); -var SplineCurve = __webpack_require__(218); +var SplineCurve = __webpack_require__(220); var Vector2 = __webpack_require__(6); /** @@ -78412,7 +78750,7 @@ module.exports = Path; /***/ }), -/* 457 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78548,7 +78886,7 @@ module.exports = MoveTo; /***/ }), -/* 458 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78564,13 +78902,13 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(79), - DataManagerPlugin: __webpack_require__(459) + DataManagerPlugin: __webpack_require__(461) }; /***/ }), -/* 459 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78581,7 +78919,7 @@ module.exports = { var Class = __webpack_require__(0); var DataManager = __webpack_require__(79); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -78678,7 +79016,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 460 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78693,67 +79031,15 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(461), - Bounds: __webpack_require__(476), - Canvas: __webpack_require__(479), - Color: __webpack_require__(220), - Masks: __webpack_require__(490) + Align: __webpack_require__(463), + Bounds: __webpack_require__(478), + Canvas: __webpack_require__(481), + Color: __webpack_require__(222), + Masks: __webpack_require__(492) }; -/***/ }), -/* 461 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Display.Align - */ - -module.exports = { - - In: __webpack_require__(462), - To: __webpack_require__(463) - -}; - - -/***/ }), -/* 462 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Display.Align.In - */ - -module.exports = { - - BottomCenter: __webpack_require__(169), - BottomLeft: __webpack_require__(170), - BottomRight: __webpack_require__(171), - Center: __webpack_require__(172), - LeftCenter: __webpack_require__(174), - QuickSet: __webpack_require__(167), - RightCenter: __webpack_require__(175), - TopCenter: __webpack_require__(176), - TopLeft: __webpack_require__(177), - TopRight: __webpack_require__(178) - -}; - - /***/ }), /* 463 */ /***/ (function(module, exports, __webpack_require__) { @@ -78765,23 +79051,13 @@ module.exports = { */ /** - * @namespace Phaser.Display.Align.To + * @namespace Phaser.Display.Align */ module.exports = { - BottomCenter: __webpack_require__(464), - BottomLeft: __webpack_require__(465), - BottomRight: __webpack_require__(466), - LeftBottom: __webpack_require__(467), - LeftCenter: __webpack_require__(468), - LeftTop: __webpack_require__(469), - RightBottom: __webpack_require__(470), - RightCenter: __webpack_require__(471), - RightTop: __webpack_require__(472), - TopCenter: __webpack_require__(473), - TopLeft: __webpack_require__(474), - TopRight: __webpack_require__(475) + In: __webpack_require__(464), + To: __webpack_require__(465) }; @@ -78790,6 +79066,68 @@ module.exports = { /* 464 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Display.Align.In + */ + +module.exports = { + + BottomCenter: __webpack_require__(171), + BottomLeft: __webpack_require__(172), + BottomRight: __webpack_require__(173), + Center: __webpack_require__(174), + LeftCenter: __webpack_require__(176), + QuickSet: __webpack_require__(169), + RightCenter: __webpack_require__(177), + TopCenter: __webpack_require__(178), + TopLeft: __webpack_require__(179), + TopRight: __webpack_require__(180) + +}; + + +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Display.Align.To + */ + +module.exports = { + + BottomCenter: __webpack_require__(466), + BottomLeft: __webpack_require__(467), + BottomRight: __webpack_require__(468), + LeftBottom: __webpack_require__(469), + LeftCenter: __webpack_require__(470), + LeftTop: __webpack_require__(471), + RightBottom: __webpack_require__(472), + RightCenter: __webpack_require__(473), + RightTop: __webpack_require__(474), + TopCenter: __webpack_require__(475), + TopLeft: __webpack_require__(476), + TopRight: __webpack_require__(477) + +}; + + +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -78829,7 +79167,7 @@ module.exports = BottomCenter; /***/ }), -/* 465 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78871,7 +79209,7 @@ module.exports = BottomLeft; /***/ }), -/* 466 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78913,7 +79251,7 @@ module.exports = BottomRight; /***/ }), -/* 467 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78955,7 +79293,7 @@ module.exports = LeftBottom; /***/ }), -/* 468 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78997,7 +79335,7 @@ module.exports = LeftCenter; /***/ }), -/* 469 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79039,7 +79377,7 @@ module.exports = LeftTop; /***/ }), -/* 470 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79081,7 +79419,7 @@ module.exports = RightBottom; /***/ }), -/* 471 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79123,7 +79461,7 @@ module.exports = RightCenter; /***/ }), -/* 472 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79165,7 +79503,7 @@ module.exports = RightTop; /***/ }), -/* 473 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79207,7 +79545,7 @@ module.exports = TopCenter; /***/ }), -/* 474 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79249,7 +79587,7 @@ module.exports = TopLeft; /***/ }), -/* 475 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79291,7 +79629,7 @@ module.exports = TopRight; /***/ }), -/* 476 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79306,13 +79644,13 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(173), + CenterOn: __webpack_require__(175), GetBottom: __webpack_require__(24), GetCenterX: __webpack_require__(46), GetCenterY: __webpack_require__(49), GetLeft: __webpack_require__(26), - GetOffsetX: __webpack_require__(477), - GetOffsetY: __webpack_require__(478), + GetOffsetX: __webpack_require__(479), + GetOffsetY: __webpack_require__(480), GetRight: __webpack_require__(28), GetTop: __webpack_require__(30), SetBottom: __webpack_require__(25), @@ -79326,7 +79664,7 @@ module.exports = { /***/ }), -/* 477 */ +/* 479 */ /***/ (function(module, exports) { /** @@ -79356,7 +79694,7 @@ module.exports = GetOffsetX; /***/ }), -/* 478 */ +/* 480 */ /***/ (function(module, exports) { /** @@ -79386,7 +79724,7 @@ module.exports = GetOffsetY; /***/ }), -/* 479 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79401,17 +79739,17 @@ module.exports = GetOffsetY; module.exports = { - Interpolation: __webpack_require__(219), - Pool: __webpack_require__(20), + Interpolation: __webpack_require__(221), + Pool: __webpack_require__(21), Smoothing: __webpack_require__(120), - TouchAction: __webpack_require__(480), - UserSelect: __webpack_require__(481) + TouchAction: __webpack_require__(482), + UserSelect: __webpack_require__(483) }; /***/ }), -/* 480 */ +/* 482 */ /***/ (function(module, exports) { /** @@ -79446,7 +79784,7 @@ module.exports = TouchAction; /***/ }), -/* 481 */ +/* 483 */ /***/ (function(module, exports) { /** @@ -79493,7 +79831,7 @@ module.exports = UserSelect; /***/ }), -/* 482 */ +/* 484 */ /***/ (function(module, exports) { /** @@ -79541,7 +79879,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 483 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79551,7 +79889,7 @@ module.exports = ColorToRGBA; */ var Color = __webpack_require__(36); -var HueToComponent = __webpack_require__(222); +var HueToComponent = __webpack_require__(224); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -79591,7 +79929,7 @@ module.exports = HSLToColor; /***/ }), -/* 484 */ +/* 486 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -79619,7 +79957,7 @@ module.exports = function(module) { /***/ }), -/* 485 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79628,7 +79966,7 @@ module.exports = function(module) { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HSVToRGB = __webpack_require__(223); +var HSVToRGB = __webpack_require__(225); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -79660,7 +79998,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 486 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79669,7 +80007,7 @@ module.exports = HSVColorWheel; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(224); +var Linear = __webpack_require__(226); /** * Interpolates color values @@ -79763,7 +80101,7 @@ module.exports = { /***/ }), -/* 487 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79772,7 +80110,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Between = __webpack_require__(226); +var Between = __webpack_require__(228); var Color = __webpack_require__(36); /** @@ -79799,7 +80137,7 @@ module.exports = RandomRGB; /***/ }), -/* 488 */ +/* 490 */ /***/ (function(module, exports) { /** @@ -79863,7 +80201,7 @@ module.exports = RGBToHSV; /***/ }), -/* 489 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79872,7 +80210,7 @@ module.exports = RGBToHSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ComponentToHex = __webpack_require__(221); +var ComponentToHex = __webpack_require__(223); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -79907,7 +80245,7 @@ module.exports = RGBToString; /***/ }), -/* 490 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79922,14 +80260,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(491), - GeometryMask: __webpack_require__(492) + BitmapMask: __webpack_require__(493), + GeometryMask: __webpack_require__(494) }; /***/ }), -/* 491 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80144,7 +80482,7 @@ module.exports = BitmapMask; /***/ }), -/* 492 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80288,7 +80626,7 @@ module.exports = GeometryMask; /***/ }), -/* 493 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80304,16 +80642,16 @@ module.exports = GeometryMask; module.exports = { AddToDOM: __webpack_require__(123), - DOMContentLoaded: __webpack_require__(227), - ParseXML: __webpack_require__(228), - RemoveFromDOM: __webpack_require__(229), - RequestAnimationFrame: __webpack_require__(230) + DOMContentLoaded: __webpack_require__(229), + ParseXML: __webpack_require__(230), + RemoveFromDOM: __webpack_require__(231), + RequestAnimationFrame: __webpack_require__(232) }; /***/ }), -/* 494 */ +/* 496 */ /***/ (function(module, exports) { // shim for using process in browser @@ -80503,7 +80841,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 495 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80513,8 +80851,8 @@ process.umask = function() { return 0; }; */ var Class = __webpack_require__(0); -var EE = __webpack_require__(13); -var PluginManager = __webpack_require__(11); +var EE = __webpack_require__(14); +var PluginManager = __webpack_require__(12); /** * @namespace Phaser.Events @@ -80685,7 +81023,7 @@ module.exports = EventEmitter; /***/ }), -/* 496 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80695,25 +81033,25 @@ module.exports = EventEmitter; */ var AddToDOM = __webpack_require__(123); -var AnimationManager = __webpack_require__(194); -var CacheManager = __webpack_require__(197); -var CanvasPool = __webpack_require__(20); +var AnimationManager = __webpack_require__(196); +var CacheManager = __webpack_require__(199); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); -var Config = __webpack_require__(497); -var CreateRenderer = __webpack_require__(498); +var Config = __webpack_require__(499); +var CreateRenderer = __webpack_require__(500); var DataManager = __webpack_require__(79); -var DebugHeader = __webpack_require__(515); -var Device = __webpack_require__(516); -var DOMContentLoaded = __webpack_require__(227); -var EventEmitter = __webpack_require__(13); -var InputManager = __webpack_require__(237); +var DebugHeader = __webpack_require__(517); +var Device = __webpack_require__(518); +var DOMContentLoaded = __webpack_require__(229); +var EventEmitter = __webpack_require__(14); +var InputManager = __webpack_require__(239); var NOOP = __webpack_require__(3); -var PluginManager = __webpack_require__(11); -var SceneManager = __webpack_require__(249); -var SoundManagerCreator = __webpack_require__(253); -var TextureManager = __webpack_require__(260); -var TimeStep = __webpack_require__(539); -var VisibilityHandler = __webpack_require__(540); +var PluginManager = __webpack_require__(12); +var SceneManager = __webpack_require__(251); +var SoundManagerCreator = __webpack_require__(255); +var TextureManager = __webpack_require__(262); +var TimeStep = __webpack_require__(541); +var VisibilityHandler = __webpack_require__(542); /** * @classdesc @@ -81166,7 +81504,7 @@ module.exports = Game; /***/ }), -/* 497 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81180,7 +81518,7 @@ var CONST = __webpack_require__(22); var GetValue = __webpack_require__(4); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(3); -var Plugins = __webpack_require__(231); +var Plugins = __webpack_require__(233); var ValueToColor = __webpack_require__(115); /** @@ -81397,7 +81735,7 @@ module.exports = Config; /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81406,8 +81744,8 @@ module.exports = Config; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasInterpolation = __webpack_require__(219); -var CanvasPool = __webpack_require__(20); +var CanvasInterpolation = __webpack_require__(221); +var CanvasPool = __webpack_require__(21); var CONST = __webpack_require__(22); var Features = __webpack_require__(124); @@ -81485,8 +81823,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(499); - WebGLRenderer = __webpack_require__(504); + CanvasRenderer = __webpack_require__(501); + WebGLRenderer = __webpack_require__(506); // Let the config pick the renderer type, both are included if (config.renderType === CONST.WEBGL) @@ -81526,7 +81864,7 @@ module.exports = CreateRenderer; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81535,12 +81873,12 @@ module.exports = CreateRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitImage = __webpack_require__(500); -var CanvasSnapshot = __webpack_require__(501); +var BlitImage = __webpack_require__(502); +var CanvasSnapshot = __webpack_require__(503); var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var DrawImage = __webpack_require__(502); -var GetBlendModes = __webpack_require__(503); +var DrawImage = __webpack_require__(504); +var GetBlendModes = __webpack_require__(505); var ScaleModes = __webpack_require__(62); var Smoothing = __webpack_require__(120); @@ -82055,7 +82393,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, exports) { /** @@ -82096,7 +82434,7 @@ module.exports = BlitImage; /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports) { /** @@ -82135,7 +82473,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports) { /** @@ -82230,7 +82568,7 @@ module.exports = DrawImage; /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82240,7 +82578,7 @@ module.exports = DrawImage; */ var modes = __webpack_require__(45); -var CanvasFeatures = __webpack_require__(232); +var CanvasFeatures = __webpack_require__(234); /** * [description] @@ -82280,7 +82618,7 @@ module.exports = GetBlendModes; /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82293,13 +82631,13 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(22); var IsSizePowerOfTwo = __webpack_require__(125); var Utils = __webpack_require__(42); -var WebGLSnapshot = __webpack_require__(505); +var WebGLSnapshot = __webpack_require__(507); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(506); -var FlatTintPipeline = __webpack_require__(509); -var ForwardDiffuseLightPipeline = __webpack_require__(235); -var TextureTintPipeline = __webpack_require__(236); +var BitmapMaskPipeline = __webpack_require__(508); +var FlatTintPipeline = __webpack_require__(511); +var ForwardDiffuseLightPipeline = __webpack_require__(237); +var TextureTintPipeline = __webpack_require__(238); /** * @classdesc @@ -83488,8 +83826,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteTexture: function () + deleteTexture: function (texture) { + this.gl.deleteTexture(texture); return this; }, @@ -83503,8 +83842,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteFramebuffer: function () + deleteFramebuffer: function (framebuffer) { + this.gl.deleteFramebuffer(framebuffer); return this; }, @@ -83518,8 +83858,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteProgram: function () + deleteProgram: function (program) { + this.gl.deleteProgram(program); return this; }, @@ -83533,8 +83874,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteBuffer: function () + deleteBuffer: function (buffer) { + this.gl.deleteBuffer(buffer); return this; }, @@ -84081,7 +84423,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports) { /** @@ -84150,7 +84492,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84160,8 +84502,8 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(507); -var ShaderSourceVS = __webpack_require__(508); +var ShaderSourceFS = __webpack_require__(509); +var ShaderSourceVS = __webpack_require__(510); var WebGLPipeline = __webpack_require__(126); /** @@ -84361,19 +84703,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = maskColor.a * mainColor.a;\r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n" /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n" /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84384,10 +84726,10 @@ module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision med var Class = __webpack_require__(0); var Commands = __webpack_require__(127); -var Earcut = __webpack_require__(233); -var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(510); -var ShaderSourceVS = __webpack_require__(511); +var Earcut = __webpack_require__(235); +var ModelViewProjection = __webpack_require__(236); +var ShaderSourceFS = __webpack_require__(512); +var ShaderSourceVS = __webpack_require__(513); var Utils = __webpack_require__(42); var WebGLPipeline = __webpack_require__(126); @@ -85592,37 +85934,37 @@ module.exports = FlatTintPipeline; /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n" /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n" /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n" /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n" /***/ }), -/* 514 */ +/* 516 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n" /***/ }), -/* 515 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85741,7 +86083,7 @@ module.exports = DebugHeader; /***/ }), -/* 516 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85764,17 +86106,17 @@ module.exports = { os: __webpack_require__(67), browser: __webpack_require__(82), features: __webpack_require__(124), - input: __webpack_require__(517), - audio: __webpack_require__(518), - video: __webpack_require__(519), - fullscreen: __webpack_require__(520), - canvasFeatures: __webpack_require__(232) + input: __webpack_require__(519), + audio: __webpack_require__(520), + video: __webpack_require__(521), + fullscreen: __webpack_require__(522), + canvasFeatures: __webpack_require__(234) }; /***/ }), -/* 517 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85854,7 +86196,7 @@ module.exports = init(); /***/ }), -/* 518 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85980,7 +86322,7 @@ module.exports = init(); /***/ }), -/* 519 */ +/* 521 */ /***/ (function(module, exports) { /** @@ -86066,7 +86408,7 @@ module.exports = init(); /***/ }), -/* 520 */ +/* 522 */ /***/ (function(module, exports) { /** @@ -86165,7 +86507,7 @@ module.exports = init(); /***/ }), -/* 521 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86174,7 +86516,7 @@ module.exports = init(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(522); +var AdvanceKeyCombo = __webpack_require__(524); /** * Used internally by the KeyCombo class. @@ -86245,7 +86587,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 522 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -86286,7 +86628,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 523 */ +/* 525 */ /***/ (function(module, exports) { /** @@ -86320,7 +86662,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 524 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86342,7 +86684,7 @@ module.exports = KeyMap; /***/ }), -/* 525 */ +/* 527 */ /***/ (function(module, exports) { /** @@ -86397,7 +86739,7 @@ module.exports = ProcessKeyDown; /***/ }), -/* 526 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -86447,7 +86789,7 @@ module.exports = ProcessKeyUp; /***/ }), -/* 527 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86456,8 +86798,8 @@ module.exports = ProcessKeyUp; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); -var UppercaseFirst = __webpack_require__(251); +var GetFastValue = __webpack_require__(2); +var UppercaseFirst = __webpack_require__(253); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -86509,7 +86851,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 528 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86518,7 +86860,7 @@ module.exports = GetPhysicsPlugins; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. @@ -86555,7 +86897,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 529 */ +/* 531 */ /***/ (function(module, exports) { /** @@ -86603,7 +86945,7 @@ module.exports = InjectionMap; /***/ }), -/* 530 */ +/* 532 */ /***/ (function(module, exports) { /** @@ -86636,7 +86978,7 @@ module.exports = Canvas; /***/ }), -/* 531 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -86669,7 +87011,7 @@ module.exports = Image; /***/ }), -/* 532 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86774,7 +87116,7 @@ module.exports = JSONArray; /***/ }), -/* 533 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86871,7 +87213,7 @@ module.exports = JSONHash; /***/ }), -/* 534 */ +/* 536 */ /***/ (function(module, exports) { /** @@ -86944,7 +87286,7 @@ module.exports = Pyxel; /***/ }), -/* 535 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86953,7 +87295,7 @@ module.exports = Pyxel; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parses a Sprite Sheet and adds the Frames to the Texture. @@ -87056,7 +87398,7 @@ module.exports = SpriteSheet; /***/ }), -/* 536 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87065,7 +87407,7 @@ module.exports = SpriteSheet; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas. @@ -87239,7 +87581,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 537 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -87322,7 +87664,7 @@ module.exports = StarlingXML; /***/ }), -/* 538 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -87489,7 +87831,7 @@ TextureImporter: /***/ }), -/* 539 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87501,7 +87843,7 @@ TextureImporter: var Class = __webpack_require__(0); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); -var RequestAnimationFrame = __webpack_require__(230); +var RequestAnimationFrame = __webpack_require__(232); // Frame Rate config // fps: { @@ -88111,7 +88453,7 @@ module.exports = TimeStep; /***/ }), -/* 540 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -88225,7 +88567,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 541 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88240,12 +88582,12 @@ module.exports = VisibilityHandler; var GameObjects = { - DisplayList: __webpack_require__(542), - GameObjectCreator: __webpack_require__(14), + DisplayList: __webpack_require__(544), + GameObjectCreator: __webpack_require__(13), GameObjectFactory: __webpack_require__(9), - UpdateList: __webpack_require__(543), + UpdateList: __webpack_require__(545), - Components: __webpack_require__(12), + Components: __webpack_require__(11), BitmapText: __webpack_require__(131), Blitter: __webpack_require__(132), @@ -88254,44 +88596,47 @@ var GameObjects = { Group: __webpack_require__(69), Image: __webpack_require__(70), Particles: __webpack_require__(137), - PathFollower: __webpack_require__(287), + PathFollower: __webpack_require__(289), + RenderTexture: __webpack_require__(139), Sprite3D: __webpack_require__(81), Sprite: __webpack_require__(37), - Text: __webpack_require__(139), - TileSprite: __webpack_require__(140), + Text: __webpack_require__(140), + TileSprite: __webpack_require__(141), Zone: __webpack_require__(77), // Game Object Factories Factories: { - Blitter: __webpack_require__(622), - DynamicBitmapText: __webpack_require__(623), - Graphics: __webpack_require__(624), - Group: __webpack_require__(625), - Image: __webpack_require__(626), - Particles: __webpack_require__(627), - PathFollower: __webpack_require__(628), - Sprite3D: __webpack_require__(629), - Sprite: __webpack_require__(630), - StaticBitmapText: __webpack_require__(631), - Text: __webpack_require__(632), - TileSprite: __webpack_require__(633), - Zone: __webpack_require__(634) + Blitter: __webpack_require__(628), + DynamicBitmapText: __webpack_require__(629), + Graphics: __webpack_require__(630), + Group: __webpack_require__(631), + Image: __webpack_require__(632), + Particles: __webpack_require__(633), + PathFollower: __webpack_require__(634), + RenderTexture: __webpack_require__(635), + Sprite3D: __webpack_require__(636), + Sprite: __webpack_require__(637), + StaticBitmapText: __webpack_require__(638), + Text: __webpack_require__(639), + TileSprite: __webpack_require__(640), + Zone: __webpack_require__(641) }, Creators: { - Blitter: __webpack_require__(635), - DynamicBitmapText: __webpack_require__(636), - Graphics: __webpack_require__(637), - Group: __webpack_require__(638), - Image: __webpack_require__(639), - Particles: __webpack_require__(640), - Sprite3D: __webpack_require__(641), - Sprite: __webpack_require__(642), - StaticBitmapText: __webpack_require__(643), - Text: __webpack_require__(644), - TileSprite: __webpack_require__(645), - Zone: __webpack_require__(646) + Blitter: __webpack_require__(642), + DynamicBitmapText: __webpack_require__(643), + Graphics: __webpack_require__(644), + Group: __webpack_require__(645), + Image: __webpack_require__(646), + Particles: __webpack_require__(647), + RenderTexture: __webpack_require__(648), + Sprite3D: __webpack_require__(649), + Sprite: __webpack_require__(650), + StaticBitmapText: __webpack_require__(651), + Text: __webpack_require__(652), + TileSprite: __webpack_require__(653), + Zone: __webpack_require__(654) } }; @@ -88300,25 +88645,25 @@ if (true) { // WebGL only Game Objects GameObjects.Mesh = __webpack_require__(88); - GameObjects.Quad = __webpack_require__(141); + GameObjects.Quad = __webpack_require__(143); - GameObjects.Factories.Mesh = __webpack_require__(650); - GameObjects.Factories.Quad = __webpack_require__(651); + GameObjects.Factories.Mesh = __webpack_require__(658); + GameObjects.Factories.Quad = __webpack_require__(659); - GameObjects.Creators.Mesh = __webpack_require__(652); - GameObjects.Creators.Quad = __webpack_require__(653); + GameObjects.Creators.Mesh = __webpack_require__(660); + GameObjects.Creators.Quad = __webpack_require__(661); - GameObjects.Light = __webpack_require__(290); + GameObjects.Light = __webpack_require__(291); - __webpack_require__(291); - __webpack_require__(654); + __webpack_require__(292); + __webpack_require__(662); } module.exports = GameObjects; /***/ }), -/* 542 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88329,8 +88674,8 @@ module.exports = GameObjects; var Class = __webpack_require__(0); var List = __webpack_require__(86); -var PluginManager = __webpack_require__(11); -var StableSort = __webpack_require__(264); +var PluginManager = __webpack_require__(12); +var StableSort = __webpack_require__(266); /** * @classdesc @@ -88490,7 +88835,7 @@ module.exports = DisplayList; /***/ }), -/* 543 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88500,7 +88845,7 @@ module.exports = DisplayList; */ var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -88760,7 +89105,7 @@ module.exports = UpdateList; /***/ }), -/* 544 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88769,7 +89114,7 @@ module.exports = UpdateList; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(266); +var ParseXMLBitmapFont = __webpack_require__(268); var ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing) { @@ -88794,7 +89139,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 545 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88989,7 +89334,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 546 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89003,12 +89348,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(547); + renderWebGL = __webpack_require__(549); } if (true) { - renderCanvas = __webpack_require__(548); + renderCanvas = __webpack_require__(550); } module.exports = { @@ -89020,7 +89365,7 @@ module.exports = { /***/ }), -/* 547 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89029,7 +89374,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -89062,7 +89407,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 548 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89071,7 +89416,7 @@ module.exports = BitmapTextWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -89224,7 +89569,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 549 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89238,12 +89583,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(550); + renderWebGL = __webpack_require__(552); } if (true) { - renderCanvas = __webpack_require__(551); + renderCanvas = __webpack_require__(553); } module.exports = { @@ -89255,7 +89600,7 @@ module.exports = { /***/ }), -/* 550 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89264,7 +89609,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -89294,7 +89639,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 551 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89303,7 +89648,7 @@ module.exports = BlitterWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -89377,7 +89722,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 552 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89722,7 +90067,7 @@ module.exports = Bob; /***/ }), -/* 553 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89736,12 +90081,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(554); + renderWebGL = __webpack_require__(556); } if (true) { - renderCanvas = __webpack_require__(555); + renderCanvas = __webpack_require__(557); } module.exports = { @@ -89753,7 +90098,7 @@ module.exports = { /***/ }), -/* 554 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89762,7 +90107,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -89795,7 +90140,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 555 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89804,7 +90149,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -89988,7 +90333,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 556 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -90022,7 +90367,7 @@ module.exports = Area; /***/ }), -/* 557 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90052,7 +90397,7 @@ module.exports = Clone; /***/ }), -/* 558 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90083,7 +90428,7 @@ module.exports = ContainsPoint; /***/ }), -/* 559 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90119,7 +90464,7 @@ module.exports = ContainsRect; /***/ }), -/* 560 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -90149,7 +90494,7 @@ module.exports = CopyFrom; /***/ }), -/* 561 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -90184,7 +90529,7 @@ module.exports = Equals; /***/ }), -/* 562 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90222,7 +90567,7 @@ module.exports = GetBounds; /***/ }), -/* 563 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -90255,7 +90600,7 @@ module.exports = Offset; /***/ }), -/* 564 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -90287,7 +90632,7 @@ module.exports = OffsetPoint; /***/ }), -/* 565 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90301,15 +90646,15 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(566); + renderWebGL = __webpack_require__(568); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(271); + renderCanvas = __webpack_require__(273); } if (true) { - renderCanvas = __webpack_require__(271); + renderCanvas = __webpack_require__(273); } module.exports = { @@ -90321,7 +90666,7 @@ module.exports = { /***/ }), -/* 566 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90330,7 +90675,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -90360,7 +90705,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 567 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90374,12 +90719,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(568); + renderWebGL = __webpack_require__(570); } if (true) { - renderCanvas = __webpack_require__(569); + renderCanvas = __webpack_require__(571); } module.exports = { @@ -90391,7 +90736,7 @@ module.exports = { /***/ }), -/* 568 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90400,7 +90745,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -90430,7 +90775,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 569 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90439,7 +90784,7 @@ module.exports = ImageWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -90469,7 +90814,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 570 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90479,7 +90824,7 @@ module.exports = ImageCanvasRenderer; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -90684,7 +91029,7 @@ module.exports = GravityWell; /***/ }), -/* 571 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90695,18 +91040,18 @@ module.exports = GravityWell; var BlendModes = __webpack_require__(45); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(572); -var EdgeZone = __webpack_require__(573); -var EmitterOp = __webpack_require__(574); -var GetFastValue = __webpack_require__(1); +var Components = __webpack_require__(11); +var DeathZone = __webpack_require__(574); +var EdgeZone = __webpack_require__(575); +var EmitterOp = __webpack_require__(576); +var GetFastValue = __webpack_require__(2); var GetRandomElement = __webpack_require__(138); -var HasAny = __webpack_require__(286); +var HasAny = __webpack_require__(288); var HasValue = __webpack_require__(72); -var Particle = __webpack_require__(608); -var RandomZone = __webpack_require__(609); +var Particle = __webpack_require__(610); +var RandomZone = __webpack_require__(611); var Rectangle = __webpack_require__(8); -var StableSort = __webpack_require__(264); +var StableSort = __webpack_require__(266); var Vector2 = __webpack_require__(6); var Wrap = __webpack_require__(50); @@ -92665,7 +93010,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 572 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92743,7 +93088,7 @@ module.exports = DeathZone; /***/ }), -/* 573 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92982,7 +93327,7 @@ module.exports = EdgeZone; /***/ }), -/* 574 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92992,9 +93337,9 @@ module.exports = EdgeZone; */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(273); +var FloatBetween = __webpack_require__(275); var GetEaseFunction = __webpack_require__(71); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(50); /** @@ -93541,7 +93886,7 @@ module.exports = EmitterOp; /***/ }), -/* 575 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93550,18 +93895,18 @@ module.exports = EmitterOp; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(274); -var Bounce = __webpack_require__(275); -var Circular = __webpack_require__(276); -var Cubic = __webpack_require__(277); -var Elastic = __webpack_require__(278); -var Expo = __webpack_require__(279); -var Linear = __webpack_require__(280); -var Quadratic = __webpack_require__(281); -var Quartic = __webpack_require__(282); -var Quintic = __webpack_require__(283); -var Sine = __webpack_require__(284); -var Stepped = __webpack_require__(285); +var Back = __webpack_require__(276); +var Bounce = __webpack_require__(277); +var Circular = __webpack_require__(278); +var Cubic = __webpack_require__(279); +var Elastic = __webpack_require__(280); +var Expo = __webpack_require__(281); +var Linear = __webpack_require__(282); +var Quadratic = __webpack_require__(283); +var Quartic = __webpack_require__(284); +var Quintic = __webpack_require__(285); +var Sine = __webpack_require__(286); +var Stepped = __webpack_require__(287); // EaseMap module.exports = { @@ -93622,7 +93967,7 @@ module.exports = { /***/ }), -/* 576 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -93653,7 +93998,7 @@ module.exports = In; /***/ }), -/* 577 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -93684,7 +94029,7 @@ module.exports = Out; /***/ }), -/* 578 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -93724,7 +94069,7 @@ module.exports = InOut; /***/ }), -/* 579 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -93769,7 +94114,7 @@ module.exports = In; /***/ }), -/* 580 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -93812,7 +94157,7 @@ module.exports = Out; /***/ }), -/* 581 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -93876,7 +94221,7 @@ module.exports = InOut; /***/ }), -/* 582 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -93904,7 +94249,7 @@ module.exports = In; /***/ }), -/* 583 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -93932,7 +94277,7 @@ module.exports = Out; /***/ }), -/* 584 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -93967,7 +94312,7 @@ module.exports = InOut; /***/ }), -/* 585 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -93995,7 +94340,7 @@ module.exports = In; /***/ }), -/* 586 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -94023,7 +94368,7 @@ module.exports = Out; /***/ }), -/* 587 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -94058,7 +94403,7 @@ module.exports = InOut; /***/ }), -/* 588 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -94113,7 +94458,7 @@ module.exports = In; /***/ }), -/* 589 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -94168,7 +94513,7 @@ module.exports = Out; /***/ }), -/* 590 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -94230,7 +94575,7 @@ module.exports = InOut; /***/ }), -/* 591 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -94258,7 +94603,7 @@ module.exports = In; /***/ }), -/* 592 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -94286,7 +94631,7 @@ module.exports = Out; /***/ }), -/* 593 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -94321,7 +94666,7 @@ module.exports = InOut; /***/ }), -/* 594 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -94349,7 +94694,7 @@ module.exports = Linear; /***/ }), -/* 595 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -94377,7 +94722,7 @@ module.exports = In; /***/ }), -/* 596 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -94405,7 +94750,7 @@ module.exports = Out; /***/ }), -/* 597 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -94440,7 +94785,7 @@ module.exports = InOut; /***/ }), -/* 598 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -94468,7 +94813,7 @@ module.exports = In; /***/ }), -/* 599 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -94496,7 +94841,7 @@ module.exports = Out; /***/ }), -/* 600 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -94531,7 +94876,7 @@ module.exports = InOut; /***/ }), -/* 601 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -94559,7 +94904,7 @@ module.exports = In; /***/ }), -/* 602 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -94587,7 +94932,7 @@ module.exports = Out; /***/ }), -/* 603 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -94622,7 +94967,7 @@ module.exports = InOut; /***/ }), -/* 604 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -94661,7 +95006,7 @@ module.exports = In; /***/ }), -/* 605 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -94700,7 +95045,7 @@ module.exports = Out; /***/ }), -/* 606 */ +/* 608 */ /***/ (function(module, exports) { /** @@ -94739,7 +95084,7 @@ module.exports = InOut; /***/ }), -/* 607 */ +/* 609 */ /***/ (function(module, exports) { /** @@ -94781,7 +95126,7 @@ module.exports = Stepped; /***/ }), -/* 608 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95382,7 +95727,7 @@ module.exports = Particle; /***/ }), -/* 609 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95455,7 +95800,7 @@ module.exports = RandomZone; /***/ }), -/* 610 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95469,12 +95814,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(611); + renderWebGL = __webpack_require__(613); } if (true) { - renderCanvas = __webpack_require__(612); + renderCanvas = __webpack_require__(614); } module.exports = { @@ -95486,7 +95831,7 @@ module.exports = { /***/ }), -/* 611 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95495,7 +95840,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -95527,7 +95872,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 612 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95536,7 +95881,7 @@ module.exports = ParticleManagerWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -95624,7 +95969,126 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 613 */ +/* 615 */ +/***/ (function(module, exports) { + +var RenderTextureWebGL = { + + fill: function (color) + { + return this; + }, + + clear: function () + { + this.renderer.setFramebuffer(this.framebuffer); + var gl = this.gl; + gl.clearColor(0, 0, 0, 0); + gl.clear(gl.COLOR_BUFFER_BIT); + this.renderer.setFramebuffer(null); + return this; + }, + + draw: function (texture, x, y) + { + this.renderer.setFramebuffer(this.framebuffer); + this.renderer.pipelines.TextureTintPipeline.drawTexture(texture, x, y, 0, 0, texture.width, texture.height, this.currentMatrix); + this.renderer.setFramebuffer(null); + return this; + }, + + drawFrame: function (texture, x, y, frame) + { + this.renderer.setFramebuffer(this.framebuffer); + this.renderer.pipelines.TextureTintPipeline.drawTexture(texture, frame.x, frame.y, frame.width, frame.height, texture.width, texture.height, this.currentMatrix); + this.renderer.setFramebuffer(null); + return this; + } + +}; + +module.exports = RenderTextureWebGL; + + +/***/ }), +/* 616 */ +/***/ (function(module, exports, __webpack_require__) { + +var renderWebGL = __webpack_require__(3); +var renderCanvas = __webpack_require__(3); + +if (true) +{ + renderWebGL = __webpack_require__(617); +} + +if (true) +{ + renderCanvas = __webpack_require__(618); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 617 */ +/***/ (function(module, exports, __webpack_require__) { + +var GameObject = __webpack_require__(1); + +var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolationPercentage, camera) +{ + if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id))) + { + return; + } + + this.pipeline.batchTexture( + renderTexture, + renderTexture.texture, + renderTexture.texture.width, renderTexture.texture.height, + renderTexture.x, renderTexture.y, + renderTexture.width, renderTexture.height, + renderTexture.scaleX, renderTexture.scaleY, + renderTexture.rotation, + renderTexture.flipX, renderTexture.flipY, + renderTexture.scrollFactorX, renderTexture.scrollFactorY, + renderTexture.displayOriginX, renderTexture.displayOriginY, + 0, 0, renderTexture.texture.width, renderTexture.texture.height, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0, 0, + camera + ); +}; + +module.exports = RenderTextureWebGLRenderer; + + +/***/ }), +/* 618 */ +/***/ (function(module, exports, __webpack_require__) { + +var GameObject = __webpack_require__(1); + +var RenderTextureCanvasRenderer = function (renderer, renderTexture, interpolationPercentage, camera) +{ + if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id))) + { + return; + } + +}; + +module.exports = RenderTextureCanvasRenderer; + + +/***/ }), +/* 619 */ /***/ (function(module, exports) { /** @@ -95703,7 +96167,7 @@ module.exports = GetTextSize; /***/ }), -/* 614 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95717,12 +96181,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(615); + renderWebGL = __webpack_require__(621); } if (true) { - renderCanvas = __webpack_require__(616); + renderCanvas = __webpack_require__(622); } module.exports = { @@ -95734,7 +96198,7 @@ module.exports = { /***/ }), -/* 615 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95743,7 +96207,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -95779,7 +96243,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 616 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95788,7 +96252,7 @@ module.exports = TextWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -95853,7 +96317,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 617 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95865,7 +96329,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var MeasureText = __webpack_require__(618); +var MeasureText = __webpack_require__(624); // Key: [ Object Key, Default Value ] @@ -96148,9 +96612,9 @@ var TextStyle = new Class({ * @since 3.0.0 * * @param {[type]} style - [description] - * @param {[type]} updateText - [description] + * @param {boolean} [updateText=true] - [description] * - * @return {Phaser.GameObjects.Components.TextStyle This TextStyle component. + * @return {Phaser.GameObjects.Components.TextStyle} This TextStyle component. */ setStyle: function (style, updateText) { @@ -96423,7 +96887,7 @@ var TextStyle = new Class({ * @method Phaser.GameObjects.Components.TextStyle#setBackgroundColor * @since 3.0.0 * - * @param {string color - [description] + * @param {string} color - [description] * * @return {Phaser.GameObjects.Text} The parent Text object. */ @@ -96768,7 +97232,7 @@ module.exports = TextStyle; /***/ }), -/* 618 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96777,7 +97241,7 @@ module.exports = TextStyle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); /** * Calculates the ascent, descent and fontSize of a given font style. @@ -96897,7 +97361,7 @@ module.exports = MeasureText; /***/ }), -/* 619 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96911,12 +97375,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(620); + renderWebGL = __webpack_require__(626); } if (true) { - renderCanvas = __webpack_require__(621); + renderCanvas = __webpack_require__(627); } module.exports = { @@ -96928,7 +97392,7 @@ module.exports = { /***/ }), -/* 620 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96937,7 +97401,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -96969,7 +97433,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 621 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96978,7 +97442,7 @@ module.exports = TileSpriteWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -97043,7 +97507,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 622 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97085,7 +97549,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 623 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97128,7 +97592,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 624 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97167,7 +97631,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 625 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97213,7 +97677,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 626 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97255,7 +97719,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 627 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97301,7 +97765,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 628 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97311,7 +97775,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(9); -var PathFollower = __webpack_require__(287); +var PathFollower = __webpack_require__(289); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -97349,7 +97813,20 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 629 */ +/* 635 */ +/***/ (function(module, exports, __webpack_require__) { + +var GameObjectFactory = __webpack_require__(9); +var RenderTexture = __webpack_require__(139); + +GameObjectFactory.register('renderTexture', function (x, y, width, height) +{ + return this.displayList.add(new RenderTexture(this.scene, x, y, width, height)); +}); + + +/***/ }), +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97397,7 +97874,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) /***/ }), -/* 630 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97444,7 +97921,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 631 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97487,7 +97964,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) /***/ }), -/* 632 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97496,7 +97973,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(139); +var Text = __webpack_require__(140); var GameObjectFactory = __webpack_require__(9); /** @@ -97529,7 +98006,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 633 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97538,7 +98015,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileSprite = __webpack_require__(140); +var TileSprite = __webpack_require__(141); var GameObjectFactory = __webpack_require__(9); /** @@ -97573,7 +98050,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 634 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97615,7 +98092,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 635 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97625,8 +98102,8 @@ GameObjectFactory.register('zone', function (x, y, width, height) */ var Blitter = __webpack_require__(132); -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); /** @@ -97657,7 +98134,7 @@ GameObjectCreator.register('blitter', function (config) /***/ }), -/* 636 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97667,8 +98144,8 @@ GameObjectCreator.register('blitter', function (config) */ var BitmapText = __webpack_require__(133); -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); /** @@ -97701,7 +98178,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) /***/ }), -/* 637 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97710,7 +98187,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var Graphics = __webpack_require__(134); /** @@ -97734,7 +98211,7 @@ GameObjectCreator.register('graphics', function (config) /***/ }), -/* 638 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97743,7 +98220,7 @@ GameObjectCreator.register('graphics', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var Group = __webpack_require__(69); /** @@ -97767,7 +98244,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 639 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97776,8 +98253,8 @@ GameObjectCreator.register('group', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Image = __webpack_require__(70); @@ -97809,7 +98286,7 @@ GameObjectCreator.register('image', function (config) /***/ }), -/* 640 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97818,9 +98295,9 @@ GameObjectCreator.register('image', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var ParticleEmitterManager = __webpack_require__(137); /** @@ -97866,7 +98343,31 @@ GameObjectCreator.register('particles', function (config) /***/ }), -/* 641 */ +/* 648 */ +/***/ (function(module, exports, __webpack_require__) { + +var BuildGameObject = __webpack_require__(19); +var BuildGameObjectAnimation = __webpack_require__(142); +var GameObjectCreator = __webpack_require__(13); +var GetAdvancedValue = __webpack_require__(10); +var RenderTexture = __webpack_require__(139); + +GameObjectCreator.register('renderTexture', function (config) +{ + var x = GetAdvancedValue(config, 'x', 0); + var y = GetAdvancedValue(config, 'y', 0); + var width = GetAdvancedValue(config, 'width', 32); + var height = GetAdvancedValue(config, 'height', 32); + var renderTexture = new RenderTexture(this.scene, x, y, width, height); + + BuildGameObject(this.scene, renderTexture, config); + + return renderTexture; +}); + + +/***/ }), +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97875,9 +98376,9 @@ GameObjectCreator.register('particles', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(289); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var BuildGameObjectAnimation = __webpack_require__(142); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Sprite3D = __webpack_require__(81); @@ -97915,7 +98416,7 @@ GameObjectCreator.register('sprite3D', function (config) /***/ }), -/* 642 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97924,9 +98425,9 @@ GameObjectCreator.register('sprite3D', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(289); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var BuildGameObjectAnimation = __webpack_require__(142); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Sprite = __webpack_require__(37); @@ -97964,7 +98465,7 @@ GameObjectCreator.register('sprite', function (config) /***/ }), -/* 643 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97974,8 +98475,8 @@ GameObjectCreator.register('sprite', function (config) */ var BitmapText = __webpack_require__(131); -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); @@ -98010,7 +98511,7 @@ GameObjectCreator.register('bitmapText', function (config) /***/ }), -/* 644 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98019,10 +98520,10 @@ GameObjectCreator.register('bitmapText', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var Text = __webpack_require__(139); +var Text = __webpack_require__(140); /** * Creates a new Text Game Object and returns it. @@ -98089,7 +98590,7 @@ GameObjectCreator.register('text', function (config) /***/ }), -/* 645 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98098,10 +98599,10 @@ GameObjectCreator.register('text', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var TileSprite = __webpack_require__(140); +var TileSprite = __webpack_require__(141); /** * Creates a new TileSprite Game Object and returns it. @@ -98135,7 +98636,7 @@ GameObjectCreator.register('tileSprite', function (config) /***/ }), -/* 646 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98144,7 +98645,7 @@ GameObjectCreator.register('tileSprite', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Zone = __webpack_require__(77); @@ -98174,7 +98675,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 647 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98188,12 +98689,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(648); + renderWebGL = __webpack_require__(656); } if (true) { - renderCanvas = __webpack_require__(649); + renderCanvas = __webpack_require__(657); } module.exports = { @@ -98205,7 +98706,7 @@ module.exports = { /***/ }), -/* 648 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98214,7 +98715,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -98244,7 +98745,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 649 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -98273,7 +98774,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 650 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98323,7 +98824,7 @@ if (true) /***/ }), -/* 651 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98332,7 +98833,7 @@ if (true) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Quad = __webpack_require__(141); +var Quad = __webpack_require__(143); var GameObjectFactory = __webpack_require__(9); /** @@ -98369,7 +98870,7 @@ if (true) /***/ }), -/* 652 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98378,8 +98879,8 @@ if (true) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); var Mesh = __webpack_require__(88); @@ -98416,7 +98917,7 @@ GameObjectCreator.register('mesh', function (config) /***/ }), -/* 653 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98425,10 +98926,10 @@ GameObjectCreator.register('mesh', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var Quad = __webpack_require__(141); +var Quad = __webpack_require__(143); /** * Creates a new Quad Game Object and returns it. @@ -98460,7 +98961,7 @@ GameObjectCreator.register('quad', function (config) /***/ }), -/* 654 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98470,8 +98971,8 @@ GameObjectCreator.register('quad', function (config) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(291); -var PluginManager = __webpack_require__(11); +var LightsManager = __webpack_require__(292); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -98555,7 +99056,7 @@ module.exports = LightsPlugin; /***/ }), -/* 655 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98566,27 +99067,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(63); -Circle.Area = __webpack_require__(656); -Circle.Circumference = __webpack_require__(181); +Circle.Area = __webpack_require__(664); +Circle.Circumference = __webpack_require__(183); Circle.CircumferencePoint = __webpack_require__(104); -Circle.Clone = __webpack_require__(657); +Circle.Clone = __webpack_require__(665); Circle.Contains = __webpack_require__(32); -Circle.ContainsPoint = __webpack_require__(658); -Circle.ContainsRect = __webpack_require__(659); -Circle.CopyFrom = __webpack_require__(660); -Circle.Equals = __webpack_require__(661); -Circle.GetBounds = __webpack_require__(662); -Circle.GetPoint = __webpack_require__(179); -Circle.GetPoints = __webpack_require__(180); -Circle.Offset = __webpack_require__(663); -Circle.OffsetPoint = __webpack_require__(664); +Circle.ContainsPoint = __webpack_require__(666); +Circle.ContainsRect = __webpack_require__(667); +Circle.CopyFrom = __webpack_require__(668); +Circle.Equals = __webpack_require__(669); +Circle.GetBounds = __webpack_require__(670); +Circle.GetPoint = __webpack_require__(181); +Circle.GetPoints = __webpack_require__(182); +Circle.Offset = __webpack_require__(671); +Circle.OffsetPoint = __webpack_require__(672); Circle.Random = __webpack_require__(105); module.exports = Circle; /***/ }), -/* 656 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -98614,7 +99115,7 @@ module.exports = Area; /***/ }), -/* 657 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98644,7 +99145,7 @@ module.exports = Clone; /***/ }), -/* 658 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98675,7 +99176,7 @@ module.exports = ContainsPoint; /***/ }), -/* 659 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98711,7 +99212,7 @@ module.exports = ContainsRect; /***/ }), -/* 660 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -98741,7 +99242,7 @@ module.exports = CopyFrom; /***/ }), -/* 661 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -98775,7 +99276,7 @@ module.exports = Equals; /***/ }), -/* 662 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98813,7 +99314,7 @@ module.exports = GetBounds; /***/ }), -/* 663 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -98846,7 +99347,7 @@ module.exports = Offset; /***/ }), -/* 664 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -98878,7 +99379,7 @@ module.exports = OffsetPoint; /***/ }), -/* 665 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98909,7 +99410,7 @@ module.exports = CircleToCircle; /***/ }), -/* 666 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -98963,7 +99464,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 667 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98973,7 +99474,7 @@ module.exports = CircleToRectangle; */ var Rectangle = __webpack_require__(8); -var RectangleToRectangle = __webpack_require__(294); +var RectangleToRectangle = __webpack_require__(295); /** * [description] @@ -99006,7 +99507,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 668 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -99107,7 +99608,7 @@ module.exports = LineToRectangle; /***/ }), -/* 669 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99116,7 +99617,7 @@ module.exports = LineToRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PointToLine = __webpack_require__(296); +var PointToLine = __webpack_require__(297); /** * [description] @@ -99148,7 +99649,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 670 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99159,8 +99660,8 @@ module.exports = PointToLineSegment; var LineToLine = __webpack_require__(89); var Contains = __webpack_require__(33); -var ContainsArray = __webpack_require__(142); -var Decompose = __webpack_require__(297); +var ContainsArray = __webpack_require__(144); +var Decompose = __webpack_require__(298); /** * [description] @@ -99241,7 +99742,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 671 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -99281,7 +99782,7 @@ module.exports = RectangleToValues; /***/ }), -/* 672 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99290,7 +99791,7 @@ module.exports = RectangleToValues; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToCircle = __webpack_require__(295); +var LineToCircle = __webpack_require__(296); var Contains = __webpack_require__(53); /** @@ -99344,7 +99845,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 673 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99398,7 +99899,7 @@ module.exports = TriangleToLine; /***/ }), -/* 674 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99407,8 +99908,8 @@ module.exports = TriangleToLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ContainsArray = __webpack_require__(142); -var Decompose = __webpack_require__(298); +var ContainsArray = __webpack_require__(144); +var Decompose = __webpack_require__(299); var LineToLine = __webpack_require__(89); /** @@ -99486,7 +99987,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 675 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99495,39 +99996,39 @@ module.exports = TriangleToTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(299); +var Line = __webpack_require__(300); Line.Angle = __webpack_require__(54); -Line.BresenhamPoints = __webpack_require__(189); -Line.CenterOn = __webpack_require__(676); -Line.Clone = __webpack_require__(677); -Line.CopyFrom = __webpack_require__(678); -Line.Equals = __webpack_require__(679); -Line.GetMidPoint = __webpack_require__(680); -Line.GetNormal = __webpack_require__(681); -Line.GetPoint = __webpack_require__(300); +Line.BresenhamPoints = __webpack_require__(191); +Line.CenterOn = __webpack_require__(684); +Line.Clone = __webpack_require__(685); +Line.CopyFrom = __webpack_require__(686); +Line.Equals = __webpack_require__(687); +Line.GetMidPoint = __webpack_require__(688); +Line.GetNormal = __webpack_require__(689); +Line.GetPoint = __webpack_require__(301); Line.GetPoints = __webpack_require__(108); -Line.Height = __webpack_require__(682); +Line.Height = __webpack_require__(690); Line.Length = __webpack_require__(65); -Line.NormalAngle = __webpack_require__(301); -Line.NormalX = __webpack_require__(683); -Line.NormalY = __webpack_require__(684); -Line.Offset = __webpack_require__(685); -Line.PerpSlope = __webpack_require__(686); +Line.NormalAngle = __webpack_require__(302); +Line.NormalX = __webpack_require__(691); +Line.NormalY = __webpack_require__(692); +Line.Offset = __webpack_require__(693); +Line.PerpSlope = __webpack_require__(694); Line.Random = __webpack_require__(110); -Line.ReflectAngle = __webpack_require__(687); -Line.Rotate = __webpack_require__(688); -Line.RotateAroundPoint = __webpack_require__(689); -Line.RotateAroundXY = __webpack_require__(143); -Line.SetToAngle = __webpack_require__(690); -Line.Slope = __webpack_require__(691); -Line.Width = __webpack_require__(692); +Line.ReflectAngle = __webpack_require__(695); +Line.Rotate = __webpack_require__(696); +Line.RotateAroundPoint = __webpack_require__(697); +Line.RotateAroundXY = __webpack_require__(145); +Line.SetToAngle = __webpack_require__(698); +Line.Slope = __webpack_require__(699); +Line.Width = __webpack_require__(700); module.exports = Line; /***/ }), -/* 676 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -99567,7 +100068,7 @@ module.exports = CenterOn; /***/ }), -/* 677 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99576,7 +100077,7 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(299); +var Line = __webpack_require__(300); /** * [description] @@ -99597,7 +100098,7 @@ module.exports = Clone; /***/ }), -/* 678 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -99626,7 +100127,7 @@ module.exports = CopyFrom; /***/ }), -/* 679 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -99660,7 +100161,7 @@ module.exports = Equals; /***/ }), -/* 680 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99696,7 +100197,7 @@ module.exports = GetMidPoint; /***/ }), -/* 681 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99736,7 +100237,7 @@ module.exports = GetNormal; /***/ }), -/* 682 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -99764,7 +100265,7 @@ module.exports = Height; /***/ }), -/* 683 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99795,7 +100296,7 @@ module.exports = NormalX; /***/ }), -/* 684 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99826,7 +100327,7 @@ module.exports = NormalY; /***/ }), -/* 685 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -99862,7 +100363,7 @@ module.exports = Offset; /***/ }), -/* 686 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -99890,7 +100391,7 @@ module.exports = PerpSlope; /***/ }), -/* 687 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99900,7 +100401,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(54); -var NormalAngle = __webpack_require__(301); +var NormalAngle = __webpack_require__(302); /** * Returns the reflected angle between two lines. @@ -99926,7 +100427,7 @@ module.exports = ReflectAngle; /***/ }), -/* 688 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99935,7 +100436,7 @@ module.exports = ReflectAngle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(143); +var RotateAroundXY = __webpack_require__(145); /** * [description] @@ -99960,7 +100461,7 @@ module.exports = Rotate; /***/ }), -/* 689 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99969,7 +100470,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(143); +var RotateAroundXY = __webpack_require__(145); /** * [description] @@ -99992,7 +100493,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 690 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -100030,7 +100531,7 @@ module.exports = SetToAngle; /***/ }), -/* 691 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -100058,7 +100559,7 @@ module.exports = Slope; /***/ }), -/* 692 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -100086,7 +100587,7 @@ module.exports = Width; /***/ }), -/* 693 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100097,27 +100598,27 @@ module.exports = Width; var Point = __webpack_require__(5); -Point.Ceil = __webpack_require__(694); -Point.Clone = __webpack_require__(695); -Point.CopyFrom = __webpack_require__(696); -Point.Equals = __webpack_require__(697); -Point.Floor = __webpack_require__(698); -Point.GetCentroid = __webpack_require__(699); -Point.GetMagnitude = __webpack_require__(302); -Point.GetMagnitudeSq = __webpack_require__(303); -Point.GetRectangleFromPoints = __webpack_require__(700); -Point.Interpolate = __webpack_require__(701); -Point.Invert = __webpack_require__(702); -Point.Negative = __webpack_require__(703); -Point.Project = __webpack_require__(704); -Point.ProjectUnit = __webpack_require__(705); -Point.SetMagnitude = __webpack_require__(706); +Point.Ceil = __webpack_require__(702); +Point.Clone = __webpack_require__(703); +Point.CopyFrom = __webpack_require__(704); +Point.Equals = __webpack_require__(705); +Point.Floor = __webpack_require__(706); +Point.GetCentroid = __webpack_require__(707); +Point.GetMagnitude = __webpack_require__(303); +Point.GetMagnitudeSq = __webpack_require__(304); +Point.GetRectangleFromPoints = __webpack_require__(708); +Point.Interpolate = __webpack_require__(709); +Point.Invert = __webpack_require__(710); +Point.Negative = __webpack_require__(711); +Point.Project = __webpack_require__(712); +Point.ProjectUnit = __webpack_require__(713); +Point.SetMagnitude = __webpack_require__(714); module.exports = Point; /***/ }), -/* 694 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -100145,7 +100646,7 @@ module.exports = Ceil; /***/ }), -/* 695 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100175,7 +100676,7 @@ module.exports = Clone; /***/ }), -/* 696 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -100204,7 +100705,7 @@ module.exports = CopyFrom; /***/ }), -/* 697 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -100233,7 +100734,7 @@ module.exports = Equals; /***/ }), -/* 698 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -100261,7 +100762,7 @@ module.exports = Floor; /***/ }), -/* 699 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100322,7 +100823,7 @@ module.exports = GetCentroid; /***/ }), -/* 700 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100390,7 +100891,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 701 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100429,7 +100930,7 @@ module.exports = Interpolate; /***/ }), -/* 702 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -100457,7 +100958,7 @@ module.exports = Invert; /***/ }), -/* 703 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100490,7 +100991,7 @@ module.exports = Negative; /***/ }), -/* 704 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100500,7 +101001,7 @@ module.exports = Negative; */ var Point = __webpack_require__(5); -var GetMagnitudeSq = __webpack_require__(303); +var GetMagnitudeSq = __webpack_require__(304); /** * [description] @@ -100534,7 +101035,7 @@ module.exports = Project; /***/ }), -/* 705 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100576,7 +101077,7 @@ module.exports = ProjectUnit; /***/ }), -/* 706 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100585,7 +101086,7 @@ module.exports = ProjectUnit; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetMagnitude = __webpack_require__(302); +var GetMagnitude = __webpack_require__(303); /** * [description] @@ -100618,7 +101119,7 @@ module.exports = SetMagnitude; /***/ }), -/* 707 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100627,19 +101128,19 @@ module.exports = SetMagnitude; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(304); +var Polygon = __webpack_require__(305); -Polygon.Clone = __webpack_require__(708); -Polygon.Contains = __webpack_require__(144); -Polygon.ContainsPoint = __webpack_require__(709); -Polygon.GetAABB = __webpack_require__(710); -Polygon.GetNumberArray = __webpack_require__(711); +Polygon.Clone = __webpack_require__(716); +Polygon.Contains = __webpack_require__(146); +Polygon.ContainsPoint = __webpack_require__(717); +Polygon.GetAABB = __webpack_require__(718); +Polygon.GetNumberArray = __webpack_require__(719); module.exports = Polygon; /***/ }), -/* 708 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100648,7 +101149,7 @@ module.exports = Polygon; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(304); +var Polygon = __webpack_require__(305); /** * [description] @@ -100669,7 +101170,7 @@ module.exports = Clone; /***/ }), -/* 709 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100678,7 +101179,7 @@ module.exports = Clone; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(144); +var Contains = __webpack_require__(146); /** * [description] @@ -100700,7 +101201,7 @@ module.exports = ContainsPoint; /***/ }), -/* 710 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100754,7 +101255,7 @@ module.exports = GetAABB; /***/ }), -/* 711 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -100793,7 +101294,7 @@ module.exports = GetNumberArray; /***/ }), -/* 712 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -100821,7 +101322,7 @@ module.exports = Area; /***/ }), -/* 713 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -100852,7 +101353,7 @@ module.exports = Ceil; /***/ }), -/* 714 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -100885,7 +101386,7 @@ module.exports = CeilAll; /***/ }), -/* 715 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100915,7 +101416,7 @@ module.exports = Clone; /***/ }), -/* 716 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100946,7 +101447,7 @@ module.exports = ContainsPoint; /***/ }), -/* 717 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -100988,7 +101489,7 @@ module.exports = ContainsRect; /***/ }), -/* 718 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -101017,7 +101518,7 @@ module.exports = CopyFrom; /***/ }), -/* 719 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -101051,7 +101552,7 @@ module.exports = Equals; /***/ }), -/* 720 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101060,7 +101561,7 @@ module.exports = Equals; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(145); +var GetAspectRatio = __webpack_require__(147); // Fits the target rectangle into the source rectangle. // Preserves aspect ratio. @@ -101102,7 +101603,7 @@ module.exports = FitInside; /***/ }), -/* 721 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101111,7 +101612,7 @@ module.exports = FitInside; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(145); +var GetAspectRatio = __webpack_require__(147); // Fits the target rectangle around the source rectangle. // Preserves aspect ration. @@ -101153,7 +101654,7 @@ module.exports = FitOutside; /***/ }), -/* 722 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -101184,7 +101685,7 @@ module.exports = Floor; /***/ }), -/* 723 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -101217,7 +101718,7 @@ module.exports = FloorAll; /***/ }), -/* 724 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101255,7 +101756,7 @@ module.exports = GetCenter; /***/ }), -/* 725 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101294,7 +101795,7 @@ module.exports = GetSize; /***/ }), -/* 726 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101303,7 +101804,7 @@ module.exports = GetSize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(306); +var CenterOn = __webpack_require__(307); // Increases the size of the Rectangle object by the specified amounts. // The center point of the Rectangle object stays the same, and its size increases @@ -101335,7 +101836,7 @@ module.exports = Inflate; /***/ }), -/* 727 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -101385,7 +101886,7 @@ module.exports = MergePoints; /***/ }), -/* 728 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -101429,7 +101930,7 @@ module.exports = MergeRect; /***/ }), -/* 729 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -101471,7 +101972,7 @@ module.exports = MergeXY; /***/ }), -/* 730 */ +/* 738 */ /***/ (function(module, exports) { /** @@ -101504,7 +102005,7 @@ module.exports = Offset; /***/ }), -/* 731 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -101536,7 +102037,7 @@ module.exports = OffsetPoint; /***/ }), -/* 732 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -101570,7 +102071,7 @@ module.exports = Overlaps; /***/ }), -/* 733 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101625,7 +102126,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 734 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -101662,7 +102163,7 @@ module.exports = Scale; /***/ }), -/* 735 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101704,7 +102205,7 @@ module.exports = Union; /***/ }), -/* 736 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101715,36 +102216,36 @@ module.exports = Union; var Triangle = __webpack_require__(55); -Triangle.Area = __webpack_require__(737); -Triangle.BuildEquilateral = __webpack_require__(738); -Triangle.BuildFromPolygon = __webpack_require__(739); -Triangle.BuildRight = __webpack_require__(740); -Triangle.CenterOn = __webpack_require__(741); -Triangle.Centroid = __webpack_require__(309); -Triangle.CircumCenter = __webpack_require__(742); -Triangle.CircumCircle = __webpack_require__(743); -Triangle.Clone = __webpack_require__(744); +Triangle.Area = __webpack_require__(745); +Triangle.BuildEquilateral = __webpack_require__(746); +Triangle.BuildFromPolygon = __webpack_require__(747); +Triangle.BuildRight = __webpack_require__(748); +Triangle.CenterOn = __webpack_require__(749); +Triangle.Centroid = __webpack_require__(310); +Triangle.CircumCenter = __webpack_require__(750); +Triangle.CircumCircle = __webpack_require__(751); +Triangle.Clone = __webpack_require__(752); Triangle.Contains = __webpack_require__(53); -Triangle.ContainsArray = __webpack_require__(142); -Triangle.ContainsPoint = __webpack_require__(745); -Triangle.CopyFrom = __webpack_require__(746); -Triangle.Decompose = __webpack_require__(298); -Triangle.Equals = __webpack_require__(747); -Triangle.GetPoint = __webpack_require__(307); -Triangle.GetPoints = __webpack_require__(308); -Triangle.InCenter = __webpack_require__(311); -Triangle.Perimeter = __webpack_require__(748); -Triangle.Offset = __webpack_require__(310); +Triangle.ContainsArray = __webpack_require__(144); +Triangle.ContainsPoint = __webpack_require__(753); +Triangle.CopyFrom = __webpack_require__(754); +Triangle.Decompose = __webpack_require__(299); +Triangle.Equals = __webpack_require__(755); +Triangle.GetPoint = __webpack_require__(308); +Triangle.GetPoints = __webpack_require__(309); +Triangle.InCenter = __webpack_require__(312); +Triangle.Perimeter = __webpack_require__(756); +Triangle.Offset = __webpack_require__(311); Triangle.Random = __webpack_require__(111); -Triangle.Rotate = __webpack_require__(749); -Triangle.RotateAroundPoint = __webpack_require__(750); -Triangle.RotateAroundXY = __webpack_require__(146); +Triangle.Rotate = __webpack_require__(757); +Triangle.RotateAroundPoint = __webpack_require__(758); +Triangle.RotateAroundXY = __webpack_require__(148); module.exports = Triangle; /***/ }), -/* 737 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -101783,7 +102284,7 @@ module.exports = Area; /***/ }), -/* 738 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101833,7 +102334,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 739 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101842,7 +102343,7 @@ module.exports = BuildEquilateral; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EarCut = __webpack_require__(233); +var EarCut = __webpack_require__(235); var Triangle = __webpack_require__(55); /** @@ -101906,7 +102407,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 740 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101955,7 +102456,7 @@ module.exports = BuildRight; /***/ }), -/* 741 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101964,8 +102465,8 @@ module.exports = BuildRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Centroid = __webpack_require__(309); -var Offset = __webpack_require__(310); +var Centroid = __webpack_require__(310); +var Offset = __webpack_require__(311); /** * [description] @@ -101998,7 +102499,7 @@ module.exports = CenterOn; /***/ }), -/* 742 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -102066,7 +102567,7 @@ module.exports = CircumCenter; /***/ }), -/* 743 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102147,7 +102648,7 @@ module.exports = CircumCircle; /***/ }), -/* 744 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102177,7 +102678,7 @@ module.exports = Clone; /***/ }), -/* 745 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102208,7 +102709,7 @@ module.exports = ContainsPoint; /***/ }), -/* 746 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -102237,7 +102738,7 @@ module.exports = CopyFrom; /***/ }), -/* 747 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -102273,7 +102774,7 @@ module.exports = Equals; /***/ }), -/* 748 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102309,7 +102810,7 @@ module.exports = Perimeter; /***/ }), -/* 749 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102318,8 +102819,8 @@ module.exports = Perimeter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(146); -var InCenter = __webpack_require__(311); +var RotateAroundXY = __webpack_require__(148); +var InCenter = __webpack_require__(312); /** * [description] @@ -102343,7 +102844,7 @@ module.exports = Rotate; /***/ }), -/* 750 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102352,7 +102853,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(146); +var RotateAroundXY = __webpack_require__(148); /** * [description] @@ -102375,7 +102876,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 751 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102390,20 +102891,20 @@ module.exports = RotateAroundPoint; module.exports = { - Gamepad: __webpack_require__(752), - InputManager: __webpack_require__(237), - InputPlugin: __webpack_require__(757), - InteractiveObject: __webpack_require__(312), - Keyboard: __webpack_require__(758), - Mouse: __webpack_require__(763), - Pointer: __webpack_require__(246), - Touch: __webpack_require__(764) + Gamepad: __webpack_require__(760), + InputManager: __webpack_require__(239), + InputPlugin: __webpack_require__(765), + InteractiveObject: __webpack_require__(313), + Keyboard: __webpack_require__(766), + Mouse: __webpack_require__(771), + Pointer: __webpack_require__(248), + Touch: __webpack_require__(772) }; /***/ }), -/* 752 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102418,17 +102919,17 @@ module.exports = { module.exports = { - Axis: __webpack_require__(240), - Button: __webpack_require__(241), - Gamepad: __webpack_require__(239), - GamepadManager: __webpack_require__(238), + Axis: __webpack_require__(242), + Button: __webpack_require__(243), + Gamepad: __webpack_require__(241), + GamepadManager: __webpack_require__(240), - Configs: __webpack_require__(753) + Configs: __webpack_require__(761) }; /***/ }), -/* 753 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102443,15 +102944,15 @@ module.exports = { module.exports = { - DUALSHOCK_4: __webpack_require__(754), - SNES_USB: __webpack_require__(755), - XBOX_360: __webpack_require__(756) + DUALSHOCK_4: __webpack_require__(762), + SNES_USB: __webpack_require__(763), + XBOX_360: __webpack_require__(764) }; /***/ }), -/* 754 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -102502,7 +103003,7 @@ module.exports = { /***/ }), -/* 755 */ +/* 763 */ /***/ (function(module, exports) { /** @@ -102542,7 +103043,7 @@ module.exports = { /***/ }), -/* 756 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -102594,7 +103095,7 @@ module.exports = { /***/ }), -/* 757 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102609,9 +103110,9 @@ var Class = __webpack_require__(0); var DistanceBetween = __webpack_require__(41); var Ellipse = __webpack_require__(135); var EllipseContains = __webpack_require__(68); -var EventEmitter = __webpack_require__(13); -var InteractiveObject = __webpack_require__(312); -var PluginManager = __webpack_require__(11); +var EventEmitter = __webpack_require__(14); +var InteractiveObject = __webpack_require__(313); +var PluginManager = __webpack_require__(12); var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); var Triangle = __webpack_require__(55); @@ -104176,7 +104677,7 @@ module.exports = InputPlugin; /***/ }), -/* 758 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104191,23 +104692,23 @@ module.exports = InputPlugin; module.exports = { - KeyboardManager: __webpack_require__(242), + KeyboardManager: __webpack_require__(244), - Key: __webpack_require__(243), + Key: __webpack_require__(245), KeyCodes: __webpack_require__(128), - KeyCombo: __webpack_require__(244), + KeyCombo: __webpack_require__(246), - JustDown: __webpack_require__(759), - JustUp: __webpack_require__(760), - DownDuration: __webpack_require__(761), - UpDuration: __webpack_require__(762) + JustDown: __webpack_require__(767), + JustUp: __webpack_require__(768), + DownDuration: __webpack_require__(769), + UpDuration: __webpack_require__(770) }; /***/ }), -/* 759 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -104246,7 +104747,7 @@ module.exports = JustDown; /***/ }), -/* 760 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -104285,7 +104786,7 @@ module.exports = JustUp; /***/ }), -/* 761 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -104317,7 +104818,7 @@ module.exports = DownDuration; /***/ }), -/* 762 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -104349,7 +104850,7 @@ module.exports = UpDuration; /***/ }), -/* 763 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104365,14 +104866,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(245) + MouseManager: __webpack_require__(247) }; /* eslint-enable */ /***/ }), -/* 764 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104388,14 +104889,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(247) + TouchManager: __webpack_require__(249) }; /* eslint-enable */ /***/ }), -/* 765 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104410,21 +104911,21 @@ module.exports = { module.exports = { - FileTypes: __webpack_require__(766), + FileTypes: __webpack_require__(774), File: __webpack_require__(18), FileTypesManager: __webpack_require__(7), - GetURL: __webpack_require__(147), - LoaderPlugin: __webpack_require__(782), - MergeXHRSettings: __webpack_require__(148), - XHRLoader: __webpack_require__(313), + GetURL: __webpack_require__(149), + LoaderPlugin: __webpack_require__(790), + MergeXHRSettings: __webpack_require__(150), + XHRLoader: __webpack_require__(314), XHRSettings: __webpack_require__(90) }; /***/ }), -/* 766 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104462,33 +104963,33 @@ module.exports = { module.exports = { - AnimationJSONFile: __webpack_require__(767), - AtlasJSONFile: __webpack_require__(768), - AudioFile: __webpack_require__(314), - AudioSprite: __webpack_require__(769), - BinaryFile: __webpack_require__(770), - BitmapFontFile: __webpack_require__(771), - GLSLFile: __webpack_require__(772), - HTML5AudioFile: __webpack_require__(315), - HTMLFile: __webpack_require__(773), + AnimationJSONFile: __webpack_require__(775), + AtlasJSONFile: __webpack_require__(776), + AudioFile: __webpack_require__(315), + AudioSprite: __webpack_require__(777), + BinaryFile: __webpack_require__(778), + BitmapFontFile: __webpack_require__(779), + GLSLFile: __webpack_require__(780), + HTML5AudioFile: __webpack_require__(316), + HTMLFile: __webpack_require__(781), ImageFile: __webpack_require__(57), JSONFile: __webpack_require__(56), - MultiAtlas: __webpack_require__(774), - PluginFile: __webpack_require__(775), - ScriptFile: __webpack_require__(776), - SpriteSheetFile: __webpack_require__(777), - SVGFile: __webpack_require__(778), - TextFile: __webpack_require__(318), - TilemapCSVFile: __webpack_require__(779), - TilemapJSONFile: __webpack_require__(780), - UnityAtlasFile: __webpack_require__(781), - XMLFile: __webpack_require__(316) + MultiAtlas: __webpack_require__(782), + PluginFile: __webpack_require__(783), + ScriptFile: __webpack_require__(784), + SpriteSheetFile: __webpack_require__(785), + SVGFile: __webpack_require__(786), + TextFile: __webpack_require__(319), + TilemapCSVFile: __webpack_require__(787), + TilemapJSONFile: __webpack_require__(788), + UnityAtlasFile: __webpack_require__(789), + XMLFile: __webpack_require__(317) }; /***/ }), -/* 767 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104570,7 +105071,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 768 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104648,7 +105149,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 769 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104657,7 +105158,7 @@ module.exports = AtlasJSONFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(314); +var AudioFile = __webpack_require__(315); var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(56); @@ -104722,7 +105223,7 @@ FileTypesManager.register('audioSprite', function (key, urls, json, config, audi /***/ }), -/* 770 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104735,7 +105236,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -104828,7 +105329,7 @@ module.exports = BinaryFile; /***/ }), -/* 771 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104839,7 +105340,7 @@ module.exports = BinaryFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var XMLFile = __webpack_require__(316); +var XMLFile = __webpack_require__(317); /** * An Bitmap Font File. @@ -104906,7 +105407,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 772 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104919,7 +105420,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -105012,7 +105513,7 @@ module.exports = GLSLFile; /***/ }), -/* 773 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105025,7 +105526,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -105176,7 +105677,7 @@ module.exports = HTMLFile; /***/ }), -/* 774 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105188,7 +105689,7 @@ module.exports = HTMLFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); var JSONFile = __webpack_require__(56); -var NumberArray = __webpack_require__(317); +var NumberArray = __webpack_require__(318); /** * Adds a Multi File Texture Atlas to the current load queue. @@ -105265,7 +105766,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t /***/ }), -/* 775 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105278,8 +105779,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var PluginManager = __webpack_require__(11); +var GetFastValue = __webpack_require__(2); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -105381,7 +105882,7 @@ module.exports = PluginFile; /***/ }), -/* 776 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105394,7 +105895,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -105493,7 +105994,7 @@ module.exports = ScriptFile; /***/ }), -/* 777 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105537,7 +106038,7 @@ var SpriteSheetFile = function (key, url, config, path, xhrSettings) * The file is **not** loaded immediately after calling this method. * Instead, the file is added to a queue within the Loader, which is processed automatically when the Loader starts. * - * @method Phaser.Loader.LoaderPlugin#image + * @method Phaser.Loader.LoaderPlugin#spritesheet * @since 3.0.0 * * @param {string} key - [description] @@ -105570,7 +106071,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 778 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105583,7 +106084,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -105725,7 +106226,7 @@ module.exports = SVGFile; /***/ }), -/* 779 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105738,7 +106239,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(19); +var TILEMAP_FORMATS = __webpack_require__(20); /** * @classdesc @@ -105832,7 +106333,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 780 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105843,7 +106344,7 @@ module.exports = TilemapCSVFile; var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(56); -var TILEMAP_FORMATS = __webpack_require__(19); +var TILEMAP_FORMATS = __webpack_require__(20); /** * A Tilemap File. @@ -105947,7 +106448,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 781 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105958,7 +106459,7 @@ module.exports = TilemapJSONFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var TextFile = __webpack_require__(318); +var TextFile = __webpack_require__(319); /** * An Atlas JSON File. @@ -106026,7 +106527,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 782 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106038,11 +106539,11 @@ module.exports = UnityAtlasFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var CustomSet = __webpack_require__(61); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var ParseXMLBitmapFont = __webpack_require__(266); -var PluginManager = __webpack_require__(11); +var GetFastValue = __webpack_require__(2); +var ParseXMLBitmapFont = __webpack_require__(268); +var PluginManager = __webpack_require__(12); var XHRSettings = __webpack_require__(90); /** @@ -107008,7 +107509,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 783 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107027,58 +107528,58 @@ var Extend = __webpack_require__(23); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(784), - Distance: __webpack_require__(792), - Easing: __webpack_require__(795), - Fuzzy: __webpack_require__(796), - Interpolation: __webpack_require__(802), - Pow2: __webpack_require__(805), - Snap: __webpack_require__(807), + Angle: __webpack_require__(792), + Distance: __webpack_require__(800), + Easing: __webpack_require__(803), + Fuzzy: __webpack_require__(804), + Interpolation: __webpack_require__(810), + Pow2: __webpack_require__(813), + Snap: __webpack_require__(815), // Single functions - Average: __webpack_require__(811), - Bernstein: __webpack_require__(320), - Between: __webpack_require__(226), + Average: __webpack_require__(819), + Bernstein: __webpack_require__(321), + Between: __webpack_require__(228), CatmullRom: __webpack_require__(122), - CeilTo: __webpack_require__(812), + CeilTo: __webpack_require__(820), Clamp: __webpack_require__(60), DegToRad: __webpack_require__(35), - Difference: __webpack_require__(813), - Factorial: __webpack_require__(321), - FloatBetween: __webpack_require__(273), - FloorTo: __webpack_require__(814), + Difference: __webpack_require__(821), + Factorial: __webpack_require__(322), + FloatBetween: __webpack_require__(275), + FloorTo: __webpack_require__(822), FromPercent: __webpack_require__(64), - GetSpeed: __webpack_require__(815), - IsEven: __webpack_require__(816), - IsEvenStrict: __webpack_require__(817), - Linear: __webpack_require__(225), - MaxAdd: __webpack_require__(818), - MinSub: __webpack_require__(819), - Percent: __webpack_require__(820), - RadToDeg: __webpack_require__(216), - RandomXY: __webpack_require__(821), - RandomXYZ: __webpack_require__(204), - RandomXYZW: __webpack_require__(205), - Rotate: __webpack_require__(322), - RotateAround: __webpack_require__(183), + GetSpeed: __webpack_require__(823), + IsEven: __webpack_require__(824), + IsEvenStrict: __webpack_require__(825), + Linear: __webpack_require__(227), + MaxAdd: __webpack_require__(826), + MinSub: __webpack_require__(827), + Percent: __webpack_require__(828), + RadToDeg: __webpack_require__(218), + RandomXY: __webpack_require__(829), + RandomXYZ: __webpack_require__(206), + RandomXYZW: __webpack_require__(207), + Rotate: __webpack_require__(323), + RotateAround: __webpack_require__(185), RotateAroundDistance: __webpack_require__(112), - RoundAwayFromZero: __webpack_require__(323), - RoundTo: __webpack_require__(822), - SinCosTableGenerator: __webpack_require__(823), - SmootherStep: __webpack_require__(190), - SmoothStep: __webpack_require__(191), - TransformXY: __webpack_require__(248), - Within: __webpack_require__(824), + RoundAwayFromZero: __webpack_require__(324), + RoundTo: __webpack_require__(830), + SinCosTableGenerator: __webpack_require__(831), + SmootherStep: __webpack_require__(192), + SmoothStep: __webpack_require__(193), + TransformXY: __webpack_require__(250), + Within: __webpack_require__(832), Wrap: __webpack_require__(50), // Vector classes Vector2: __webpack_require__(6), Vector3: __webpack_require__(51), Vector4: __webpack_require__(119), - Matrix3: __webpack_require__(208), + Matrix3: __webpack_require__(210), Matrix4: __webpack_require__(118), - Quaternion: __webpack_require__(207), - RotateVec3: __webpack_require__(206) + Quaternion: __webpack_require__(209), + RotateVec3: __webpack_require__(208) }; @@ -107092,7 +107593,7 @@ module.exports = PhaserMath; /***/ }), -/* 784 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107107,22 +107608,22 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(785), - BetweenY: __webpack_require__(786), - BetweenPoints: __webpack_require__(787), - BetweenPointsY: __webpack_require__(788), - Reverse: __webpack_require__(789), - RotateTo: __webpack_require__(790), - ShortestBetween: __webpack_require__(791), - Normalize: __webpack_require__(319), - Wrap: __webpack_require__(160), - WrapDegrees: __webpack_require__(161) + Between: __webpack_require__(793), + BetweenY: __webpack_require__(794), + BetweenPoints: __webpack_require__(795), + BetweenPointsY: __webpack_require__(796), + Reverse: __webpack_require__(797), + RotateTo: __webpack_require__(798), + ShortestBetween: __webpack_require__(799), + Normalize: __webpack_require__(320), + Wrap: __webpack_require__(162), + WrapDegrees: __webpack_require__(163) }; /***/ }), -/* 785 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -107153,7 +107654,7 @@ module.exports = Between; /***/ }), -/* 786 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -107184,7 +107685,7 @@ module.exports = BetweenY; /***/ }), -/* 787 */ +/* 795 */ /***/ (function(module, exports) { /** @@ -107213,7 +107714,7 @@ module.exports = BetweenPoints; /***/ }), -/* 788 */ +/* 796 */ /***/ (function(module, exports) { /** @@ -107242,7 +107743,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 789 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107251,7 +107752,7 @@ module.exports = BetweenPointsY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Normalize = __webpack_require__(319); +var Normalize = __webpack_require__(320); /** * [description] @@ -107272,7 +107773,7 @@ module.exports = Reverse; /***/ }), -/* 790 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107339,7 +107840,7 @@ module.exports = RotateTo; /***/ }), -/* 791 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -107385,7 +107886,7 @@ module.exports = ShortestBetween; /***/ }), -/* 792 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107401,14 +107902,14 @@ module.exports = ShortestBetween; module.exports = { Between: __webpack_require__(41), - Power: __webpack_require__(793), - Squared: __webpack_require__(794) + Power: __webpack_require__(801), + Squared: __webpack_require__(802) }; /***/ }), -/* 793 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -107442,7 +107943,7 @@ module.exports = DistancePower; /***/ }), -/* 794 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -107476,7 +107977,7 @@ module.exports = DistanceSquared; /***/ }), -/* 795 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107491,24 +107992,24 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(274), - Bounce: __webpack_require__(275), - Circular: __webpack_require__(276), - Cubic: __webpack_require__(277), - Elastic: __webpack_require__(278), - Expo: __webpack_require__(279), - Linear: __webpack_require__(280), - Quadratic: __webpack_require__(281), - Quartic: __webpack_require__(282), - Quintic: __webpack_require__(283), - Sine: __webpack_require__(284), - Stepped: __webpack_require__(285) + Back: __webpack_require__(276), + Bounce: __webpack_require__(277), + Circular: __webpack_require__(278), + Cubic: __webpack_require__(279), + Elastic: __webpack_require__(280), + Expo: __webpack_require__(281), + Linear: __webpack_require__(282), + Quadratic: __webpack_require__(283), + Quartic: __webpack_require__(284), + Quintic: __webpack_require__(285), + Sine: __webpack_require__(286), + Stepped: __webpack_require__(287) }; /***/ }), -/* 796 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107523,17 +108024,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(797), - Equal: __webpack_require__(798), - Floor: __webpack_require__(799), - GreaterThan: __webpack_require__(800), - LessThan: __webpack_require__(801) + Ceil: __webpack_require__(805), + Equal: __webpack_require__(806), + Floor: __webpack_require__(807), + GreaterThan: __webpack_require__(808), + LessThan: __webpack_require__(809) }; /***/ }), -/* 797 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -107564,7 +108065,7 @@ module.exports = Ceil; /***/ }), -/* 798 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -107596,7 +108097,7 @@ module.exports = Equal; /***/ }), -/* 799 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -107627,7 +108128,7 @@ module.exports = Floor; /***/ }), -/* 800 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -107659,7 +108160,7 @@ module.exports = GreaterThan; /***/ }), -/* 801 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -107691,7 +108192,7 @@ module.exports = LessThan; /***/ }), -/* 802 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107706,16 +108207,16 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(803), - CatmullRom: __webpack_require__(804), - CubicBezier: __webpack_require__(214), - Linear: __webpack_require__(224) + Bezier: __webpack_require__(811), + CatmullRom: __webpack_require__(812), + CubicBezier: __webpack_require__(216), + Linear: __webpack_require__(226) }; /***/ }), -/* 803 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107724,7 +108225,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bernstein = __webpack_require__(320); +var Bernstein = __webpack_require__(321); /** * [description] @@ -107754,7 +108255,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 804 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107811,7 +108312,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 805 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107826,15 +108327,15 @@ module.exports = CatmullRomInterpolation; module.exports = { - GetNext: __webpack_require__(288), + GetNext: __webpack_require__(290), IsSize: __webpack_require__(125), - IsValue: __webpack_require__(806) + IsValue: __webpack_require__(814) }; /***/ }), -/* 806 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -107862,7 +108363,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 807 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107877,15 +108378,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(808), - Floor: __webpack_require__(809), - To: __webpack_require__(810) + Ceil: __webpack_require__(816), + Floor: __webpack_require__(817), + To: __webpack_require__(818) }; /***/ }), -/* 808 */ +/* 816 */ /***/ (function(module, exports) { /** @@ -107925,7 +108426,7 @@ module.exports = SnapCeil; /***/ }), -/* 809 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -107965,7 +108466,7 @@ module.exports = SnapFloor; /***/ }), -/* 810 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -108005,7 +108506,7 @@ module.exports = SnapTo; /***/ }), -/* 811 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -108040,7 +108541,7 @@ module.exports = Average; /***/ }), -/* 812 */ +/* 820 */ /***/ (function(module, exports) { /** @@ -108075,7 +108576,7 @@ module.exports = CeilTo; /***/ }), -/* 813 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -108104,7 +108605,7 @@ module.exports = Difference; /***/ }), -/* 814 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -108139,7 +108640,7 @@ module.exports = FloorTo; /***/ }), -/* 815 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -108168,7 +108669,7 @@ module.exports = GetSpeed; /***/ }), -/* 816 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -108199,7 +108700,7 @@ module.exports = IsEven; /***/ }), -/* 817 */ +/* 825 */ /***/ (function(module, exports) { /** @@ -108228,7 +108729,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 818 */ +/* 826 */ /***/ (function(module, exports) { /** @@ -108258,7 +108759,7 @@ module.exports = MaxAdd; /***/ }), -/* 819 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -108288,7 +108789,7 @@ module.exports = MinSub; /***/ }), -/* 820 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -108347,7 +108848,7 @@ module.exports = Percent; /***/ }), -/* 821 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -108383,7 +108884,7 @@ module.exports = RandomXY; /***/ }), -/* 822 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -108418,7 +108919,7 @@ module.exports = RoundTo; /***/ }), -/* 823 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -108472,7 +108973,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 824 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -108502,7 +109003,7 @@ module.exports = Within; /***/ }), -/* 825 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108517,22 +109018,22 @@ module.exports = Within; module.exports = { - ArcadePhysics: __webpack_require__(826), - Body: __webpack_require__(330), - Collider: __webpack_require__(331), - Factory: __webpack_require__(324), - Group: __webpack_require__(327), - Image: __webpack_require__(325), + ArcadePhysics: __webpack_require__(834), + Body: __webpack_require__(331), + Collider: __webpack_require__(332), + Factory: __webpack_require__(325), + Group: __webpack_require__(328), + Image: __webpack_require__(326), Sprite: __webpack_require__(91), - StaticBody: __webpack_require__(338), - StaticGroup: __webpack_require__(328), - World: __webpack_require__(329) + StaticBody: __webpack_require__(339), + StaticGroup: __webpack_require__(329), + World: __webpack_require__(330) }; /***/ }), -/* 826 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108542,11 +109043,11 @@ module.exports = { */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(324); -var GetFastValue = __webpack_require__(1); +var Factory = __webpack_require__(325); +var GetFastValue = __webpack_require__(2); var Merge = __webpack_require__(103); -var PluginManager = __webpack_require__(11); -var World = __webpack_require__(329); +var PluginManager = __webpack_require__(12); +var World = __webpack_require__(330); var DistanceBetween = __webpack_require__(41); var DegToRad = __webpack_require__(35); @@ -109003,7 +109504,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 827 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -109078,7 +109579,7 @@ module.exports = Acceleration; /***/ }), -/* 828 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -109152,7 +109653,7 @@ module.exports = Angular; /***/ }), -/* 829 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -109244,7 +109745,7 @@ module.exports = Bounce; /***/ }), -/* 830 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -109368,7 +109869,7 @@ module.exports = Debug; /***/ }), -/* 831 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -109443,7 +109944,7 @@ module.exports = Drag; /***/ }), -/* 832 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -109553,7 +110054,7 @@ module.exports = Enable; /***/ }), -/* 833 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -109628,7 +110129,7 @@ module.exports = Friction; /***/ }), -/* 834 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -109703,7 +110204,7 @@ module.exports = Gravity; /***/ }), -/* 835 */ +/* 843 */ /***/ (function(module, exports) { /** @@ -109745,7 +110246,7 @@ module.exports = Immovable; /***/ }), -/* 836 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -109785,7 +110286,7 @@ module.exports = Mass; /***/ }), -/* 837 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -109864,7 +110365,7 @@ module.exports = Size; /***/ }), -/* 838 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -109959,7 +110460,7 @@ module.exports = Velocity; /***/ }), -/* 839 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -110000,7 +110501,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 840 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110009,9 +110510,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileCheckX = __webpack_require__(841); -var TileCheckY = __webpack_require__(843); -var TileIntersectsBody = __webpack_require__(337); +var TileCheckX = __webpack_require__(849); +var TileCheckY = __webpack_require__(851); +var TileIntersectsBody = __webpack_require__(338); /** * The core separation function to separate a physics body and a tile. @@ -110113,7 +110614,7 @@ module.exports = SeparateTile; /***/ }), -/* 841 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110122,7 +110623,7 @@ module.exports = SeparateTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(842); +var ProcessTileSeparationX = __webpack_require__(850); /** * Check the body against the given tile on the X axis. @@ -110188,7 +110689,7 @@ module.exports = TileCheckX; /***/ }), -/* 842 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -110233,7 +110734,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 843 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110242,7 +110743,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(844); +var ProcessTileSeparationY = __webpack_require__(852); /** * Check the body against the given tile on the Y axis. @@ -110308,7 +110809,7 @@ module.exports = TileCheckY; /***/ }), -/* 844 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -110353,7 +110854,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 845 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110362,7 +110863,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapX = __webpack_require__(332); +var GetOverlapX = __webpack_require__(333); /** * [description] @@ -110440,7 +110941,7 @@ module.exports = SeparateX; /***/ }), -/* 846 */ +/* 854 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110449,7 +110950,7 @@ module.exports = SeparateX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapY = __webpack_require__(333); +var GetOverlapY = __webpack_require__(334); /** * [description] @@ -110527,16 +111028,16 @@ module.exports = SeparateY; /***/ }), -/* 847 */, -/* 848 */, -/* 849 */, -/* 850 */, -/* 851 */, -/* 852 */, -/* 853 */, -/* 854 */, /* 855 */, -/* 856 */ +/* 856 */, +/* 857 */, +/* 858 */, +/* 859 */, +/* 860 */, +/* 861 */, +/* 862 */, +/* 863 */, +/* 864 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110551,16 +111052,16 @@ module.exports = SeparateY; module.exports = { - SceneManager: __webpack_require__(249), - ScenePlugin: __webpack_require__(857), - Settings: __webpack_require__(252), + SceneManager: __webpack_require__(251), + ScenePlugin: __webpack_require__(865), + Settings: __webpack_require__(254), Systems: __webpack_require__(129) }; /***/ }), -/* 857 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110571,7 +111072,7 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(83); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -110666,7 +111167,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - start: function (key) + start: function (key, data) { if (key === undefined) { key = this.key; } @@ -110680,7 +111181,7 @@ var ScenePlugin = new Class({ else { this.manager.stop(this.key); - this.manager.start(key); + this.manager.start(key, data); } } @@ -110717,7 +111218,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - launch: function (key) + launch: function (key, data) { if (key && key !== this.key) { @@ -110727,7 +111228,7 @@ var ScenePlugin = new Class({ } else { - this.manager.start(key); + this.manager.start(key, data); } } @@ -111082,7 +111583,7 @@ module.exports = ScenePlugin; /***/ }), -/* 858 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111124,25 +111625,25 @@ module.exports = ScenePlugin; module.exports = { - SoundManagerCreator: __webpack_require__(253), + SoundManagerCreator: __webpack_require__(255), BaseSound: __webpack_require__(85), BaseSoundManager: __webpack_require__(84), - WebAudioSound: __webpack_require__(259), - WebAudioSoundManager: __webpack_require__(258), + WebAudioSound: __webpack_require__(261), + WebAudioSoundManager: __webpack_require__(260), - HTML5AudioSound: __webpack_require__(255), - HTML5AudioSoundManager: __webpack_require__(254), + HTML5AudioSound: __webpack_require__(257), + HTML5AudioSoundManager: __webpack_require__(256), - NoAudioSound: __webpack_require__(257), - NoAudioSoundManager: __webpack_require__(256) + NoAudioSound: __webpack_require__(259), + NoAudioSoundManager: __webpack_require__(258) }; /***/ }), -/* 859 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111159,15 +111660,15 @@ module.exports = { List: __webpack_require__(86), Map: __webpack_require__(113), - ProcessQueue: __webpack_require__(334), - RTree: __webpack_require__(335), + ProcessQueue: __webpack_require__(335), + RTree: __webpack_require__(336), Set: __webpack_require__(61) }; /***/ }), -/* 860 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111182,19 +111683,19 @@ module.exports = { module.exports = { - Parsers: __webpack_require__(261), + Parsers: __webpack_require__(263), - FilterMode: __webpack_require__(861), + FilterMode: __webpack_require__(869), Frame: __webpack_require__(130), - Texture: __webpack_require__(262), - TextureManager: __webpack_require__(260), - TextureSource: __webpack_require__(263) + Texture: __webpack_require__(264), + TextureManager: __webpack_require__(262), + TextureSource: __webpack_require__(265) }; /***/ }), -/* 861 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -111233,7 +111734,7 @@ module.exports = CONST; /***/ }), -/* 862 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111249,29 +111750,29 @@ module.exports = CONST; module.exports = { Components: __webpack_require__(96), - Parsers: __webpack_require__(892), + Parsers: __webpack_require__(900), - Formats: __webpack_require__(19), - ImageCollection: __webpack_require__(349), - ParseToTilemap: __webpack_require__(154), + Formats: __webpack_require__(20), + ImageCollection: __webpack_require__(350), + ParseToTilemap: __webpack_require__(156), Tile: __webpack_require__(44), - Tilemap: __webpack_require__(353), - TilemapCreator: __webpack_require__(909), - TilemapFactory: __webpack_require__(910), + Tilemap: __webpack_require__(354), + TilemapCreator: __webpack_require__(917), + TilemapFactory: __webpack_require__(918), Tileset: __webpack_require__(100), LayerData: __webpack_require__(75), MapData: __webpack_require__(76), - ObjectLayer: __webpack_require__(351), + ObjectLayer: __webpack_require__(352), - DynamicTilemapLayer: __webpack_require__(354), - StaticTilemapLayer: __webpack_require__(355) + DynamicTilemapLayer: __webpack_require__(355), + StaticTilemapLayer: __webpack_require__(356) }; /***/ }), -/* 863 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111336,7 +111837,7 @@ module.exports = Copy; /***/ }), -/* 864 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111348,7 +111849,7 @@ module.exports = Copy; var TileToWorldX = __webpack_require__(98); var TileToWorldY = __webpack_require__(99); var GetTilesWithin = __webpack_require__(15); -var ReplaceByIndex = __webpack_require__(342); +var ReplaceByIndex = __webpack_require__(343); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -111423,7 +111924,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 865 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -111491,7 +111992,7 @@ module.exports = CullTiles; /***/ }), -/* 866 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111545,7 +112046,7 @@ module.exports = Fill; /***/ }), -/* 867 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111594,7 +112095,7 @@ module.exports = FilterTiles; /***/ }), -/* 868 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -111681,7 +112182,7 @@ module.exports = FindByIndex; /***/ }), -/* 869 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111728,7 +112229,7 @@ module.exports = FindTile; /***/ }), -/* 870 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111772,7 +112273,7 @@ module.exports = ForEachTile; /***/ }), -/* 871 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111813,7 +112314,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 872 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111822,9 +112323,9 @@ module.exports = GetTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Geom = __webpack_require__(292); +var Geom = __webpack_require__(293); var GetTilesWithin = __webpack_require__(15); -var Intersects = __webpack_require__(293); +var Intersects = __webpack_require__(294); var NOOP = __webpack_require__(3); var TileToWorldX = __webpack_require__(98); var TileToWorldY = __webpack_require__(99); @@ -111912,7 +112413,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 873 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111964,7 +112465,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 874 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111973,7 +112474,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasTileAt = __webpack_require__(343); +var HasTileAt = __webpack_require__(344); var WorldToTileX = __webpack_require__(39); var WorldToTileY = __webpack_require__(40); @@ -112003,7 +112504,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 875 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112012,7 +112513,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PutTileAt = __webpack_require__(151); +var PutTileAt = __webpack_require__(153); var WorldToTileX = __webpack_require__(39); var WorldToTileY = __webpack_require__(40); @@ -112045,7 +112546,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 876 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112055,7 +112556,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(34); -var PutTileAt = __webpack_require__(151); +var PutTileAt = __webpack_require__(153); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -112109,7 +112610,7 @@ module.exports = PutTilesAt; /***/ }), -/* 877 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112166,7 +112667,7 @@ module.exports = Randomize; /***/ }), -/* 878 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112175,7 +112676,7 @@ module.exports = Randomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RemoveTileAt = __webpack_require__(344); +var RemoveTileAt = __webpack_require__(345); var WorldToTileX = __webpack_require__(39); var WorldToTileY = __webpack_require__(40); @@ -112208,7 +112709,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 879 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112218,7 +112719,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(15); -var Color = __webpack_require__(220); +var Color = __webpack_require__(222); /** * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to @@ -112293,7 +112794,7 @@ module.exports = RenderDebug; /***/ }), -/* 880 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112304,7 +112805,7 @@ module.exports = RenderDebug; var SetTileCollision = __webpack_require__(43); var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(154); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -112354,7 +112855,7 @@ module.exports = SetCollision; /***/ }), -/* 881 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112365,7 +112866,7 @@ module.exports = SetCollision; var SetTileCollision = __webpack_require__(43); var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(154); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -112420,7 +112921,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 882 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112431,7 +112932,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(43); var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(154); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -112475,7 +112976,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 883 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112549,7 +113050,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 884 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112607,7 +113108,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 885 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -112654,7 +113155,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 886 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112696,7 +113197,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 887 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112740,7 +113241,7 @@ module.exports = Shuffle; /***/ }), -/* 888 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112790,7 +113291,7 @@ module.exports = SwapByIndex; /***/ }), -/* 889 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112833,7 +113334,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 890 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112912,7 +113413,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 891 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112957,7 +113458,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 892 */ +/* 900 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112972,18 +113473,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(345), - Parse2DArray: __webpack_require__(153), - ParseCSV: __webpack_require__(346), + Parse: __webpack_require__(346), + Parse2DArray: __webpack_require__(155), + ParseCSV: __webpack_require__(347), - Impact: __webpack_require__(352), - Tiled: __webpack_require__(347) + Impact: __webpack_require__(353), + Tiled: __webpack_require__(348) }; /***/ }), -/* 893 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112992,10 +113493,10 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Base64Decode = __webpack_require__(894); -var GetFastValue = __webpack_require__(1); +var Base64Decode = __webpack_require__(902); +var GetFastValue = __webpack_require__(2); var LayerData = __webpack_require__(75); -var ParseGID = __webpack_require__(348); +var ParseGID = __webpack_require__(349); var Tile = __webpack_require__(44); /** @@ -113109,7 +113610,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 894 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -113152,7 +113653,7 @@ module.exports = Base64Decode; /***/ }), -/* 895 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113161,7 +113662,7 @@ module.exports = Base64Decode; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * [description] @@ -113204,7 +113705,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 896 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113214,8 +113715,8 @@ module.exports = ParseImageLayers; */ var Tileset = __webpack_require__(100); -var ImageCollection = __webpack_require__(349); -var ParseObject = __webpack_require__(350); +var ImageCollection = __webpack_require__(350); +var ParseObject = __webpack_require__(351); /** * Tilesets & Image Collections @@ -113309,7 +113810,7 @@ module.exports = ParseTilesets; /***/ }), -/* 897 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113352,7 +113853,7 @@ module.exports = Pick; /***/ }), -/* 898 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113361,9 +113862,9 @@ module.exports = Pick; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(350); -var ObjectLayer = __webpack_require__(351); +var GetFastValue = __webpack_require__(2); +var ParseObject = __webpack_require__(351); +var ObjectLayer = __webpack_require__(352); /** * [description] @@ -113411,7 +113912,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 899 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -113484,7 +113985,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 900 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113557,7 +114058,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 901 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113641,7 +114142,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 902 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113692,7 +114193,7 @@ module.exports = ParseTilesets; /***/ }), -/* 903 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113706,12 +114207,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(904); + renderWebGL = __webpack_require__(912); } if (true) { - renderCanvas = __webpack_require__(905); + renderCanvas = __webpack_require__(913); } module.exports = { @@ -113723,7 +114224,7 @@ module.exports = { /***/ }), -/* 904 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113732,7 +114233,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -113764,7 +114265,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 905 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113773,7 +114274,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -113856,7 +114357,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 906 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113870,12 +114371,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(907); + renderWebGL = __webpack_require__(915); } if (true) { - renderCanvas = __webpack_require__(908); + renderCanvas = __webpack_require__(916); } module.exports = { @@ -113887,7 +114388,7 @@ module.exports = { /***/ }), -/* 907 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113896,7 +114397,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -113928,7 +114429,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 908 */ +/* 916 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113937,7 +114438,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -114001,7 +114502,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 909 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114010,8 +114511,8 @@ module.exports = StaticTilemapLayerCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); -var ParseToTilemap = __webpack_require__(154); +var GameObjectCreator = __webpack_require__(13); +var ParseToTilemap = __webpack_require__(156); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -114061,7 +114562,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 910 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114071,7 +114572,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(9); -var ParseToTilemap = __webpack_require__(154); +var ParseToTilemap = __webpack_require__(156); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -114127,7 +114628,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 911 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114142,14 +114643,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(912), - TimerEvent: __webpack_require__(356) + Clock: __webpack_require__(920), + TimerEvent: __webpack_require__(357) }; /***/ }), -/* 912 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114159,8 +114660,8 @@ module.exports = { */ var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); -var TimerEvent = __webpack_require__(356); +var PluginManager = __webpack_require__(12); +var TimerEvent = __webpack_require__(357); /** * @classdesc @@ -114517,7 +115018,7 @@ module.exports = Clock; /***/ }), -/* 913 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114532,18 +115033,18 @@ module.exports = Clock; module.exports = { - Builders: __webpack_require__(914), + Builders: __webpack_require__(922), - TweenManager: __webpack_require__(916), - Tween: __webpack_require__(158), - TweenData: __webpack_require__(159), - Timeline: __webpack_require__(361) + TweenManager: __webpack_require__(924), + Tween: __webpack_require__(160), + TweenData: __webpack_require__(161), + Timeline: __webpack_require__(362) }; /***/ }), -/* 914 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114561,19 +115062,19 @@ module.exports = { GetBoolean: __webpack_require__(73), GetEaseFunction: __webpack_require__(71), GetNewValue: __webpack_require__(101), - GetProps: __webpack_require__(357), - GetTargets: __webpack_require__(155), - GetTweens: __webpack_require__(358), - GetValueOp: __webpack_require__(156), - NumberTweenBuilder: __webpack_require__(359), - TimelineBuilder: __webpack_require__(360), + GetProps: __webpack_require__(358), + GetTargets: __webpack_require__(157), + GetTweens: __webpack_require__(359), + GetValueOp: __webpack_require__(158), + NumberTweenBuilder: __webpack_require__(360), + TimelineBuilder: __webpack_require__(361), TweenBuilder: __webpack_require__(102) }; /***/ }), -/* 915 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -114645,7 +115146,7 @@ module.exports = [ /***/ }), -/* 916 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114655,9 +115156,9 @@ module.exports = [ */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(359); -var PluginManager = __webpack_require__(11); -var TimelineBuilder = __webpack_require__(360); +var NumberTweenBuilder = __webpack_require__(360); +var PluginManager = __webpack_require__(12); +var TimelineBuilder = __webpack_require__(361); var TWEEN_CONST = __webpack_require__(87); var TweenBuilder = __webpack_require__(102); @@ -115299,7 +115800,7 @@ module.exports = TweenManager; /***/ }), -/* 917 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115314,15 +115815,15 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(918), - Objects: __webpack_require__(922), - String: __webpack_require__(926) + Array: __webpack_require__(926), + Objects: __webpack_require__(930), + String: __webpack_require__(934) }; /***/ }), -/* 918 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115337,23 +115838,23 @@ module.exports = { module.exports = { - FindClosestInSorted: __webpack_require__(919), + FindClosestInSorted: __webpack_require__(927), GetRandomElement: __webpack_require__(138), - NumberArray: __webpack_require__(317), - NumberArrayStep: __webpack_require__(920), - QuickSelect: __webpack_require__(336), - Range: __webpack_require__(272), - RemoveRandomElement: __webpack_require__(921), - RotateLeft: __webpack_require__(187), - RotateRight: __webpack_require__(188), + NumberArray: __webpack_require__(318), + NumberArrayStep: __webpack_require__(928), + QuickSelect: __webpack_require__(337), + Range: __webpack_require__(274), + RemoveRandomElement: __webpack_require__(929), + RotateLeft: __webpack_require__(189), + RotateRight: __webpack_require__(190), Shuffle: __webpack_require__(80), - SpliceOne: __webpack_require__(362) + SpliceOne: __webpack_require__(363) }; /***/ }), -/* 919 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -115401,7 +115902,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 920 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115410,7 +115911,7 @@ module.exports = FindClosestInSorted; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(323); +var RoundAwayFromZero = __webpack_require__(324); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -115478,7 +115979,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 921 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115487,7 +115988,7 @@ module.exports = NumberArrayStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SpliceOne = __webpack_require__(362); +var SpliceOne = __webpack_require__(363); /** * Removes a random object from the given array and returns it. @@ -115516,7 +116017,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 922 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115534,21 +116035,21 @@ module.exports = { Clone: __webpack_require__(52), Extend: __webpack_require__(23), GetAdvancedValue: __webpack_require__(10), - GetFastValue: __webpack_require__(1), - GetMinMaxValue: __webpack_require__(923), + GetFastValue: __webpack_require__(2), + GetMinMaxValue: __webpack_require__(931), GetValue: __webpack_require__(4), - HasAll: __webpack_require__(924), - HasAny: __webpack_require__(286), + HasAll: __webpack_require__(932), + HasAny: __webpack_require__(288), HasValue: __webpack_require__(72), - IsPlainObject: __webpack_require__(165), + IsPlainObject: __webpack_require__(167), Merge: __webpack_require__(103), - MergeRight: __webpack_require__(925) + MergeRight: __webpack_require__(933) }; /***/ }), -/* 923 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115587,7 +116088,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 924 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -115624,7 +116125,7 @@ module.exports = HasAll; /***/ }), -/* 925 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115667,7 +116168,7 @@ module.exports = MergeRight; /***/ }), -/* 926 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115682,16 +116183,16 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(927), - Pad: __webpack_require__(195), - Reverse: __webpack_require__(928), - UppercaseFirst: __webpack_require__(251) + Format: __webpack_require__(935), + Pad: __webpack_require__(197), + Reverse: __webpack_require__(936), + UppercaseFirst: __webpack_require__(253) }; /***/ }), -/* 927 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -115728,7 +116229,7 @@ module.exports = Format; /***/ }), -/* 928 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -115757,14 +116258,6 @@ module.exports = ReverseString; /***/ }), -/* 929 */, -/* 930 */, -/* 931 */, -/* 932 */, -/* 933 */, -/* 934 */, -/* 935 */, -/* 936 */, /* 937 */, /* 938 */, /* 939 */, @@ -115817,7 +116310,15 @@ module.exports = ReverseString; /* 986 */, /* 987 */, /* 988 */, -/* 989 */ +/* 989 */, +/* 990 */, +/* 991 */, +/* 992 */, +/* 993 */, +/* 994 */, +/* 995 */, +/* 996 */, +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -115826,7 +116327,7 @@ module.exports = ReverseString; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(365); +__webpack_require__(366); var CONST = __webpack_require__(22); var Extend = __webpack_require__(23); @@ -115837,35 +116338,35 @@ var Extend = __webpack_require__(23); var Phaser = { - Actions: __webpack_require__(166), - Animation: __webpack_require__(436), - Cache: __webpack_require__(437), - Cameras: __webpack_require__(438), + Actions: __webpack_require__(168), + Animation: __webpack_require__(438), + Cache: __webpack_require__(439), + Cameras: __webpack_require__(440), Class: __webpack_require__(0), - Create: __webpack_require__(449), - Curves: __webpack_require__(455), - Data: __webpack_require__(458), - Display: __webpack_require__(460), - DOM: __webpack_require__(493), - EventEmitter: __webpack_require__(495), - Game: __webpack_require__(496), - GameObjects: __webpack_require__(541), - Geom: __webpack_require__(292), - Input: __webpack_require__(751), - Loader: __webpack_require__(765), - Math: __webpack_require__(783), + Create: __webpack_require__(451), + Curves: __webpack_require__(457), + Data: __webpack_require__(460), + Display: __webpack_require__(462), + DOM: __webpack_require__(495), + EventEmitter: __webpack_require__(497), + Game: __webpack_require__(498), + GameObjects: __webpack_require__(543), + Geom: __webpack_require__(293), + Input: __webpack_require__(759), + Loader: __webpack_require__(773), + Math: __webpack_require__(791), Physics: { - Arcade: __webpack_require__(825) + Arcade: __webpack_require__(833) }, - Scene: __webpack_require__(250), - Scenes: __webpack_require__(856), - Sound: __webpack_require__(858), - Structs: __webpack_require__(859), - Textures: __webpack_require__(860), - Tilemaps: __webpack_require__(862), - Time: __webpack_require__(911), - Tweens: __webpack_require__(913), - Utils: __webpack_require__(917) + Scene: __webpack_require__(252), + Scenes: __webpack_require__(864), + Sound: __webpack_require__(866), + Structs: __webpack_require__(867), + Textures: __webpack_require__(868), + Tilemaps: __webpack_require__(870), + Time: __webpack_require__(919), + Tweens: __webpack_require__(921), + Utils: __webpack_require__(925) }; @@ -115885,7 +116386,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(166))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index ade636b0f..5fedfc630 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()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=989)}([function(t,e){function i(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){var o=(l=e,c=r,f=void 0,p=void 0,p=(d=i)?l[c]:Object.getOwnPropertyDescriptor(l,c),!d&&p.value&&"object"==typeof p.value&&(p=p.value),!!(p&&(f=p,f.get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===p.enumerable&&(p.enumerable=!0),void 0===p.configurable&&(p.configurable=!0),p));if(!1!==o){if(a=(n||t).prototype,h=r,u=void 0,(u=Object.getOwnPropertyDescriptor(a,h))&&(u.value&&"object"==typeof u.value&&(u=u.value),!1===u.configurable)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var a,h,u,l,c,d,f,p}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(182),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,u=null,l=null,c=s(t,e,i,r,null,o),d=0;d>>0},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;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],u=s[4],l=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+y)*w,this.y=(e*o+i*l+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,v=(d*c-l*f)*g,y=(u*f-l*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(121),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(494))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),u=i(37),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(37),o=i(6),a=i(119),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(647),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},,,,,function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(34),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(97),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(343),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(344),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(342),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(98),TileToWorldXY:i(889),TileToWorldY:i(99),WeightedRandomize:i(890),WorldToTileX:i(39),WorldToTileXY:i(891),WorldToTileY:i(40)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||b-y||S>-m||A-y||T>-m||b-y||S>-m||A-v&&S*n+C*r+h>-y&&(S+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],u=n[4],l=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*l-a*u)*c,y=(r*u-s*l)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,b=this.scrollX,T=this.scrollY,A=t+(b*m-T*x)*w,S=e+(b*x+T*m)*w;return i.x=A*d+S*p+v,i.y=A*f+S*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;el&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom,this.roundPixels&&(this._shakeOffsetX|=0,this._shakeOffsetY|=0))}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=u},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(118),r=i(204),o=i(205),a=i(206),h=i(61),u=i(81),l=i(6),c=i(51),d=i(119),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(83),r=i(527),o=i(528),a=i(231),h=i(252),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(544),h=i(545),u=i(546),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(549),s=i(552),r=i(0),o=i(12),a=i(130),h=i(2),u=i(86),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=l},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(553),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(114),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),u=i(4),l=i(16),c=i(565),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(570),a=i(86),h=i(571),u=i(610),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;su){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var y=l[c].length?c:c+1,m=l.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h]+" ")}r0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(u[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(u[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&l(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(619),u=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,u){var l=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=l,this.setTexture(h,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=l*l+c*c,g=l*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,w=t.y1,b=0;b=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-180,180)}},,,function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(375),Call:i(376),GetFirst:i(377),GridAlign:i(378),IncAlpha:i(395),IncX:i(396),IncXY:i(397),IncY:i(398),PlaceOnCircle:i(399),PlaceOnEllipse:i(400),PlaceOnLine:i(401),PlaceOnRectangle:i(402),PlaceOnTriangle:i(403),PlayAnimation:i(404),RandomCircle:i(405),RandomEllipse:i(406),RandomLine:i(407),RandomRectangle:i(408),RandomTriangle:i(409),Rotate:i(410),RotateAround:i(411),RotateAroundDistance:i(412),ScaleX:i(413),ScaleXY:i(414),ScaleY:i(415),SetAlpha:i(416),SetBlendMode:i(417),SetDepth:i(418),SetHitArea:i(419),SetOrigin:i(420),SetRotation:i(421),SetScale:i(422),SetScaleX:i(423),SetScaleY:i(424),SetTint:i(425),SetVisible:i(426),SetX:i(427),SetXY:i(428),SetY:i(429),ShiftPosition:i(430),Shuffle:i(431),SmootherStep:i(432),SmoothStep:i(433),Spread:i(434),ToggleVisible:i(435)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(46),r=i(25),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(46),r=i(49);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(47),s=i(48);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(49),s=i(26),r=i(48),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(28),r=i(48),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(30),r=i(47),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=u),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=u[0],u[0].prevFrame=o;var v=1/(u.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(113),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(118),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*u,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*u,e[5]=g*s+v*a+y*l,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*u,e[8]=m*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=u+v,y[6]=l-g,y[1]=u-v,y[4]=1-(h+f),y[7]=d+p,y[2]=l+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,A=s*l-o*h,S=r*l-o*u,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,L=d*m-p*v,P=f*m-p*y,F=x*P-w*L+b*_+T*E-A*M+S*C;return F?(F=1/F,i[0]=(h*P-u*L+l*_)*F,i[1]=(u*E-a*P-l*M)*F,i[2]=(a*L-h*E+l*C)*F,i[3]=(r*L-s*P-o*_)*F,i[4]=(n*P-r*E+o*M)*F,i[5]=(s*E-n*L-o*C)*F,i[6]=(v*S-y*A+m*T)*F,i[7]=(y*b-g*S-m*w)*F,i[8]=(g*A-v*b+m*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(484)(t))},function(t,e,i){var n=i(116);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u={r:i=Math.floor(i*=255),g:i,b:i,color:0},l=s%6;return 0===l?(u.g=h,u.b=o):1===l?(u.r=a,u.b=o):2===l?(u.r=o,u.b=h):3===l?(u.r=o,u.g=a):4===l?(u.r=h,u.g=o):5===l&&(u.g=o,u.b=a),u.color=n(u.r,u.g,u.b),u}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===S(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h,u,l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&(u=c,(h=l).next.i!==u.i&&h.prev.i!==u.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,u)&&x(h,u)&&x(u,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,u))){var d=w(l,c);return l=r(l,l.next),d=r(d,d.next),o(l,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=l&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function w(t,e){var i=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),u=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(512),r=i(236),o=new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,o=t.lights.cull(e),a=Math.min(o.length,10),h=e.matrix,u={x:0,y:0},l=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(a<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setTexture2D(s.source.glTexture,0),n.setPipeline(this),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,a=(o.config.resolution,this.maxQuads),h=e.scrollX,u=e.scrollY,l=e.matrix.matrix,c=l[0],d=l[1],f=l[2],p=l[3],g=l[4],v=l[5],y=Math.sin,m=Math.cos,x=this.vertexComponentCount,w=this.vertexCapacity,b=t.defaultFrame.source.glTexture;this.setTexture2D(b,0);for(var T=0;T=w&&(this.flush(),this.setTexture2D(b,0));for(var P=0;P=w&&(this.flush(),this.setTexture2D(b,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=(this.renderer.config.resolution,t.getRenderList()),o=r.length,h=e.matrix.matrix,u=h[0],l=h[1],c=h[2],d=h[3],f=h[4],p=h[5],g=e.scrollX*t.scrollFactorX,v=e.scrollY*t.scrollFactorY,y=Math.ceil(o/this.maxQuads),m=0,x=t.x-g,w=t.y-v,b=0;b=this.vertexCapacity&&this.flush()}m+=T,o-=T,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=(this.renderer.config.resolution,e.matrix.matrix),h=t.frame,u=h.texture.source[h.sourceIndex].glTexture,l=!!u.isRenderTexture,c=t.flipX,d=t.flipY^l,f=h.uvs,p=h.width*(c?-1:1),g=h.height*(d?-1:1),v=-t.displayOriginX+h.x+h.width*(c?1:0),y=-t.displayOriginY+h.y+h.height*(d?1:0),m=v+p,x=y+g,w=t.x-e.scrollX*t.scrollFactorX,b=t.y-e.scrollY*t.scrollFactorY,T=t.scaleX,A=t.scaleY,S=-t.rotation,C=t._alphaTL,M=t._alphaTR,E=t._alphaBL,_=t._alphaBR,L=t._tintTL,P=t._tintTR,F=t._tintBL,k=t._tintBR,R=Math.sin(S),O=Math.cos(S),D=O*T,I=-R*T,B=R*A,Y=O*A,X=w,z=b,N=o[0],W=o[1],G=o[2],U=o[3],V=D*N+I*G,H=D*W+I*U,j=B*N+Y*G,q=B*W+Y*U,K=X*N+z*G+o[4],J=X*W+z*U+o[5],Z=v*V+y*j+K,Q=v*H+y*q+J,$=v*V+x*j+K,tt=v*H+x*q+J,et=m*V+x*j+K,it=m*H+x*q+J,nt=m*V+y*j+K,st=m*H+y*q+J,rt=n(L,C),ot=n(P,M),at=n(F,E),ht=n(k,_);this.setTexture2D(u,0),s[(i=this.vertexCount*this.vertexComponentCount)+0]=Z,s[i+1]=Q,s[i+2]=f.x0,s[i+3]=f.y0,r[i+4]=rt,s[i+5]=$,s[i+6]=tt,s[i+7]=f.x1,s[i+8]=f.y1,r[i+9]=at,s[i+10]=et,s[i+11]=it,s[i+12]=f.x2,s[i+13]=f.y2,r[i+14]=ht,s[i+15]=Z,s[i+16]=Q,s[i+17]=f.x0,s[i+18]=f.y0,r[i+19]=rt,s[i+20]=et,s[i+21]=it,s[i+22]=f.x2,s[i+23]=f.y2,r[i+24]=ht,s[i+25]=nt,s[i+26]=st,s[i+27]=f.x3,s[i+28]=f.y3,r[i+29]=ot,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,u=t.alphas,l=this.vertexViewF32,c=this.vertexViewU32,d=(this.renderer.config.resolution,e.matrix.matrix),f=t.frame,p=t.texture.source[f.sourceIndex].glTexture,g=t.x-e.scrollX*t.scrollFactorX,v=t.y-e.scrollY*t.scrollFactorY,y=t.scaleX,m=t.scaleY,x=-t.rotation,w=Math.sin(x),b=Math.cos(x),T=b*y,A=-w*y,S=w*m,C=b*m,M=g,E=v,_=d[0],L=d[1],P=d[2],F=d[3],k=T*_+A*P,R=T*L+A*F,O=S*_+C*P,D=S*L+C*F,I=M*_+E*P+d[4],B=M*L+E*F+d[5],Y=0;this.setTexture2D(p,0),Y=this.vertexCount*this.vertexComponentCount;for(var X=0,z=0;Xthis.vertexCapacity&&this.flush();var i,n,s,r,o,h,u,l,c=t.text,d=c.length,f=a.getTintAppendFloatAlpha,p=this.vertexViewF32,g=this.vertexViewU32,v=(this.renderer.config.resolution,e.matrix.matrix),y=e.width+50,m=e.height+50,x=t.frame,w=t.texture.source[x.sourceIndex],b=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,A=t.fontData,S=A.lineHeight,C=t.fontSize/A.size,M=A.chars,E=t.alpha,_=f(t._tintTL,E),L=f(t._tintTR,E),P=f(t._tintBL,E),F=f(t._tintBR,E),k=t.x,R=t.y,O=x.cutX,D=x.cutY,I=w.width,B=w.height,Y=w.glTexture,X=0,z=0,N=0,W=0,G=null,U=0,V=0,H=0,j=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=null,nt=0,st=k-b+x.x,rt=R-T+x.y,ot=-t.rotation,at=t.scaleX,ht=t.scaleY,ut=Math.sin(ot),lt=Math.cos(ot),ct=lt*at,dt=-ut*at,ft=ut*ht,pt=lt*ht,gt=st,vt=rt,yt=v[0],mt=v[1],xt=v[2],wt=v[3],bt=ct*yt+dt*xt,Tt=ct*mt+dt*wt,At=ft*yt+pt*xt,St=ft*mt+pt*wt,Ct=gt*yt+vt*xt+v[4],Mt=gt*mt+vt*wt+v[5],Et=0;this.setTexture2D(Y,0);for(var _t=0;_ty||n<-50||n>m)&&(s<-50||s>y||r<-50||r>m)&&(o<-50||o>y||h<-50||h>m)&&(u<-50||u>y||l<-50||l>m)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),p[(Et=this.vertexCount*this.vertexComponentCount)+0]=i,p[Et+1]=n,p[Et+2]=Q,p[Et+3]=tt,g[Et+4]=_,p[Et+5]=s,p[Et+6]=r,p[Et+7]=Q,p[Et+8]=et,g[Et+9]=P,p[Et+10]=o,p[Et+11]=h,p[Et+12]=$,p[Et+13]=et,g[Et+14]=F,p[Et+15]=i,p[Et+16]=n,p[Et+17]=Q,p[Et+18]=tt,g[Et+19]=_,p[Et+20]=o,p[Et+21]=h,p[Et+22]=$,p[Et+23]=et,g[Et+24]=F,p[Et+25]=u,p[Et+26]=l,p[Et+27]=$,p[Et+28]=tt,g[Et+29]=L,this.vertexCount+=6))}}else X=0,N=0,z+=S,it=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,u,l,c,d,f,p,g,v,y=t.displayCallback,m=t.text,x=m.length,w=a.getTintAppendFloatAlpha,b=this.vertexViewF32,T=this.vertexViewU32,A=this.renderer,S=(A.config.resolution,e.matrix.matrix),C=t.frame,M=t.texture.source[C.sourceIndex],E=e.scrollX*t.scrollFactorX,_=e.scrollY*t.scrollFactorY,L=t.scrollX,P=t.scrollY,F=t.fontData,k=F.lineHeight,R=t.fontSize/F.size,O=F.chars,D=t.alpha,I=w(t._tintTL,D),B=w(t._tintTR,D),Y=w(t._tintBL,D),X=w(t._tintBR,D),z=t.x,N=t.y,W=C.cutX,G=C.cutY,U=M.width,V=M.height,H=M.glTexture,j=0,q=0,K=0,J=0,Z=null,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,ut=0,lt=null,ct=0,dt=z+C.x,ft=N+C.y,pt=-t.rotation,gt=t.scaleX,vt=t.scaleY,yt=Math.sin(pt),mt=Math.cos(pt),xt=mt*gt,wt=-yt*gt,bt=yt*vt,Tt=mt*vt,At=dt,St=ft,Ct=S[0],Mt=S[1],Et=S[2],_t=S[3],Lt=xt*Ct+wt*Et,Pt=xt*Mt+wt*_t,Ft=bt*Ct+Tt*Et,kt=bt*Mt+Tt*_t,Rt=At*Ct+St*Et+S[4],Ot=At*Mt+St*_t+S[5],Dt=t.cropWidth>0||t.cropHeight>0,It=0;this.setTexture2D(H,0),Dt&&A.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Bt=0;Btthis.vertexCapacity&&this.flush(),b[(It=this.vertexCount*this.vertexComponentCount)+0]=i,b[It+1]=n,b[It+2]=ot,b[It+3]=ht,T[It+4]=I,b[It+5]=s,b[It+6]=r,b[It+7]=ot,b[It+8]=ut,T[It+9]=Y,b[It+10]=o,b[It+11]=h,b[It+12]=at,b[It+13]=ut,T[It+14]=X,b[It+15]=i,b[It+16]=n,b[It+17]=ot,b[It+18]=ht,T[It+19]=I,b[It+20]=o,b[It+21]=h,b[It+22]=at,b[It+23]=ut,T[It+24]=X,b[It+25]=u,b[It+26]=l,b[It+27]=at,b[It+28]=ht,T[It+29]=B,this.vertexCount+=6}}}else j=0,K=0,q+=k,lt=null;Dt&&A.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,u=t.alpha,l=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,l=-l;var _,L=this.vertexViewF32,P=this.vertexViewU32,F=(this.renderer.config.resolution,E.matrix.matrix),k=o*(c?1:0)-g,R=a*(d?1:0)-v,O=k+o*(c?-1:1),D=R+a*(d?-1:1),I=s-E.scrollX*f,B=r-E.scrollY*p,Y=Math.sin(l),X=Math.cos(l),z=X*h,N=-Y*h,W=Y*u,G=X*u,U=I,V=B,H=F[0],j=F[1],q=F[2],K=F[3],J=z*H+N*q,Z=z*j+N*K,Q=W*H+G*q,$=W*j+G*K,tt=U*H+V*q+F[4],et=U*j+V*K+F[5],it=k*J+R*Q+tt,nt=k*Z+R*$+et,st=k*J+D*Q+tt,rt=k*Z+D*$+et,ot=O*J+D*Q+tt,at=O*Z+D*$+et,ht=O*J+R*Q+tt,ut=O*Z+R*$+et,lt=y/i+C,ct=m/n+M,dt=(y+x)/i+C,ft=(m+w)/n+M;this.setTexture2D(e,0),L[(_=this.vertexCount*this.vertexComponentCount)+0]=it,L[_+1]=nt,L[_+2]=lt,L[_+3]=ct,P[_+4]=b,L[_+5]=st,L[_+6]=rt,L[_+7]=lt,L[_+8]=ft,P[_+9]=T,L[_+10]=ot,L[_+11]=at,L[_+12]=dt,L[_+13]=ft,P[_+14]=A,L[_+15]=it,L[_+16]=nt,L[_+17]=lt,L[_+18]=ct,P[_+19]=b,L[_+20]=ot,L[_+21]=at,L[_+22]=dt,L[_+23]=ft,P[_+24]=A,L[_+25]=ht,L[_+26]=ut,L[_+27]=dt,L[_+28]=ct,P[_+29]=S,this.vertexCount+=6},batchGraphics:function(){}});t.exports=u},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),u=i(8),l=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=0;l0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(524),u=i(525),l=i(526),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(83),s=i(4),r=i(529),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(84),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(84),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(84),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context?this.context.suspend():this.context.close(),this.context=null,s.prototype.destroy.call(this)}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var A=y+g-s,S=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,l=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,w=0,b=1,T=0,A=0,S=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(l-h,c-u),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,A=(65280&x)>>>8,S=255&x,v.strokeStyle="rgba("+T+","+A+","+S+","+y+")",v.lineWidth=b,C+=3;break;case n.FILL_STYLE:w=g[C+1],m=g[C+2],T=(16711680&w)>>>16,A=(65280&w)>>>8,S=255&w,v.fillStyle="rgba("+T+","+A+","+S+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(42),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},u=t.matrix,l=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(655),Ellipse:i(267),Intersects:i(293),Line:i(675),Point:i(693),Polygon:i(707),Rectangle:i(305),Triangle:i(736)}},function(t,e,i){t.exports={CircleToCircle:i(665),CircleToRectangle:i(666),GetRectangleIntersection:i(667),LineToCircle:i(295),LineToLine:i(89),LineToRectangle:i(668),PointToLine:i(296),PointToLineSegment:i(669),RectangleToRectangle:i(294),RectangleToTriangle:i(670),RectangleToValues:i(671),TriangleToCircle:i(672),TriangleToLine:i(673),TriangleToTriangle:i(674)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=r*r+o*o,l=r,c=o;if(u>0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(50),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),d=u+l+c;e||(e=d/i);for(var f=0;fu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return null;var l=u.findAudioURL(r,i);return l?!a.webAudio||o&&o.disableWebAudio?new h(e,l,t.path,n,r.sound.locked):new u(e,l,t.path,s,r.sound.context):null},o.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(91),r=i(0),o=i(58),a=i(327),h=i(328),u=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=u},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(827),Angular:i(828),Bounce:i(829),Debug:i(830),Drag:i(831),Enable:i(832),Friction:i(833),Gravity:i(834),Immovable:i(835),Mass:i(836),Size:i(837),Velocity:i(838)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(d.x,d.y,u.right,u.y)-d.radius):d.y>u.bottom&&(d.xu.right&&(a=h(d.x,d.y,u.right,u.bottom)-d.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*Math.cos(o),b=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),A=((g-m)*x+2*m*b)/(g+m),S=(2*g*x+(m-g)*b)/(g+m);return t.immovable||(t.velocity.x=(A*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+A*Math.sin(o))*t.bounce.y,f=t.velocity.x,p=t.velocity.y),e.immovable||(e.velocity.x=(S*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+S*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,u+=d}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,g=e.getTilesWithinWorldXY(a,h,u,l);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,u,l,d,f,p,g,v,y,m;for(u=l=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(33),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u-1}return!1}},function(t,e,i){var n=i(44),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(346),o=i(347),a=i(352);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,u,l);break;case n.CSV:c=r(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),u=i(899),l=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=u(c),l(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(35),r=i(354),o=i(23),a=i(19),h=i(75),u=i(322),l=i(355),c=i(44),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[u])return this.tilesets[u].setTileSize(i,n),this.tilesets[u].setSpacing(s,r),this.tilesets[u].setImage(h),this.tilesets[u];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var l=new f(t,o,i,n,s,r);return l.setImage(h),this.tilesets.push(l),l},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new l(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,u){if(void 0===a&&(a=e.tileWidth),void 0===u&&(u=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var l,d=new h({name:t,tileWidth:a,tileHeight:u,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),u=i(156),l=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),A=[],S=u("value",f),C=c(p[0],"value",S.getEnd,S.getStart,m,g,v,T,x,w,b,!1,!1);C.start=d,C.current=d,C.to=f,A.push(C);var M=new l(t,A,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],L=l.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},,function(t,e,i){i(366),i(367),i(368),i(369),i(370),i(371),i(372),i(373),i(374)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(114),CameraManager:i(443)}},function(t,e,i){var n=i(114),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new l(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;r=s(u,h,t+1/3),o=s(u,h,t),a=s(u,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,s,u),g:n(e,r,u),b:n(i,o,u)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(45),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(125),o=i(42),a=i(505),h=i(506),u=i(509),l=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(){return this},deleteFramebuffer:function(){return this},deleteProgram:function(){return this},deleteBuffer:function(){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;uthis.vertexCapacity&&this.flush();this.renderer.config.resolution;var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,A=o+h,S=m[0],C=m[1],M=m[2],E=m[3],_=d*S+f*M,L=d*C+f*E,P=p*S+g*M,F=p*C+g*E,k=v*S+y*M+m[4],R=v*C+y*E+m[5],O=r*_+o*P+k,D=r*L+o*F+R,I=r*_+A*P+k,B=r*L+A*F+R,Y=T*_+A*P+k,X=T*L+A*F+R,z=T*_+o*P+k,N=T*L+o*F+R,W=u.getTintAppendFloatAlphaAndSwap(l,c);x[b+0]=O,x[b+1]=D,w[b+2]=W,x[b+3]=I,x[b+4]=B,w[b+5]=W,x[b+6]=Y,x[b+7]=X,w[b+8]=W,x[b+9]=O,x[b+10]=D,w[b+11]=W,x[b+12]=Y,x[b+13]=X,w[b+14]=W,x[b+15]=z,x[b+16]=N,w[b+17]=W,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var b=this.vertexViewF32,T=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,S=w[0],C=w[1],M=w[2],E=w[3],_=p*S+g*M,L=p*C+g*E,P=v*S+y*M,F=v*C+y*E,k=m*S+x*M+w[4],R=m*C+x*E+w[5],O=r*_+o*P+k,D=r*L+o*F+R,I=a*_+h*P+k,B=a*L+h*F+R,Y=l*_+c*P+k,X=l*L+c*F+R,z=u.getTintAppendFloatAlphaAndSwap(d,f);b[A+0]=O,b[A+1]=D,T[A+2]=z,b[A+3]=I,b[A+4]=B,T[A+5]=z,b[A+6]=Y,b[A+7]=X,T[A+8]=z,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,y,m,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=u,b[2].y=l,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,y,m,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v){this.renderer.setPipeline(this);this.renderer.config.resolution;for(var y,m,x,w,b,T,A,S,C,M,E,_,L,P,F,k,R,O=o.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,Y=0,X=v[0],z=v[1],N=v[2],W=v[3],G=l*X+c*N,U=l*z+c*W,V=d*X+f*N,H=d*z+f*W,j=p*X+g*N+v[4],q=p*z+g*W+v[5],K=u.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,_=(T=D[x+0])*G+(A=D[x+1])*V+j,L=T*U+A*H+q,P=(S=D[w+0])*G+(C=D[w+1])*V+j,F=S*U+C*H+q,k=(M=D[b+0])*G+(E=D[b+1])*V+j,R=M*U+E*H+q,I[Y+0]=_,I[Y+1]=L,B[Y+2]=K,I[Y+3]=P,I[Y+4]=F,B[Y+5]=K,I[Y+6]=k,I[Y+7]=R,B[Y+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var w,b,T,A,S=r.length,C=this.polygonCache,M=this.vertexViewF32,E=this.vertexViewU32,_=u.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=C[P-1]||C[F-1],b=C[P],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],E[T+2]=_(w[8],h),M[T+3]=w[0],M[T+4]=w[1],E[T+5]=_(w[2],h),M[T+6]=b[9],M[T+7]=b[10],E[T+8]=_(b[11],h),M[T+9]=w[0],M[T+10]=w[1],E[T+11]=_(w[2],h),M[T+12]=w[6],M[T+13]=w[7],E[T+14]=_(w[8],h),M[T+15]=b[3],M[T+16]=b[4],E[T+17]=_(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var T=b[0],A=b[1],S=b[2],C=b[3],M=g*T+v*S,E=g*A+v*C,_=y*T+m*S,L=y*A+m*C,P=x*T+w*S+b[4],F=x*A+w*C+b[5],k=this.vertexViewF32,R=this.vertexViewU32,O=a-r,D=h-o,I=Math.sqrt(O*O+D*D),B=l*(h-o)/I,Y=l*(r-a)/I,X=c*(h-o)/I,z=c*(r-a)/I,N=a-X,W=h-z,G=r-B,U=o-Y,V=a+X,H=h+z,j=r+B,q=o+Y,K=N*M+W*_+P,J=N*E+W*L+F,Z=G*M+U*_+P,Q=G*E+U*L+F,$=V*M+H*_+P,tt=V*E+H*L+F,et=j*M+q*_+P,it=j*E+q*L+F,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return k[ot+0]=K,k[ot+1]=J,R[ot+2]=rt,k[ot+3]=Z,k[ot+4]=Q,R[ot+5]=st,k[ot+6]=$,k[ot+7]=tt,R[ot+8]=rt,k[ot+9]=Z,k[ot+10]=Q,R[ot+11]=st,k[ot+12]=et,k[ot+13]=it,R[ot+14]=st,k[ot+15]=$,k[ot+16]=tt,R[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i,n,r=e.scrollX*t.scrollFactorX,o=e.scrollY*t.scrollFactorY,a=t.x-r,h=t.y-o,u=t.scaleX,l=t.scaleY,y=-t.rotation,m=t.commandBuffer,x=1,w=1,b=0,T=0,A=1,S=e.matrix.matrix,C=null,M=0,E=0,_=0,L=0,P=0,F=0,k=0,R=0,O=0,D=null,I=Math.sin,B=Math.cos,Y=I(y),X=B(y),z=X*u,N=-Y*u,W=Y*l,G=X*l,U=a,V=h,H=S[0],j=S[1],q=S[2],K=S[3],J=z*H+N*q,Z=z*j+N*K,Q=W*H+G*q,$=W*j+G*K,tt=U*H+V*q+S[4],et=U*j+V*K+S[5];v.length=0;for(var it=0,nt=m.length;it0){var st=C.points[0],rt=C.points[C.points.length-1];C.points.push(st),C=new d(rt.x,rt.y,rt.width,rt.rgb,rt.alpha),v.push(C)}break;case s.FILL_PATH:for(i=0,n=v.length;i=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+y,h-m,u-x),(v+=h+p)+h>r&&(v=f,y+=u+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+l)/(s+l)),m=Math.floor((v-u+l)/(r+l)),x=y*m,w=e.x,b=s-w,T=s-(g-f-w),A=e.y,S=r-A,C=r-(v-p-A);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=u,E=u,_=0,L=e.sourceIndex,P=0;P0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(542),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(543),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(37),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(622),DynamicBitmapText:i(623),Graphics:i(624),Group:i(625),Image:i(626),Particles:i(627),PathFollower:i(628),Sprite3D:i(629),Sprite:i(630),StaticBitmapText:i(631),Text:i(632),TileSprite:i(633),Zone:i(634)},Creators:{Blitter:i(635),DynamicBitmapText:i(636),Graphics:i(637),Group:i(638),Image:i(639),Particles:i(640),Sprite3D:i(641),Sprite:i(642),StaticBitmapText:i(643),Text:i(644),TileSprite:i(645),Zone:i(646)}};n.Mesh=i(88),n.Quad=i(141),n.Factories.Mesh=i(650),n.Factories.Quad=i(651),n.Creators.Mesh=i(652),n.Creators.Quad=i(653),n.Light=i(290),i(291),i(654),t.exports=n},function(t,e,i){var n=i(0),s=i(86),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(547),s=i(548),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,l=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,A=null,S=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-u+e.frame.y),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var P=0;P0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode);for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,u=0;u0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,u=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,w=0,b=0,T=0,A=0,S=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,L=a.cutY,P=0,F=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.translate(-e.displayOriginX,-e.displayOriginY),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var k=0;k0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(568),s=i(569),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(50),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),u=i(280),l=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(41),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(611),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,w=y.canvasData,b=-m,T=-x;l.globalAlpha=v,l.save(),l.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),l.rotate(g.rotation),l.scale(g.scaleX,g.scaleY),l.drawImage(y.source.image,w.sx,w.sy,w.sWidth,w.sHeight,b,T,w.dWidth,w.dHeight),l.restore()}}l.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(615),s=i(616),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(618),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,u,l=i.getImageData(0,0,s,o).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(648),s=i(649),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(656),n.Circumference=i(181),n.CircumferencePoint=i(104),n.Clone=i(657),n.Contains=i(32),n.ContainsPoint=i(658),n.ContainsRect=i(659),n.CopyFrom=i(660),n.Equals=i(661),n.GetBounds=i(662),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(663),n.OffsetPoint=i(664),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(41);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(676),n.Clone=i(677),n.CopyFrom=i(678),n.Equals=i(679),n.GetMidPoint=i(680),n.GetNormal=i(681),n.GetPoint=i(300),n.GetPoints=i(108),n.Height=i(682),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(683),n.NormalY=i(684),n.Offset=i(685),n.PerpSlope=i(686),n.Random=i(110),n.ReflectAngle=i(687),n.Rotate=i(688),n.RotateAroundPoint=i(689),n.RotateAroundXY=i(143),n.SetToAngle=i(690),n.Slope=i(691),n.Width=i(692),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(694),n.Clone=i(695),n.CopyFrom=i(696),n.Equals=i(697),n.Floor=i(698),n.GetCentroid=i(699),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(700),n.Interpolate=i(701),n.Invert=i(702),n.Negative=i(703),n.Project=i(704),n.ProjectUnit=i(705),n.SetMagnitude=i(706),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var u=[];for(i=0;i1&&(this.sortGameObjects(u),this.topOnly&&u.splice(1)),this._drag[t.id]=u,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var l=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),l[0]?(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&l[0]&&(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(759),JustUp:i(760),DownDuration:i(761),UpDuration:i(762)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(784),Distance:i(792),Easing:i(795),Fuzzy:i(796),Interpolation:i(802),Pow2:i(805),Snap:i(807),Average:i(811),Bernstein:i(320),Between:i(226),CatmullRom:i(122),CeilTo:i(812),Clamp:i(60),DegToRad:i(35),Difference:i(813),Factorial:i(321),FloatBetween:i(273),FloorTo:i(814),FromPercent:i(64),GetSpeed:i(815),IsEven:i(816),IsEvenStrict:i(817),Linear:i(225),MaxAdd:i(818),MinSub:i(819),Percent:i(820),RadToDeg:i(216),RandomXY:i(821),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(112),RoundAwayFromZero:i(323),RoundTo:i(822),SinCosTableGenerator:i(823),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(824),Wrap:i(50),Vector2:i(6),Vector3:i(51),Vector4:i(119),Matrix3:i(208),Matrix4:i(118),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(785),BetweenY:i(786),BetweenPoints:i(787),BetweenPointsY:i(788),Reverse:i(789),RotateTo:i(790),ShortestBetween:i(791),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(808),Floor:i(809),To:i(810)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=u(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(l(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(841),s=i(843),r=i(337);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(332);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},function(t,e,i){var n=i(333);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},,,,,,,,,,function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(83),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(85),BaseSoundManager:i(84),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(86),Map:i(113),ProcessQueue:i(334),RTree:i(335),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(892),Formats:i(19),ImageCollection:i(349),ParseToTilemap:i(154),Tile:i(44),Tilemap:i(353),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(351),DynamicTilemapLayer:i(354),StaticTilemapLayer:i(355)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,u){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var l=n(t,e,i,r,null,u),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(43),s=i(34),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(184),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(12),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){t.exports={Alpha:i(381),Animation:i(364),BlendMode:i(382),ComputedSize:i(383),Depth:i(384),Flip:i(385),GetBounds:i(386),MatrixStack:i(387),Origin:i(388),Pipeline:i(186),ScaleMode:i(389),ScrollFactor:i(390),Size:i(391),Texture:i(392),Tint:i(393),ToJSON:i(394),Transform:i(395),TransformMatrix:i(187),Visible:i(396)}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var l=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,u=null,l=null,c=s(t,e,i,r,null,o),d=0;d>>0},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;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],u=s[4],l=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],w=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*u+n*f+y)*w,this.y=(e*o+i*l+n*p+m)*w,this.z=(e*a+i*c+n*g+x)*w,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,u=n*n+s*s,l=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=u*d-l*l,g=0===p?0:1/p,v=(d*c-l*f)*g,y=(u*f-l*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(308),o=i(309),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(2),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(181),o=i(182),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(121),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,u=o-1;h<=u;)if((a=s[r=Math.floor(h+(u-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){u=r;break}u=r-1}if(s[r=u]===n)return r/(o-1);var l=s[r];return(r+(n-l)/(s[r+1]-l))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(496))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(168),s=i(0),r=i(2),o=i(4),a=i(274),h=i(61),u=i(37),l=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",u),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(1),r=i(37),o=i(6),a=i(119),h=new n({Extends:s,initialize:function(t,e,i,n,h,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,u),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(14),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}});t.exports=o},function(t,e,i){var n=i(0),s=i(14),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(655),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,u){if(r.call(this,t,"Mesh"),this.setTexture(h,u),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var l,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(327),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},,,,,function(t,e,i){t.exports={CalculateFacesAt:i(152),CalculateFacesWithin:i(34),Copy:i(871),CreateFromTiles:i(872),CullTiles:i(873),Fill:i(874),FilterTiles:i(875),FindByIndex:i(876),FindTile:i(877),ForEachTile:i(878),GetTileAt:i(97),GetTileAtWorldXY:i(879),GetTilesWithin:i(15),GetTilesWithinShape:i(880),GetTilesWithinWorldXY:i(881),HasTileAt:i(344),HasTileAtWorldXY:i(882),IsInLayerBounds:i(74),PutTileAt:i(153),PutTileAtWorldXY:i(883),PutTilesAt:i(884),Randomize:i(885),RemoveTileAt:i(345),RemoveTileAtWorldXY:i(886),RenderDebug:i(887),ReplaceByIndex:i(343),SetCollision:i(888),SetCollisionBetween:i(889),SetCollisionByExclusion:i(890),SetCollisionByProperty:i(891),SetCollisionFromCollisionGroup:i(892),SetTileIndexCallback:i(893),SetTileLocationCallback:i(894),Shuffle:i(895),SwapByIndex:i(896),TileToWorldX:i(98),TileToWorldXY:i(897),TileToWorldY:i(99),WeightedRandomize:i(898),WorldToTileX:i(39),WorldToTileXY:i(899),WorldToTileY:i(40)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,u=t.y2,l=0;l=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||b-y||S>-m||A-y||T>-m||b-y||S>-m||A-v&&S*n+C*r+h>-y&&(S+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],u=n[4],l=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*l-a*u)*c,y=(r*u-s*l)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),w=this.zoom,b=this.scrollX,T=this.scrollY,A=t+(b*m-T*x)*w,S=e+(b*x+T*m)*w;return i.x=A*d+S*p+v,i.y=A*f+S*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;el&&(this.scrollX=l),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom,this.roundPixels&&(this._shakeOffsetX|=0,this._shakeOffsetY|=0))}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=u},function(t,e,i){var n=i(200),s=i(202),r=i(204),o=i(205);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(118),r=i(206),o=i(207),a=i(208),h=i(61),u=i(81),l=i(6),c=i(51),d=i(119),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,u=a*i+o*e-s*n,l=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+u*-o-l*-r,this.y=u*a+c*-r+l*-s-h*-o,this.z=l*a+c*-o+h*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(83),r=i(529),o=i(530),a=i(233),h=i(254),u=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=u},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(267),a=i(546),h=i(547),u=i(548),l=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,u],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});l.ParseRetroFont=h,l.ParseFromAtlas=a,t.exports=l},function(t,e,i){var n=i(551),s=i(554),r=i(0),o=i(11),a=i(130),h=i(1),u=i(86),l=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new u,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=l},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(267),a=i(555),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(114),s=i(0),r=i(127),o=i(11),a=i(269),h=i(1),u=i(4),l=i(16),c=i(567),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,l.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(270),o=i(271),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(572),a=i(86),h=i(573),u=i(612),l=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,u],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;su){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=u)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);l[c]=v,h+=g}var y=l[c].length?c:c+1,m=l.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,u-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-u):(o-=l,n+=a[h]+" ")}r0&&(a+=l.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=l.width-l.lineWidths[p]:"center"===i.align&&(o+=(l.width-l.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(u[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(u[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&l(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(21),s=i(0),r=i(11),o=i(1),a=i(290),h=i(625),u=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,u){var l=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=l,this.setTexture(h,u),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=u},function(t,e,i){var n=i(10);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),u=n(i,"repeatDelay",0),l=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.delay(a),s.repeat(h),s.repeatDelay(u),s.yoyo(l),c?s.play(r,o):d>0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,u,l=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=l*l+c*c,g=l*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,w=t.y1,b=0;b=0&&r>=0&&s+r<1&&(n.push({x:e[b].x,y:e[b].y}),i)));b++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,u=n/s;a=h?e.ease(u):e.ease(1-u),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=u;var l=t.callbacks.onUpdate;l&&(l.params[1]=e.target,l.func.apply(l.scope,l.params)),1===u&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,u,l,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:u,repeatDelay:l},state:0}}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-180,180)}},,,function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(376),Call:i(377),GetFirst:i(378),GridAlign:i(379),IncAlpha:i(397),IncX:i(398),IncXY:i(399),IncY:i(400),PlaceOnCircle:i(401),PlaceOnEllipse:i(402),PlaceOnLine:i(403),PlaceOnRectangle:i(404),PlaceOnTriangle:i(405),PlayAnimation:i(406),RandomCircle:i(407),RandomEllipse:i(408),RandomLine:i(409),RandomRectangle:i(410),RandomTriangle:i(411),Rotate:i(412),RotateAround:i(413),RotateAroundDistance:i(414),ScaleX:i(415),ScaleXY:i(416),ScaleY:i(417),SetAlpha:i(418),SetBlendMode:i(419),SetDepth:i(420),SetHitArea:i(421),SetOrigin:i(422),SetRotation:i(423),SetScale:i(424),SetScaleX:i(425),SetScaleY:i(426),SetTint:i(427),SetVisible:i(428),SetX:i(429),SetXY:i(430),SetY:i(431),ShiftPosition:i(432),Shuffle:i(433),SmootherStep:i(434),SmoothStep:i(435),Spread:i(436),ToggleVisible:i(437)}},function(t,e,i){var n=i(170),s=[];s[n.BOTTOM_CENTER]=i(171),s[n.BOTTOM_LEFT]=i(172),s[n.BOTTOM_RIGHT]=i(173),s[n.CENTER]=i(174),s[n.LEFT_CENTER]=i(176),s[n.RIGHT_CENTER]=i(177),s[n.TOP_CENTER]=i(178),s[n.TOP_LEFT]=i(179),s[n.TOP_RIGHT]=i(180);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(46),r=i(25),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(175),s=i(46),r=i(49);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(47),s=i(48);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(49),s=i(26),r=i(48),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(28),r=i(48),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(30),r=i(47),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(183),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=u),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=u[0],u[0].prevFrame=o;var v=1/(u.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(194),s=i(0),r=i(113),o=i(14),a=i(4),h=i(197),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(14),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(198),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(118),r=i(209),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(210),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),u=new s(0,1,0),l=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(l.copy(h).cross(t).length()<1e-6&&l.copy(u).cross(t),l.normalize(),this.setAxisAngle(l,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(t).cross(e),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,u=t.w,l=i*o+n*a+s*h+r*u;l<0&&(l=-l,o=-o,a=-a,h=-h,u=-u);var c=1-e,d=e;if(1-l>1e-6){var f=Math.acos(l),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*u,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8],l=u*r-o*h,c=-u*s+o*a,d=h*s-r*a,f=e*l+i*c+n*d;return f?(f=1/f,t[0]=l*f,t[1]=(-u*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(u*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return t[0]=r*u-o*h,t[1]=n*h-i*u,t[2]=i*o-n*r,t[3]=o*a-s*u,t[4]=e*u-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],u=t[8];return e*(u*r-o*h)+i*(-u*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],u=e[7],l=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*u,e[2]=d*s+f*a+p*l,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*u,e[5]=g*s+v*a+y*l,e[6]=m*i+x*r+w*h,e[7]=m*n+x*o+w*u,e[8]=m*s+x*a+w*l,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),u=Math.cos(t);return e[0]=u*i+h*r,e[1]=u*n+h*o,e[2]=u*s+h*a,e[3]=u*r-h*i,e[4]=u*o-h*n,e[5]=u*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,u=e*o,l=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=u+v,y[6]=l-g,y[1]=u-v,y[4]=1-(h+f),y[7]=d+p,y[2]=l+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],u=e[6],l=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,w=n*u-r*a,b=n*l-o*a,T=s*u-r*h,A=s*l-o*h,S=r*l-o*u,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,L=d*m-p*v,P=f*m-p*y,F=x*P-w*L+b*_+T*E-A*M+S*C;return F?(F=1/F,i[0]=(h*P-u*L+l*_)*F,i[1]=(u*E-a*P-l*M)*F,i[2]=(a*L-h*E+l*C)*F,i[3]=(r*L-s*P-o*_)*F,i[4]=(n*P-r*E+o*M)*F,i[5]=(s*E-n*L-o*C)*F,i[6]=(v*S-y*A+m*T)*F,i[7]=(y*b-g*S-m*w)*F,i[8]=(g*A-v*b+m*x)*F,this):null}});t.exports=n},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(214),s=i(21),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),u=r(t,"resizeCanvas",!0),l=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),u=!1,l=!1),u&&(i.width=f,i.height=p);var g=i.getContext("2d");l&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,u.x,l.x,c.x),n(a,h.y,u.y,l.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(486)(t))},function(t,e,i){var n=i(116);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u={r:i=Math.floor(i*=255),g:i,b:i,color:0},l=s%6;return 0===l?(u.g=h,u.b=o):1===l?(u.r=a,u.b=o):2===l?(u.r=o,u.b=h):3===l?(u.r=o,u.g=a):4===l?(u.r=h,u.g=o):5===l&&(u.g=o,u.b=a),u.color=n(u.r,u.g,u.b),u}},function(t,e,i){var n=i(227);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(21),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,u,l,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,u,l,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=u=t[1];for(var w=i;wh&&(h=l),f>u&&(u=f);g=Math.max(h-n,u-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===S(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=u(t,e,i),e,i,n,s,c,2):2===d&&l(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(u,l,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function u(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function l(t,e,i,n,s,a){var h,u,l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&(u=c,(h=l).next.i!==u.i&&h.prev.i!==u.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,u)&&x(h,u)&&x(u,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,u))){var d=w(l,c);return l=r(l,l.next),d=r(d,d.next),o(l,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}l=l.next}while(l!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=l&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function w(t,e){var i=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new A(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],u=e[9],l=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+u*i,e[6]=o*n+l*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=u*n-r*i,e[10]=l*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],u=e[9],l=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-u*i,e[2]=o*n-l*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+u*n,e[10]=o*i+l*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],u=e[5],l=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+u*i,e[2]=o*n+l*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=u*n-r*i,e[6]=l*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),u=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*u,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(514),r=i(238),o=new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,o=t.lights.cull(e),a=Math.min(o.length,10),h=e.matrix,u={x:0,y:0},l=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(a<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,u=0,l=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(l.texture,0),n.drawArrays(o,l.first,u)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,a=this.maxQuads,h=e.scrollX,u=e.scrollY,l=e.matrix.matrix,c=l[0],d=l[1],f=l[2],p=l[3],g=l[4],v=l[5],y=Math.sin,m=Math.cos,x=this.vertexComponentCount,w=this.vertexCapacity,b=t.defaultFrame.source.glTexture;this.setTexture2D(b,0);for(var T=0;T=w&&(this.flush(),this.setTexture2D(b,0));for(var P=0;P=w&&(this.flush(),this.setTexture2D(b,0))}}}this.setTexture2D(b,0)},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=(this.renderer,t.getRenderList()),o=r.length,h=e.matrix.matrix,u=h[0],l=h[1],c=h[2],d=h[3],f=h[4],p=h[5],g=e.scrollX*t.scrollFactorX,v=e.scrollY*t.scrollFactorY,y=Math.ceil(o/this.maxQuads),m=0,x=t.x-g,w=t.y-v,b=0;b=this.vertexCapacity&&this.flush()}m+=T,o-=T,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=(this.renderer,e.matrix.matrix),h=t.frame,u=h.texture.source[h.sourceIndex].glTexture,l=!!u.isRenderTexture,c=t.flipX,d=t.flipY^l,f=h.uvs,p=h.width*(c?-1:1),g=h.height*(d?-1:1),v=-t.displayOriginX+h.x+h.width*(c?1:0),y=-t.displayOriginY+h.y+h.height*(d?1:0),m=v+p,x=y+g,w=t.x-e.scrollX*t.scrollFactorX,b=t.y-e.scrollY*t.scrollFactorY,T=t.scaleX,A=t.scaleY,S=-t.rotation,C=t._alphaTL,M=t._alphaTR,E=t._alphaBL,_=t._alphaBR,L=t._tintTL,P=t._tintTR,F=t._tintBL,k=t._tintBR,R=Math.sin(S),O=Math.cos(S),D=O*T,I=-R*T,B=R*A,Y=O*A,X=w,z=b,N=o[0],W=o[1],G=o[2],U=o[3],V=D*N+I*G,H=D*W+I*U,j=B*N+Y*G,q=B*W+Y*U,K=X*N+z*G+o[4],J=X*W+z*U+o[5],Z=v*V+y*j+K,Q=v*H+y*q+J,$=v*V+x*j+K,tt=v*H+x*q+J,et=m*V+x*j+K,it=m*H+x*q+J,nt=m*V+y*j+K,st=m*H+y*q+J,rt=n(L,C),ot=n(P,M),at=n(F,E),ht=n(k,_);this.setTexture2D(u,0),s[(i=this.vertexCount*this.vertexComponentCount)+0]=Z,s[i+1]=Q,s[i+2]=f.x0,s[i+3]=f.y0,r[i+4]=rt,s[i+5]=$,s[i+6]=tt,s[i+7]=f.x1,s[i+8]=f.y1,r[i+9]=at,s[i+10]=et,s[i+11]=it,s[i+12]=f.x2,s[i+13]=f.y2,r[i+14]=ht,s[i+15]=Z,s[i+16]=Q,s[i+17]=f.x0,s[i+18]=f.y0,r[i+19]=rt,s[i+20]=et,s[i+21]=it,s[i+22]=f.x2,s[i+23]=f.y2,r[i+24]=ht,s[i+25]=nt,s[i+26]=st,s[i+27]=f.x3,s[i+28]=f.y3,r[i+29]=ot,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,u=t.alphas,l=this.vertexViewF32,c=this.vertexViewU32,d=(this.renderer,e.matrix.matrix),f=t.frame,p=t.texture.source[f.sourceIndex].glTexture,g=t.x-e.scrollX*t.scrollFactorX,v=t.y-e.scrollY*t.scrollFactorY,y=t.scaleX,m=t.scaleY,x=-t.rotation,w=Math.sin(x),b=Math.cos(x),T=b*y,A=-w*y,S=w*m,C=b*m,M=g,E=v,_=d[0],L=d[1],P=d[2],F=d[3],k=T*_+A*P,R=T*L+A*F,O=S*_+C*P,D=S*L+C*F,I=M*_+E*P+d[4],B=M*L+E*F+d[5],Y=0;this.setTexture2D(p,0),Y=this.vertexCount*this.vertexComponentCount;for(var X=0,z=0;Xthis.vertexCapacity&&this.flush();var i,n,s,r,o,h,u,l,c=t.text,d=c.length,f=a.getTintAppendFloatAlpha,p=this.vertexViewF32,g=this.vertexViewU32,v=(this.renderer,e.matrix.matrix),y=e.width+50,m=e.height+50,x=t.frame,w=t.texture.source[x.sourceIndex],b=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,A=t.fontData,S=A.lineHeight,C=t.fontSize/A.size,M=A.chars,E=t.alpha,_=f(t._tintTL,E),L=f(t._tintTR,E),P=f(t._tintBL,E),F=f(t._tintBR,E),k=t.x,R=t.y,O=x.cutX,D=x.cutY,I=w.width,B=w.height,Y=w.glTexture,X=0,z=0,N=0,W=0,G=null,U=0,V=0,H=0,j=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=null,nt=0,st=k-b+x.x,rt=R-T+x.y,ot=-t.rotation,at=t.scaleX,ht=t.scaleY,ut=Math.sin(ot),lt=Math.cos(ot),ct=lt*at,dt=-ut*at,ft=ut*ht,pt=lt*ht,gt=st,vt=rt,yt=v[0],mt=v[1],xt=v[2],wt=v[3],bt=ct*yt+dt*xt,Tt=ct*mt+dt*wt,At=ft*yt+pt*xt,St=ft*mt+pt*wt,Ct=gt*yt+vt*xt+v[4],Mt=gt*mt+vt*wt+v[5],Et=0;this.setTexture2D(Y,0);for(var _t=0;_ty||n<-50||n>m)&&(s<-50||s>y||r<-50||r>m)&&(o<-50||o>y||h<-50||h>m)&&(u<-50||u>y||l<-50||l>m)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),p[(Et=this.vertexCount*this.vertexComponentCount)+0]=i,p[Et+1]=n,p[Et+2]=Q,p[Et+3]=tt,g[Et+4]=_,p[Et+5]=s,p[Et+6]=r,p[Et+7]=Q,p[Et+8]=et,g[Et+9]=P,p[Et+10]=o,p[Et+11]=h,p[Et+12]=$,p[Et+13]=et,g[Et+14]=F,p[Et+15]=i,p[Et+16]=n,p[Et+17]=Q,p[Et+18]=tt,g[Et+19]=_,p[Et+20]=o,p[Et+21]=h,p[Et+22]=$,p[Et+23]=et,g[Et+24]=F,p[Et+25]=u,p[Et+26]=l,p[Et+27]=$,p[Et+28]=tt,g[Et+29]=L,this.vertexCount+=6))}}else X=0,N=0,z+=S,it=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,u,l,c,d,f,p,g,v,y=t.displayCallback,m=t.text,x=m.length,w=a.getTintAppendFloatAlpha,b=this.vertexViewF32,T=this.vertexViewU32,A=this.renderer,S=e.matrix.matrix,C=t.frame,M=t.texture.source[C.sourceIndex],E=e.scrollX*t.scrollFactorX,_=e.scrollY*t.scrollFactorY,L=t.scrollX,P=t.scrollY,F=t.fontData,k=F.lineHeight,R=t.fontSize/F.size,O=F.chars,D=t.alpha,I=w(t._tintTL,D),B=w(t._tintTR,D),Y=w(t._tintBL,D),X=w(t._tintBR,D),z=t.x,N=t.y,W=C.cutX,G=C.cutY,U=M.width,V=M.height,H=M.glTexture,j=0,q=0,K=0,J=0,Z=null,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,ut=0,lt=null,ct=0,dt=z+C.x,ft=N+C.y,pt=-t.rotation,gt=t.scaleX,vt=t.scaleY,yt=Math.sin(pt),mt=Math.cos(pt),xt=mt*gt,wt=-yt*gt,bt=yt*vt,Tt=mt*vt,At=dt,St=ft,Ct=S[0],Mt=S[1],Et=S[2],_t=S[3],Lt=xt*Ct+wt*Et,Pt=xt*Mt+wt*_t,Ft=bt*Ct+Tt*Et,kt=bt*Mt+Tt*_t,Rt=At*Ct+St*Et+S[4],Ot=At*Mt+St*_t+S[5],Dt=t.cropWidth>0||t.cropHeight>0,It=0;this.setTexture2D(H,0),Dt&&A.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var Bt=0;Btthis.vertexCapacity&&this.flush(),b[(It=this.vertexCount*this.vertexComponentCount)+0]=i,b[It+1]=n,b[It+2]=ot,b[It+3]=ht,T[It+4]=I,b[It+5]=s,b[It+6]=r,b[It+7]=ot,b[It+8]=ut,T[It+9]=Y,b[It+10]=o,b[It+11]=h,b[It+12]=at,b[It+13]=ut,T[It+14]=X,b[It+15]=i,b[It+16]=n,b[It+17]=ot,b[It+18]=ht,T[It+19]=I,b[It+20]=o,b[It+21]=h,b[It+22]=at,b[It+23]=ut,T[It+24]=X,b[It+25]=u,b[It+26]=l,b[It+27]=at,b[It+28]=ht,T[It+29]=B,this.vertexCount+=6}}}else j=0,K=0,q+=k,lt=null;Dt&&A.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,u=t.alpha,l=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,l=-l;var _,L=this.vertexViewF32,P=this.vertexViewU32,F=(this.renderer,E.matrix.matrix),k=o*(c?1:0)-g,R=a*(d?1:0)-v,O=k+o*(c?-1:1),D=R+a*(d?-1:1),I=s-E.scrollX*f,B=r-E.scrollY*p,Y=Math.sin(l),X=Math.cos(l),z=X*h,N=-Y*h,W=Y*u,G=X*u,U=I,V=B,H=F[0],j=F[1],q=F[2],K=F[3],J=z*H+N*q,Z=z*j+N*K,Q=W*H+G*q,$=W*j+G*K,tt=U*H+V*q+F[4],et=U*j+V*K+F[5],it=k*J+R*Q+tt,nt=k*Z+R*$+et,st=k*J+D*Q+tt,rt=k*Z+D*$+et,ot=O*J+D*Q+tt,at=O*Z+D*$+et,ht=O*J+R*Q+tt,ut=O*Z+R*$+et,lt=y/i+C,ct=m/n+M,dt=(y+x)/i+C,ft=(m+w)/n+M;this.setTexture2D(e,0),L[(_=this.vertexCount*this.vertexComponentCount)+0]=it,L[_+1]=nt,L[_+2]=lt,L[_+3]=ct,P[_+4]=b,L[_+5]=st,L[_+6]=rt,L[_+7]=lt,L[_+8]=ft,P[_+9]=T,L[_+10]=ot,L[_+11]=at,L[_+12]=dt,L[_+13]=ft,P[_+14]=A,L[_+15]=it,L[_+16]=nt,L[_+17]=lt,L[_+18]=ct,P[_+19]=b,L[_+20]=ot,L[_+21]=at,L[_+22]=dt,L[_+23]=ft,P[_+24]=A,L[_+25]=ht,L[_+26]=ut,L[_+27]=dt,L[_+28]=ct,P[_+29]=S,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var h,u=this.vertexViewF32,l=this.vertexViewU32,c=(this.renderer,e),d=i,f=c+r,p=d+o,g=a[0],v=a[1],y=a[2],m=a[3],x=a[4],w=a[5],b=c*g+d*y+x,T=c*v+d*m+w,A=c*g+p*y+x,S=c*v+p*m+w,C=f*g+p*y+x,M=f*v+p*m+w,E=f*g+d*y+x,_=f*v+d*m+w,L=t.width,P=t.height,F=n/L,k=s/P,R=(n+r)/L,O=(s+o)/P,D=4294967295;this.setTexture2D(t,0),u[(h=this.vertexCount*this.vertexComponentCount)+0]=b,u[h+1]=T,u[h+2]=F,u[h+3]=k,l[h+4]=D,u[h+5]=A,u[h+6]=S,u[h+7]=F,u[h+8]=O,l[h+9]=D,u[h+10]=C,u[h+11]=M,u[h+12]=R,u[h+13]=O,l[h+14]=D,u[h+15]=b,u[h+16]=T,u[h+17]=F,u[h+18]=k,l[h+19]=D,u[h+20]=C,u[h+21]=M,u[h+22]=R,u[h+23]=O,l[h+24]=D,u[h+25]=E,u[h+26]=_,u[h+27]=R,u[h+28]=k,l[h+29]=D,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=u},function(t,e,i){var n=i(0),s=i(14),r=i(240),o=i(244),a=i(247),h=i(248),u=i(8),l=i(249),c=i(250),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new l(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new u,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),u={x:0,y:0},l=0;l0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(14),r=i(245),o=i(128),a=i(246),h=i(526),u=i(527),l=i(528),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=u},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(83),s=i(4),r=i(531),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(256),s=i(258),r=i(260),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(84),r=i(257),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(84),s=i(0),r=i(14),o=i(259),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(85),s=i(0),r=i(14),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(84),r=i(261),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context?this.context.suspend():this.context.close(),this.context=null,s.prototype.destroy.call(this)}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nu&&(r=u),o>u&&(o=u),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var A=y+g-s,S=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,u=r.scrollY*e.scrollFactorY,l=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,w=0,b=1,T=0,A=0,S=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(l-h,c-u),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,A=(65280&x)>>>8,S=255&x,v.strokeStyle="rgba("+T+","+A+","+S+","+y+")",v.lineWidth=b,C+=3;break;case n.FILL_STYLE:w=g[C+1],m=g[C+2],T=(16711680&w)>>>16,A=(65280&w)>>>8,S=255&w,v.fillStyle="rgba("+T+","+A+","+S+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(663),Ellipse:i(269),Intersects:i(294),Line:i(683),Point:i(701),Polygon:i(715),Rectangle:i(306),Triangle:i(744)}},function(t,e,i){t.exports={CircleToCircle:i(673),CircleToRectangle:i(674),GetRectangleIntersection:i(675),LineToCircle:i(296),LineToLine:i(89),LineToRectangle:i(676),PointToLine:i(297),PointToLineSegment:i(677),RectangleToRectangle:i(295),RectangleToTriangle:i(678),RectangleToValues:i(679),TriangleToCircle:i(680),TriangleToLine:i(681),TriangleToTriangle:i(682)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,u=r*r+o*o,l=r,c=o;if(u>0){var d=(a*r+h*o)/u;l*=d,c*=d}return i.x=t.x1+l,i.y=t.y1+c,l*l+c*c<=u&&l*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(301),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(50),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(146),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),u=s(o),l=s(a),c=(h+u+l)*e,d=0;return ch+u?(d=(c-=h+u)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),u=n(o),l=n(a),c=n(h),d=u+l+c;e||(e=d/i);for(var f=0;fu+l?(g=(p-=u+l)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=u)/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,u=t.y3,l=s(h,u,o,a),c=s(i,r,h,u),d=s(o,a,i,r),f=l+c+d;return e.x=(i*l+o*c+h*d)/f,e.y=(r*l+a*c+u*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(150);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(2),h=i(316),u=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});u.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return null;var l=u.findAudioURL(r,i);return l?!a.webAudio||o&&o.disableWebAudio?new h(e,l,t.path,n,r.sound.locked):new u(e,l,t.path,s,r.sound.context):null},o.register("audio",function(t,e,i,n){var s=u.create(this,t,e,i,n);return s&&this.addFile(s),this}),u.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(322);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(326),s=i(91),r=i(0),o=i(58),a=i(328),h=i(329),u=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=u},function(t,e,i){var n=i(0),s=i(327),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(835),Angular:i(836),Bounce:i(837),Debug:i(838),Drag:i(839),Enable:i(840),Friction:i(841),Gravity:i(842),Immovable:i(843),Mass:i(844),Size:i(845),Velocity:i(846)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(2),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var u=this.tree,l=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var u=!1,l=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)u.right&&(a=h(d.x,d.y,u.right,u.y)-d.radius):d.y>u.bottom&&(d.xu.right&&(a=h(d.x,d.y,u.right,u.bottom)-d.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),w=f*Math.sin(o)-p*Math.cos(o),b=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),A=((g-m)*x+2*m*b)/(g+m),S=(2*g*x+(m-g)*b)/(g+m);return t.immovable||(t.velocity.x=(A*Math.cos(o)-w*Math.sin(o))*t.bounce.x,t.velocity.y=(w*Math.cos(o)+A*Math.sin(o))*t.bounce.y,f=t.velocity.x,p=t.velocity.y),e.immovable||(e.velocity.x=(S*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+S*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var u=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==u.length)for(var l=e.getChildren(),c=0;cc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,u+=d}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,g=e.getTilesWithinWorldXY(a,h,u,l);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,u,l,d,f,p,g,v,y,m;for(u=l=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(l,t.leaf?o(r):r),c+=d(l);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,u=e-r+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1),f=Math.max(r,Math.floor(e-u*c/h+d)),p=Math.min(o,Math.floor(e+(h-u)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(33),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},,,,function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),u=0;u-1}return!1}},function(t,e,i){var n=i(44),s=i(74),r=i(152);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(20),s=i(155),r=i(347),o=i(348),a=i(353);t.exports=function(t,e,i,h,u,l){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,u,l);break;case n.CSV:c=r(t,i,h,u,l);break;case n.TILED_JSON:c=o(t,i,l);break;case n.WELTMEISTER:c=a(t,i,l);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(20),s=i(155);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(20),s=i(76),r=i(901),o=i(903),a=i(904),h=i(906),u=i(907),l=i(908);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=u(c),l(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[u].width),e.layer[u].height>h&&(h=e.layer[u].height);var l=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return l.layers=r(e,i),l.tilesets=o(e),l}},function(t,e,i){var n=i(0),s=i(35),r=i(355),o=i(23),a=i(20),h=i(75),u=i(323),l=i(356),c=i(44),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),u=this.getTilesetIndex(t);if(null===u&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[u])return this.tilesets[u].setTileSize(i,n),this.tilesets[u].setSpacing(s,r),this.tilesets[u].setImage(h),this.tilesets[u];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var l=new f(t,o,i,n,s,r);return l.setImage(h),this.tilesets.push(l),l},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new l(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,u){if(void 0===a&&(a=e.tileWidth),void 0===u&&(u=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var l,d=new h({name:t,tileWidth:a,tileHeight:u,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(923);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(159),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),u=i(158),l=i(160),c=i(161);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),A=[],S=u("value",f),C=c(p[0],"value",S.getEnd,S.getStart,m,g,v,T,x,w,b,!1,!1);C.start=d,C.current=d,C.to=f,A.push(C);var M=new l(t,A,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],L=l.TYPES,P=0;P0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},,function(t,e,i){i(367),i(368),i(369),i(370),i(371),i(372),i(373),i(374),i(375)},function(t,e){Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(void 0===this||null===this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(185),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,u=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,u),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,u)-t.y,t}};t.exports=o},function(t,e){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var o=this.currentMatrix,a=o[0],h=o[1],u=o[2],l=o[3],c=o[4],d=o[5];return o[0]=a*t+u*e,o[1]=h*t+l*e,o[2]=a*i+u*n,o[3]=h*i+l*n,o[4]=a*s+u*r+c,o[5]=h*s+l*r+d,this},setTransform:function(t,e,i,n,s,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=n*t+r*e+a,i[5]=s*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+s*o,e[1]=n*a+r*o,e[2]=s*-o+s*a,e[3]=r*-o+r*a,this}};t.exports=i},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(162),r=i(163),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)u=(c=t[h]).x,l=c.y,c.x=o,c.y=a,o=u,a=l;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(114),CameraManager:i(445)}},function(t,e,i){var n=i(114),s=i(0),r=i(2),o=i(12),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(211),r=i(212),o=i(12),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new l(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(224);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,u=2*i-h;r=s(u,h,t+1/3),o=s(u,h,t),a=s(u,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(225);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(226),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var u=h/a;return{r:n(t,s,u),g:n(e,r,u),b:n(i,o,u)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(228),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(45),s=i(234);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(125),o=i(42),a=i(507),h=i(508),u=i(511),l=i(237),c=i(238),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,u){var l=this.gl,c=l.createTexture();return u=void 0===u||null===u||u,this.setTexture2D(c,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,e),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,i),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,s),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),null===o||void 0===o?l.texImage2D(l.TEXTURE_2D,t,r,a,h,0,r,l.UNSIGNED_BYTE,null):(l.texImage2D(l.TEXTURE_2D,t,r,r,l.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=u,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this.gl.deleteTexture(t),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var u=0;uthis.vertexCapacity&&this.flush();this.renderer.config.resolution;var x=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount,T=r+a,A=o+h,S=m[0],C=m[1],M=m[2],E=m[3],_=d*S+f*M,L=d*C+f*E,P=p*S+g*M,F=p*C+g*E,k=v*S+y*M+m[4],R=v*C+y*E+m[5],O=r*_+o*P+k,D=r*L+o*F+R,I=r*_+A*P+k,B=r*L+A*F+R,Y=T*_+A*P+k,X=T*L+A*F+R,z=T*_+o*P+k,N=T*L+o*F+R,W=u.getTintAppendFloatAlphaAndSwap(l,c);x[b+0]=O,x[b+1]=D,w[b+2]=W,x[b+3]=I,x[b+4]=B,w[b+5]=W,x[b+6]=Y,x[b+7]=X,w[b+8]=W,x[b+9]=O,x[b+10]=D,w[b+11]=W,x[b+12]=Y,x[b+13]=X,w[b+14]=W,x[b+15]=z,x[b+16]=N,w[b+17]=W,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var b=this.vertexViewF32,T=this.vertexViewU32,A=this.vertexCount*this.vertexComponentCount,S=w[0],C=w[1],M=w[2],E=w[3],_=p*S+g*M,L=p*C+g*E,P=v*S+y*M,F=v*C+y*E,k=m*S+x*M+w[4],R=m*C+x*E+w[5],O=r*_+o*P+k,D=r*L+o*F+R,I=a*_+h*P+k,B=a*L+h*F+R,Y=l*_+c*P+k,X=l*L+c*F+R,z=u.getTintAppendFloatAlphaAndSwap(d,f);b[A+0]=O,b[A+1]=D,T[A+2]=z,b[A+3]=I,b[A+4]=B,T[A+5]=z,b[A+6]=Y,b[A+7]=X,T[A+8]=z,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,y,m,x,w){var b=this.tempTriangle;b[0].x=r,b[0].y=o,b[0].width=c,b[0].rgb=d,b[0].alpha=f,b[1].x=a,b[1].y=h,b[1].width=c,b[1].rgb=d,b[1].alpha=f,b[2].x=u,b[2].y=l,b[2].width=c,b[2].rgb=d,b[2].alpha=f,b[3].x=r,b[3].y=o,b[3].width=c,b[3].rgb=d,b[3].alpha=f,this.batchStrokePath(t,e,i,n,s,b,c,d,f,p,g,v,y,m,x,!1,w)},batchFillPath:function(t,e,i,n,s,o,a,h,l,c,d,f,p,g,v){this.renderer.setPipeline(this);this.renderer.config.resolution;for(var y,m,x,w,b,T,A,S,C,M,E,_,L,P,F,k,R,O=o.length,D=this.polygonCache,I=this.vertexViewF32,B=this.vertexViewU32,Y=0,X=v[0],z=v[1],N=v[2],W=v[3],G=l*X+c*N,U=l*z+c*W,V=d*X+f*N,H=d*z+f*W,j=p*X+g*N+v[4],q=p*z+g*W+v[5],K=u.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,_=(T=D[x+0])*G+(A=D[x+1])*V+j,L=T*U+A*H+q,P=(S=D[w+0])*G+(C=D[w+1])*V+j,F=S*U+C*H+q,k=(M=D[b+0])*G+(E=D[b+1])*V+j,R=M*U+E*H+q,I[Y+0]=_,I[Y+1]=L,B[Y+2]=K,I[Y+3]=P,I[Y+4]=F,B[Y+5]=K,I[Y+6]=k,I[Y+7]=R,B[Y+8]=K,this.vertexCount+=3;D.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var w,b,T,A,S=r.length,C=this.polygonCache,M=this.vertexViewF32,E=this.vertexViewU32,_=u.getTintAppendFloatAlphaAndSwap,L=0;L+1this.vertexCapacity&&this.flush(),w=C[P-1]||C[F-1],b=C[P],M[(T=this.vertexCount*this.vertexComponentCount)+0]=w[6],M[T+1]=w[7],E[T+2]=_(w[8],h),M[T+3]=w[0],M[T+4]=w[1],E[T+5]=_(w[2],h),M[T+6]=b[9],M[T+7]=b[10],E[T+8]=_(b[11],h),M[T+9]=w[0],M[T+10]=w[1],E[T+11]=_(w[2],h),M[T+12]=w[6],M[T+13]=w[7],E[T+14]=_(w[8],h),M[T+15]=b[3],M[T+16]=b[4],E[T+17]=_(b[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,l,c,d,f,p,g,v,y,m,x,w,b){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var T=b[0],A=b[1],S=b[2],C=b[3],M=g*T+v*S,E=g*A+v*C,_=y*T+m*S,L=y*A+m*C,P=x*T+w*S+b[4],F=x*A+w*C+b[5],k=this.vertexViewF32,R=this.vertexViewU32,O=a-r,D=h-o,I=Math.sqrt(O*O+D*D),B=l*(h-o)/I,Y=l*(r-a)/I,X=c*(h-o)/I,z=c*(r-a)/I,N=a-X,W=h-z,G=r-B,U=o-Y,V=a+X,H=h+z,j=r+B,q=o+Y,K=N*M+W*_+P,J=N*E+W*L+F,Z=G*M+U*_+P,Q=G*E+U*L+F,$=V*M+H*_+P,tt=V*E+H*L+F,et=j*M+q*_+P,it=j*E+q*L+F,nt=u.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return k[ot+0]=K,k[ot+1]=J,R[ot+2]=rt,k[ot+3]=Z,k[ot+4]=Q,R[ot+5]=st,k[ot+6]=$,k[ot+7]=tt,R[ot+8]=rt,k[ot+9]=Z,k[ot+10]=Q,R[ot+11]=st,k[ot+12]=et,k[ot+13]=it,R[ot+14]=st,k[ot+15]=$,k[ot+16]=tt,R[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i,n,r=e.scrollX*t.scrollFactorX,o=e.scrollY*t.scrollFactorY,a=t.x-r,h=t.y-o,u=t.scaleX,l=t.scaleY,y=-t.rotation,m=t.commandBuffer,x=1,w=1,b=0,T=0,A=1,S=e.matrix.matrix,C=null,M=0,E=0,_=0,L=0,P=0,F=0,k=0,R=0,O=0,D=null,I=Math.sin,B=Math.cos,Y=I(y),X=B(y),z=X*u,N=-Y*u,W=Y*l,G=X*l,U=a,V=h,H=S[0],j=S[1],q=S[2],K=S[3],J=z*H+N*q,Z=z*j+N*K,Q=W*H+G*q,$=W*j+G*K,tt=U*H+V*q+S[4],et=U*j+V*K+S[5];v.length=0;for(var it=0,nt=m.length;it0){var st=C.points[0],rt=C.points[C.points.length-1];C.points.push(st),C=new d(rt.x,rt.y,rt.width,rt.rgb,rt.alpha),v.push(C)}break;case s.FILL_PATH:for(i=0,n=v.length;i=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(2),s=i(253);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,w=0;wr&&(m=b-r),T>o&&(x=T-o),t.add(w,e,i+v,s+y,h-m,u-x),(v+=h+p)+h>r&&(v=f,y+=u+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),u=n(i,"margin",0),l=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+l)/(s+l)),m=Math.floor((v-u+l)/(r+l)),x=y*m,w=e.x,b=s-w,T=s-(g-f-w),A=e.y,S=r-A,C=r-(v-p-A);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=u,E=u,_=0,L=e.sourceIndex,P=0;P0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(544),GameObjectCreator:i(13),GameObjectFactory:i(9),UpdateList:i(545),Components:i(11),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(289),RenderTexture:i(139),Sprite3D:i(81),Sprite:i(37),Text:i(140),TileSprite:i(141),Zone:i(77),Factories:{Blitter:i(628),DynamicBitmapText:i(629),Graphics:i(630),Group:i(631),Image:i(632),Particles:i(633),PathFollower:i(634),RenderTexture:i(635),Sprite3D:i(636),Sprite:i(637),StaticBitmapText:i(638),Text:i(639),TileSprite:i(640),Zone:i(641)},Creators:{Blitter:i(642),DynamicBitmapText:i(643),Graphics:i(644),Group:i(645),Image:i(646),Particles:i(647),RenderTexture:i(648),Sprite3D:i(649),Sprite:i(650),StaticBitmapText:i(651),Text:i(652),TileSprite:i(653),Zone:i(654)}};n.Mesh=i(88),n.Quad=i(143),n.Factories.Mesh=i(658),n.Factories.Quad=i(659),n.Creators.Mesh=i(660),n.Creators.Quad=i(661),n.Light=i(291),i(292),i(662),t.exports=n},function(t,e,i){var n=i(0),s=i(86),r=i(12),o=i(266),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(12),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=u,g=l,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(549),s=i(550),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,l=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,w=0,b=0,T=0,A=null,S=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,L=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-u+e.frame.y),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var P=0;P0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode);for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,u=0;u0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,u=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,w=0,b=0,T=0,A=0,S=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,L=a.cutY,P=0,F=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.translate(-e.displayOriginX,-e.displayOriginY),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var k=0;k0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(568),s=i(273),s=i(273),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(570),s=i(571),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var l=s.splice(s.length-u,u),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=i(0),s=i(275),r=i(71),o=i(2),a=i(50),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(276),s=i(277),r=i(278),o=i(279),a=i(280),h=i(281),u=i(282),l=i(283),c=i(284),d=i(285),f=i(286),p=i(287);t.exports={Power0:u,Power1:l.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:u,Quad:l.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(41),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),u=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,l=Math.atan2(u-this.y,h-this.x),c=r(this.x,this.y,h,u)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,u=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>u?r=u:r<-u&&(r=-u),this.velocityX=s,this.velocityY=r;for(var l=0;le.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,w=y.canvasData,b=-m,T=-x;l.globalAlpha=v,l.save(),l.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),l.rotate(g.rotation),l.scale(g.scaleX,g.scaleY),l.drawImage(y.source.image,w.sx,w.sy,w.sWidth,w.sHeight,b,T,w.dWidth,w.dHeight),l.restore()}}l.globalAlpha=c}}}},function(t,e){t.exports={fill:function(t){return this},clear:function(){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;return t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},draw:function(t,e,i){return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.drawTexture(t,e,i,0,0,t.width,t.height,this.currentMatrix),this.renderer.setFramebuffer(null),this},drawFrame:function(t,e,i,n){return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.drawTexture(t,n.x,n.y,n.width,n.height,t.width,t.height,this.currentMatrix),this.renderer.setFramebuffer(null),this}}},function(t,e,i){var n=i(3),s=i(3);n=i(617),s=i(618),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchTexture(e,e.texture,e.texture.width,e.texture.height,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.texture.width,e.texture.height,4294967295,4294967295,4294967295,4294967295,0,0,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&(e.cameraFilter,s._id)}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(621),s=i(622),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(624),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(21);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,u,l=i.getImageData(0,0,s,o).data,c=l.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(u=0;u0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(289);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(9),s=i(139);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(140);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(141);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(19),r=i(13),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(19),r=i(13),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(13),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(13),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(13),s=i(10),r=i(2),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(19),s=(i(142),i(13)),r=i(10),o=i(139);s.register("renderTexture",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",32),a=r(t,"height",32),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(19),s=i(142),r=i(13),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(19),s=i(142),r=i(13),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(19),r=i(13),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(140);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(141);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),u=r(t,"frame",""),l=new o(this.scene,e,i,s,a,h,u);return n(this.scene,l,t),l})},function(t,e,i){var n=i(13),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(656),s=i(657),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e,i){var n=i(143);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),u=o(t,"alphas",[]),l=o(t,"uv",[]),c=new a(this.scene,0,0,s,l,h,u,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(143);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(292),r=i(12),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(664),n.Circumference=i(183),n.CircumferencePoint=i(104),n.Clone=i(665),n.Contains=i(32),n.ContainsPoint=i(666),n.ContainsRect=i(667),n.CopyFrom=i(668),n.Equals=i(669),n.GetBounds=i(670),n.GetPoint=i(181),n.GetPoints=i(182),n.Offset=i(671),n.OffsetPoint=i(672),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(41);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,u=r-n;return h*h+u*u<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(295);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,u=e.bottom,l=0;if(i>=o&&i<=h&&n>=a&&n<=u||s>=o&&s<=h&&r>=a&&r<=u)return!0;if(i=o){if((l=n+(r-n)*(o-i)/(s-i))>a&&l<=u)return!0}else if(i>h&&s<=h&&(l=n+(r-n)*(h-i)/(s-i))>=a&&l<=u)return!0;if(n=a){if((l=i+(s-i)*(a-n)/(r-n))>=o&&l<=h)return!0}else if(n>u&&r<=u&&(l=i+(s-i)*(u-n)/(r-n))>=o&&l<=h)return!0;return!1}},function(t,e,i){var n=i(297);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(144),o=i(298);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(300);n.Angle=i(54),n.BresenhamPoints=i(191),n.CenterOn=i(684),n.Clone=i(685),n.CopyFrom=i(686),n.Equals=i(687),n.GetMidPoint=i(688),n.GetNormal=i(689),n.GetPoint=i(301),n.GetPoints=i(108),n.Height=i(690),n.Length=i(65),n.NormalAngle=i(302),n.NormalX=i(691),n.NormalY=i(692),n.Offset=i(693),n.PerpSlope=i(694),n.Random=i(110),n.ReflectAngle=i(695),n.Rotate=i(696),n.RotateAroundPoint=i(697),n.RotateAroundXY=i(145),n.SetToAngle=i(698),n.Slope=i(699),n.Width=i(700),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(300);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(302);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(145);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(145);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(702),n.Clone=i(703),n.CopyFrom=i(704),n.Equals=i(705),n.Floor=i(706),n.GetCentroid=i(707),n.GetMagnitude=i(303),n.GetMagnitudeSq=i(304),n.GetRectangleFromPoints=i(708),n.Interpolate=i(709),n.Invert=i(710),n.Negative=i(711),n.Project=i(712),n.ProjectUnit=i(713),n.SetMagnitude=i(714),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(307);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var u=[];for(i=0;i1&&(this.sortGameObjects(u),this.topOnly&&u.splice(1)),this._drag[t.id]=u,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var l=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),l[0]?(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&l[0]&&(a.target=l[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(244),Key:i(245),KeyCodes:i(128),KeyCombo:i(246),JustDown:i(767),JustUp:i(768),DownDuration:i(769),UpDuration:i(770)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],l=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});l.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(792),Distance:i(800),Easing:i(803),Fuzzy:i(804),Interpolation:i(810),Pow2:i(813),Snap:i(815),Average:i(819),Bernstein:i(321),Between:i(228),CatmullRom:i(122),CeilTo:i(820),Clamp:i(60),DegToRad:i(35),Difference:i(821),Factorial:i(322),FloatBetween:i(275),FloorTo:i(822),FromPercent:i(64),GetSpeed:i(823),IsEven:i(824),IsEvenStrict:i(825),Linear:i(227),MaxAdd:i(826),MinSub:i(827),Percent:i(828),RadToDeg:i(218),RandomXY:i(829),RandomXYZ:i(206),RandomXYZW:i(207),Rotate:i(323),RotateAround:i(185),RotateAroundDistance:i(112),RoundAwayFromZero:i(324),RoundTo:i(830),SinCosTableGenerator:i(831),SmootherStep:i(192),SmoothStep:i(193),TransformXY:i(250),Within:i(832),Wrap:i(50),Vector2:i(6),Vector3:i(51),Vector4:i(119),Matrix3:i(210),Matrix4:i(118),Quaternion:i(209),RotateVec3:i(208)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(793),BetweenY:i(794),BetweenPoints:i(795),BetweenPointsY:i(796),Reverse:i(797),RotateTo:i(798),ShortestBetween:i(799),Normalize:i(320),Wrap:i(162),WrapDegrees:i(163)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(320);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(816),Floor:i(817),To:i(818)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h=0;o--){var a=e[o],h=u(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=u(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(l(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(849),s=i(851),r=i(338);t.exports=function(t,e,i,o,a,h){var u=o.left,l=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(852);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(333);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.x=l+h*t.bounce.x,e.velocity.x=l+u*e.bounce.x}return!0}},function(t,e,i){var n=i(334);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),u=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),l=.5*(h+u);h-=l,u-=l,t.velocity.y=l+h*t.bounce.y,e.velocity.y=l+u*e.bounce.y}return!0}},,,,,,,,,,function(t,e,i){t.exports={SceneManager:i(251),ScenePlugin:i(865),Settings:i(254),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(83),r=i(12),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t,e))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(255),BaseSound:i(85),BaseSoundManager:i(84),WebAudioSound:i(261),WebAudioSoundManager:i(260),HTML5AudioSound:i(257),HTML5AudioSoundManager:i(256),NoAudioSound:i(259),NoAudioSoundManager:i(258)}},function(t,e,i){t.exports={List:i(86),Map:i(113),ProcessQueue:i(335),RTree:i(336),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(263),FilterMode:i(869),Frame:i(130),Texture:i(264),TextureManager:i(262),TextureSource:i(265)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(900),Formats:i(20),ImageCollection:i(350),ParseToTilemap:i(156),Tile:i(44),Tilemap:i(354),TilemapCreator:i(917),TilemapFactory:i(918),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(352),DynamicTilemapLayer:i(355),StaticTilemapLayer:i(356)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,u){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var l=n(t,e,i,r,null,u),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var u=0;u=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(43),s=i(34),r=i(154);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(l,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(l,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===u.width&&(f.push(d),c=0,d=[])}l.data=f,i.push(l)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(2);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,l,o.tilesize,o.tilesize):e?null:new s(a,-1,c,l,o.tilesize,o.tilesize),h.push(d)}u.push(h),h=[]}a.data=u,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,u=e.x-s.scrollX*e.scrollFactorX,l=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(u,l),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,u=o.image.getSourceImage(),l=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(l,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Source object -// The key as a string, can only be 1 level deep (no periods), must exist at the top level of the source object -// The default value to use if the key doesn't exist - -/** - * [description] - * - * @function Phaser.Utils.Object.GetFastValue - * @since 3.0.0 - * - * @param {object} source - [description] - * @param {string} key - [description] - * @param {any} defaultValue - [description] - * - * @return {any} [description] - */ -var GetFastValue = function (source, key, defaultValue) -{ - var t = typeof(source); - - if (!source || t === 'number' || t === 'string') - { - return defaultValue; - } - else if (source.hasOwnProperty(key) && source[key] !== undefined) - { - return source[key]; - } - else - { - return defaultValue; - } -}; - -module.exports = GetFastValue; - - -/***/ }), -/* 2 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -369,9 +322,9 @@ module.exports = GetFastValue; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var DataManager = __webpack_require__(79); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); /** * @classdesc @@ -737,6 +690,53 @@ GameObject.RENDER_MASK = 15; module.exports = GameObject; +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Source object +// The key as a string, can only be 1 level deep (no periods), must exist at the top level of the source object +// The default value to use if the key doesn't exist + +/** + * [description] + * + * @function Phaser.Utils.Object.GetFastValue + * @since 3.0.0 + * + * @param {object} source - [description] + * @param {string} key - [description] + * @param {any} defaultValue - [description] + * + * @return {any} [description] + */ +var GetFastValue = function (source, key, defaultValue) +{ + var t = typeof(source); + + if (!source || t === 'number' || t === 'string') + { + return defaultValue; + } + else if (source.hasOwnProperty(key) && source[key] !== undefined) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetFastValue; + + /***/ }), /* 3 */ /***/ (function(module, exports) { @@ -1518,7 +1518,7 @@ module.exports = FileTypesManager; var Class = __webpack_require__(0); var Contains = __webpack_require__(33); var GetPoint = __webpack_require__(106); -var GetPoints = __webpack_require__(182); +var GetPoints = __webpack_require__(184); var Random = __webpack_require__(107); /** @@ -1971,7 +1971,7 @@ module.exports = Rectangle; */ var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -2216,6 +2216,45 @@ module.exports = GetAdvancedValue; /* 11 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(381), + Animation: __webpack_require__(364), + BlendMode: __webpack_require__(382), + ComputedSize: __webpack_require__(383), + Depth: __webpack_require__(384), + Flip: __webpack_require__(385), + GetBounds: __webpack_require__(386), + MatrixStack: __webpack_require__(387), + Origin: __webpack_require__(388), + Pipeline: __webpack_require__(186), + ScaleMode: __webpack_require__(389), + ScrollFactor: __webpack_require__(390), + Size: __webpack_require__(391), + Texture: __webpack_require__(392), + Tint: __webpack_require__(393), + ToJSON: __webpack_require__(394), + Transform: __webpack_require__(395), + TransformMatrix: __webpack_require__(187), + Visible: __webpack_require__(396) + +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -2379,7 +2418,7 @@ var PluginManager = new Class({ * Plugin is the object to instantiate to create the plugin * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input) * - * @name PluginManager.register + * @method PluginManager.register * @since 3.0.0 * * @param {string} key - [description] @@ -2395,7 +2434,7 @@ module.exports = PluginManager; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2404,36 +2443,137 @@ module.exports = PluginManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ +var Class = __webpack_require__(0); +var PluginManager = __webpack_require__(12); + /** - * @namespace Phaser.GameObjects.Components + * @classdesc + * The Game Object Creator is a Scene plugin that allows you to quickly create many common + * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically + * added to the Scene. + * + * Game Objects directly register themselves with the Creator and inject their own creation + * methods into the class. + * + * @class GameObjectCreator + * @memberOf Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. */ +var GameObjectCreator = new Class({ -module.exports = { + initialize: - Alpha: __webpack_require__(380), - Animation: __webpack_require__(363), - BlendMode: __webpack_require__(381), - ComputedSize: __webpack_require__(382), - Depth: __webpack_require__(383), - Flip: __webpack_require__(384), - GetBounds: __webpack_require__(385), - Origin: __webpack_require__(386), - Pipeline: __webpack_require__(184), - ScaleMode: __webpack_require__(387), - ScrollFactor: __webpack_require__(388), - Size: __webpack_require__(389), - Texture: __webpack_require__(390), - Tint: __webpack_require__(391), - ToJSON: __webpack_require__(392), - Transform: __webpack_require__(393), - TransformMatrix: __webpack_require__(185), - Visible: __webpack_require__(394) + function GameObjectCreator (scene) + { + /** + * The Scene to which this Game Object Creator belongs. + * + * @name Phaser.GameObjects.GameObjectCreator#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + /** + * A reference to the Scene.Systems. + * + * @name Phaser.GameObjects.GameObjectCreator#systems + * @type {Phaser.Scenes.Systems} + * @protected + * @since 3.0.0 + */ + this.systems = scene.sys; + + if (!scene.sys.settings.isBooted) + { + scene.sys.events.once('boot', this.boot, this); + } + + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.GameObjectCreator#displayList + * @type {Phaser.GameObjects.DisplayList} + * @protected + * @since 3.0.0 + */ + this.displayList; + + /** + * A reference to the Scene Update List. + * + * @name Phaser.GameObjects.GameObjectCreator#updateList; + * @type {Phaser.GameObjects.UpdateList} + * @protected + * @since 3.0.0 + */ + this.updateList; + }, + + /** + * Boots the plugin. + * + * @method Phaser.GameObjects.GameObjectCreator#boot + * @private + * @since 3.0.0 + */ + boot: function () + { + this.displayList = this.systems.displayList; + this.updateList = this.systems.updateList; + + var eventEmitter = this.systems.events; + + eventEmitter.on('shutdown', this.shutdown, this); + eventEmitter.on('destroy', this.destroy, this); + }, + + /** + * Shuts this plugin down. + * + * @method Phaser.GameObjects.GameObjectCreator#shutdown + * @since 3.0.0 + */ + shutdown: function () + { + }, + + /** + * Destroys this plugin. + * + * @method Phaser.GameObjects.GameObjectCreator#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.scene = null; + this.displayList = null; + this.updateList = null; + } + +}); + +// Static method called directly by the Game Object creator functions + +GameObjectCreator.register = function (type, factoryFunction) +{ + if (!GameObjectCreator.prototype.hasOwnProperty(type)) + { + GameObjectCreator.prototype[type] = factoryFunction; + } }; +PluginManager.register('GameObjectCreator', GameObjectCreator, 'make'); + +module.exports = GameObjectCreator; + /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2775,145 +2915,6 @@ if (true) { } -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); - -/** - * @classdesc - * The Game Object Creator is a Scene plugin that allows you to quickly create many common - * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically - * added to the Scene. - * - * Game Objects directly register themselves with the Creator and inject their own creation - * methods into the class. - * - * @class GameObjectCreator - * @memberOf Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs. - */ -var GameObjectCreator = new Class({ - - initialize: - - function GameObjectCreator (scene) - { - /** - * The Scene to which this Game Object Creator belongs. - * - * @name Phaser.GameObjects.GameObjectCreator#scene - * @type {Phaser.Scene} - * @protected - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A reference to the Scene.Systems. - * - * @name Phaser.GameObjects.GameObjectCreator#systems - * @type {Phaser.Scenes.Systems} - * @protected - * @since 3.0.0 - */ - this.systems = scene.sys; - - if (!scene.sys.settings.isBooted) - { - scene.sys.events.once('boot', this.boot, this); - } - - /** - * A reference to the Scene Display List. - * - * @name Phaser.GameObjects.GameObjectCreator#displayList - * @type {Phaser.GameObjects.DisplayList} - * @protected - * @since 3.0.0 - */ - this.displayList; - - /** - * A reference to the Scene Update List. - * - * @name Phaser.GameObjects.GameObjectCreator#updateList; - * @type {Phaser.GameObjects.UpdateList} - * @protected - * @since 3.0.0 - */ - this.updateList; - }, - - /** - * Boots the plugin. - * - * @method Phaser.GameObjects.GameObjectCreator#boot - * @private - * @since 3.0.0 - */ - boot: function () - { - this.displayList = this.systems.displayList; - this.updateList = this.systems.updateList; - - var eventEmitter = this.systems.events; - - eventEmitter.on('shutdown', this.shutdown, this); - eventEmitter.on('destroy', this.destroy, this); - }, - - /** - * Shuts this plugin down. - * - * @method Phaser.GameObjects.GameObjectCreator#shutdown - * @since 3.0.0 - */ - shutdown: function () - { - }, - - /** - * Destroys this plugin. - * - * @method Phaser.GameObjects.GameObjectCreator#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.scene = null; - this.displayList = null; - this.updateList = null; - } - -}); - -// Static method called directly by the Game Object creator functions - -GameObjectCreator.register = function (type, factoryFunction) -{ - if (!GameObjectCreator.prototype.hasOwnProperty(type)) - { - GameObjectCreator.prototype[type] = factoryFunction; - } -}; - -PluginManager.register('GameObjectCreator', GameObjectCreator, 'make'); - -module.exports = GameObjectCreator; - - /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { @@ -2924,7 +2925,7 @@ module.exports = GameObjectCreator; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. @@ -3013,7 +3014,7 @@ module.exports = GetTilesWithin; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RND = __webpack_require__(379); +var RND = __webpack_require__(380); var MATH_CONST = { @@ -3267,10 +3268,10 @@ module.exports = FILE_CONST; var Class = __webpack_require__(0); var CONST = __webpack_require__(17); -var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(147); -var MergeXHRSettings = __webpack_require__(148); -var XHRLoader = __webpack_require__(313); +var GetFastValue = __webpack_require__(2); +var GetURL = __webpack_require__(149); +var MergeXHRSettings = __webpack_require__(150); +var XHRLoader = __webpack_require__(314); var XHRSettings = __webpack_require__(90); /** @@ -3533,7 +3534,7 @@ var File = new Class({ if (this.src.indexOf('data:') === 0) { - console.log('Local data URI'); + console.warn('Local data URIs are not supported: ' + this.key); } else { @@ -3703,6 +3704,139 @@ module.exports = File; /***/ }), /* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var BlendModes = __webpack_require__(45); +var GetAdvancedValue = __webpack_require__(10); +var ScaleModes = __webpack_require__(62); + +/** + * Builds a Game Object using the provided configuration object. + * + * @function Phaser.Gameobjects.BuildGameObject + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {object} config - [description] + * + * @return {Phaser.GameObjects.GameObject} The built Game Object. + */ +var BuildGameObject = function (scene, gameObject, config) +{ + // Position + + gameObject.x = GetAdvancedValue(config, 'x', 0); + gameObject.y = GetAdvancedValue(config, 'y', 0); + gameObject.depth = GetAdvancedValue(config, 'depth', 0); + + // Flip + + gameObject.flipX = GetAdvancedValue(config, 'flipX', false); + gameObject.flipY = GetAdvancedValue(config, 'flipY', false); + + // Scale + // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} + + var scale = GetAdvancedValue(config, 'scale', null); + + if (typeof scale === 'number') + { + gameObject.setScale(scale); + } + else if (scale !== null) + { + gameObject.scaleX = GetAdvancedValue(scale, 'x', 1); + gameObject.scaleY = GetAdvancedValue(scale, 'y', 1); + } + + // ScrollFactor + // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} + + var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null); + + if (typeof scrollFactor === 'number') + { + gameObject.setScrollFactor(scrollFactor); + } + else if (scrollFactor !== null) + { + gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1); + gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1); + } + + // Rotation + + gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); + + var angle = GetAdvancedValue(config, 'angle', null); + + if (angle !== null) + { + gameObject.angle = angle; + } + + // Alpha + + gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); + + // Origin + // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} + + var origin = GetAdvancedValue(config, 'origin', null); + + if (typeof origin === 'number') + { + gameObject.setOrigin(origin); + } + else if (origin !== null) + { + var ox = GetAdvancedValue(origin, 'x', 0.5); + var oy = GetAdvancedValue(origin, 'y', 0.5); + + gameObject.setOrigin(ox, oy); + } + + // ScaleMode + + gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT); + + // BlendMode + + gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); + + // Visible + + gameObject.visible = GetAdvancedValue(config, 'visible', true); + + // Add to Scene + + var add = GetAdvancedValue(config, 'add', true); + + if (add) + { + scene.sys.displayList.add(gameObject); + } + + if (gameObject.preUpdate) + { + scene.sys.updateList.add(gameObject); + } + + return gameObject; +}; + +module.exports = BuildGameObject; + + +/***/ }), +/* 20 */ /***/ (function(module, exports) { /** @@ -3757,7 +3891,7 @@ module.exports = { /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4001,139 +4135,6 @@ var CanvasPool = function () module.exports = CanvasPool(); -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BlendModes = __webpack_require__(45); -var GetAdvancedValue = __webpack_require__(10); -var ScaleModes = __webpack_require__(62); - -/** - * Builds a Game Object using the provided configuration object. - * - * @function Phaser.Gameobjects.BuildGameObject - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {object} config - [description] - * - * @return {Phaser.GameObjects.GameObject} The built Game Object. - */ -var BuildGameObject = function (scene, gameObject, config) -{ - // Position - - gameObject.x = GetAdvancedValue(config, 'x', 0); - gameObject.y = GetAdvancedValue(config, 'y', 0); - gameObject.depth = GetAdvancedValue(config, 'depth', 0); - - // Flip - - gameObject.flipX = GetAdvancedValue(config, 'flipX', false); - gameObject.flipY = GetAdvancedValue(config, 'flipY', false); - - // Scale - // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} - - var scale = GetAdvancedValue(config, 'scale', null); - - if (typeof scale === 'number') - { - gameObject.setScale(scale); - } - else if (scale !== null) - { - gameObject.scaleX = GetAdvancedValue(scale, 'x', 1); - gameObject.scaleY = GetAdvancedValue(scale, 'y', 1); - } - - // ScrollFactor - // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} - - var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null); - - if (typeof scrollFactor === 'number') - { - gameObject.setScrollFactor(scrollFactor); - } - else if (scrollFactor !== null) - { - gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1); - gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1); - } - - // Rotation - - gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); - - var angle = GetAdvancedValue(config, 'angle', null); - - if (angle !== null) - { - gameObject.angle = angle; - } - - // Alpha - - gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); - - // Origin - // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} - - var origin = GetAdvancedValue(config, 'origin', null); - - if (typeof origin === 'number') - { - gameObject.setOrigin(origin); - } - else if (origin !== null) - { - var ox = GetAdvancedValue(origin, 'x', 0.5); - var oy = GetAdvancedValue(origin, 'y', 0.5); - - gameObject.setOrigin(ox, oy); - } - - // ScaleMode - - gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT); - - // BlendMode - - gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); - - // Visible - - gameObject.visible = GetAdvancedValue(config, 'visible', true); - - // Add to Scene - - var add = GetAdvancedValue(config, 'add', true); - - if (add) - { - scene.sys.displayList.add(gameObject); - } - - if (gameObject.preUpdate) - { - scene.sys.updateList.add(gameObject); - } - - return gameObject; -}; - -module.exports = BuildGameObject; - - /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { @@ -4153,7 +4154,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.1.1', + VERSION: '3.1.2', BlendModes: __webpack_require__(45), @@ -4265,7 +4266,7 @@ module.exports = CONST; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var IsPlainObject = __webpack_require__(165); +var IsPlainObject = __webpack_require__(167); // @param {boolean} deep - Perform a deep copy? // @param {object} target - The target object to copy to. @@ -4773,7 +4774,7 @@ module.exports = DegToRad; var Class = __webpack_require__(0); var GetColor = __webpack_require__(116); -var GetColor32 = __webpack_require__(199); +var GetColor32 = __webpack_require__(201); /** * @classdesc @@ -5286,9 +5287,9 @@ module.exports = Color; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var SpriteRender = __webpack_require__(445); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var SpriteRender = __webpack_require__(447); /** * @classdesc @@ -6283,8 +6284,8 @@ module.exports = SetTileCollision; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(305); +var Components = __webpack_require__(11); +var Rectangle = __webpack_require__(306); /** * @classdesc @@ -6329,7 +6330,7 @@ var Tile = new Class({ /** * The LayerData in the Tilemap data that this tile belongs to. * - * @name Phaser.Tilemaps.ImageCollection#layer + * @name Phaser.Tilemaps.Tile#layer * @type {Phaser.Tilemaps.LayerData} * @since 3.0.0 */ @@ -6339,7 +6340,7 @@ var Tile = new Class({ * The index of this tile within the map data corresponding to the tileset, or -1 if this * represents a blank tile. * - * @name Phaser.Tilemaps.ImageCollection#index + * @name Phaser.Tilemaps.Tile#index * @type {integer} * @since 3.0.0 */ @@ -6348,7 +6349,7 @@ var Tile = new Class({ /** * The x map coordinate of this tile in tile units. * - * @name Phaser.Tilemaps.ImageCollection#x + * @name Phaser.Tilemaps.Tile#x * @type {integer} * @since 3.0.0 */ @@ -6357,7 +6358,7 @@ var Tile = new Class({ /** * The y map coordinate of this tile in tile units. * - * @name Phaser.Tilemaps.ImageCollection#y + * @name Phaser.Tilemaps.Tile#y * @type {integer} * @since 3.0.0 */ @@ -6366,7 +6367,7 @@ var Tile = new Class({ /** * The width of the tile in pixels. * - * @name Phaser.Tilemaps.ImageCollection#width + * @name Phaser.Tilemaps.Tile#width * @type {integer} * @since 3.0.0 */ @@ -6375,7 +6376,7 @@ var Tile = new Class({ /** * The height of the tile in pixels. * - * @name Phaser.Tilemaps.ImageCollection#height + * @name Phaser.Tilemaps.Tile#height * @type {integer} * @since 3.0.0 */ @@ -6385,7 +6386,7 @@ var Tile = new Class({ * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes * within one map, but they are still placed at intervals of the base tile size. * - * @name Phaser.Tilemaps.ImageCollection#baseWidth + * @name Phaser.Tilemaps.Tile#baseWidth * @type {integer} * @since 3.0.0 */ @@ -6395,7 +6396,7 @@ var Tile = new Class({ * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes * within one map, but they are still placed at intervals of the base tile size. * - * @name Phaser.Tilemaps.ImageCollection#baseHeight + * @name Phaser.Tilemaps.Tile#baseHeight * @type {integer} * @since 3.0.0 */ @@ -6406,7 +6407,7 @@ var Tile = new Class({ * of the layer this tile is being rendered within. This property does NOT factor in camera * scroll, layer scale or layer position. * - * @name Phaser.Tilemaps.ImageCollection#pixelX + * @name Phaser.Tilemaps.Tile#pixelX * @type {number} * @since 3.0.0 */ @@ -6417,7 +6418,7 @@ var Tile = new Class({ * of the layer this tile is being rendered within. This property does NOT factor in camera * scroll, layer scale or layer position. * - * @name Phaser.Tilemaps.ImageCollection#pixelY + * @name Phaser.Tilemaps.Tile#pixelY * @type {number} * @since 3.0.0 */ @@ -6428,7 +6429,7 @@ var Tile = new Class({ /** * Tile specific properties. These usually come from Tiled. * - * @name Phaser.Tilemaps.ImageCollection#properties + * @name Phaser.Tilemaps.Tile#properties * @type {object} * @since 3.0.0 */ @@ -6437,7 +6438,7 @@ var Tile = new Class({ /** * The rotation angle of this tile. * - * @name Phaser.Tilemaps.ImageCollection#rotation + * @name Phaser.Tilemaps.Tile#rotation * @type {number} * @since 3.0.0 */ @@ -6446,7 +6447,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the left side. * - * @name Phaser.Tilemaps.ImageCollection#collideLeft + * @name Phaser.Tilemaps.Tile#collideLeft * @type {boolean} * @since 3.0.0 */ @@ -6455,7 +6456,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the right side. * - * @name Phaser.Tilemaps.ImageCollection#collideRight + * @name Phaser.Tilemaps.Tile#collideRight * @type {boolean} * @since 3.0.0 */ @@ -6464,7 +6465,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the top side. * - * @name Phaser.Tilemaps.ImageCollection#collideUp + * @name Phaser.Tilemaps.Tile#collideUp * @type {boolean} * @since 3.0.0 */ @@ -6473,7 +6474,7 @@ var Tile = new Class({ /** * Whether the tile should collide with any object on the bottom side. * - * @name Phaser.Tilemaps.ImageCollection#collideDown + * @name Phaser.Tilemaps.Tile#collideDown * @type {boolean} * @since 3.0.0 */ @@ -6482,7 +6483,7 @@ var Tile = new Class({ /** * Whether the tile's left edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceLeft + * @name Phaser.Tilemaps.Tile#faceLeft * @type {boolean} * @since 3.0.0 */ @@ -6491,7 +6492,7 @@ var Tile = new Class({ /** * Whether the tile's right edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceRight + * @name Phaser.Tilemaps.Tile#faceRight * @type {boolean} * @since 3.0.0 */ @@ -6500,7 +6501,7 @@ var Tile = new Class({ /** * Whether the tile's top edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceTop + * @name Phaser.Tilemaps.Tile#faceTop * @type {boolean} * @since 3.0.0 */ @@ -6509,7 +6510,7 @@ var Tile = new Class({ /** * Whether the tile's bottom edge is interesting for collisions. * - * @name Phaser.Tilemaps.ImageCollection#faceBottom + * @name Phaser.Tilemaps.Tile#faceBottom * @type {boolean} * @since 3.0.0 */ @@ -6518,7 +6519,7 @@ var Tile = new Class({ /** * Tile collision callback. * - * @name Phaser.Tilemaps.ImageCollection#collisionCallback + * @name Phaser.Tilemaps.Tile#collisionCallback * @type {function} * @since 3.0.0 */ @@ -6527,7 +6528,7 @@ var Tile = new Class({ /** * The context in which the collision callback will be called. * - * @name Phaser.Tilemaps.ImageCollection#collisionCallbackContext + * @name Phaser.Tilemaps.Tile#collisionCallbackContext * @type {object} * @since 3.0.0 */ @@ -6537,7 +6538,7 @@ var Tile = new Class({ * The tint to apply to this tile. Note: tint is currently a single color value instead of * the 4 corner tint component on other GameObjects. * - * @name Phaser.Tilemaps.ImageCollection#tint + * @name Phaser.Tilemaps.Tile#tint * @type {number} * @default * @since 3.0.0 @@ -6547,7 +6548,7 @@ var Tile = new Class({ /** * An empty object where physics-engine specific information (e.g. bodies) may be stored. * - * @name Phaser.Tilemaps.ImageCollection#physics + * @name Phaser.Tilemaps.Tile#physics * @type {object} * @since 3.0.0 */ @@ -7203,7 +7204,7 @@ module.exports = { /** * Hard Light blend mode. * - * @name Phaser.BlendModes.SOFT_LIGHT + * @name Phaser.BlendModes.HARD_LIGHT * @type {integer} * @since 3.0.0 */ @@ -8348,8 +8349,8 @@ module.exports = Angle; var Class = __webpack_require__(0); var Contains = __webpack_require__(53); -var GetPoint = __webpack_require__(307); -var GetPoints = __webpack_require__(308); +var GetPoint = __webpack_require__(308); +var GetPoints = __webpack_require__(309); var Random = __webpack_require__(111); /** @@ -8754,7 +8755,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -8870,7 +8871,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -9144,10 +9145,10 @@ module.exports = Body; var Vertices = __webpack_require__(93); var Vector = __webpack_require__(94); -var Sleeping = __webpack_require__(341); +var Sleeping = __webpack_require__(342); var Common = __webpack_require__(38); var Bounds = __webpack_require__(95); -var Axes = __webpack_require__(848); +var Axes = __webpack_require__(856); (function() { @@ -10815,8 +10816,8 @@ module.exports = { var Class = __webpack_require__(0); var Contains = __webpack_require__(32); -var GetPoint = __webpack_require__(179); -var GetPoints = __webpack_require__(180); +var GetPoint = __webpack_require__(181); +var GetPoints = __webpack_require__(182); var Random = __webpack_require__(105); /** @@ -11972,7 +11973,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(494))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(496))) /***/ }), /* 68 */ @@ -12026,11 +12027,11 @@ module.exports = Contains; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Actions = __webpack_require__(166); +var Actions = __webpack_require__(168); var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(4); -var Range = __webpack_require__(272); +var Range = __webpack_require__(274); var Set = __webpack_require__(61); var Sprite = __webpack_require__(37); @@ -12864,9 +12865,9 @@ module.exports = Group; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var ImageRender = __webpack_require__(567); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var ImageRender = __webpack_require__(569); /** * @classdesc @@ -12954,7 +12955,7 @@ module.exports = Image; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EaseMap = __webpack_require__(575); +var EaseMap = __webpack_require__(577); /** * [description] @@ -13117,7 +13118,7 @@ module.exports = IsInLayerBounds; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -13337,7 +13338,7 @@ module.exports = LayerData; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -13542,8 +13543,8 @@ var BlendModes = __webpack_require__(45); var Circle = __webpack_require__(63); var CircleContains = __webpack_require__(32); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); @@ -14325,7 +14326,7 @@ module.exports = Shuffle; */ var Class = __webpack_require__(0); -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); var Sprite = __webpack_require__(37); var Vector2 = __webpack_require__(6); var Vector4 = __webpack_require__(119); @@ -14807,7 +14808,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var NOOP = __webpack_require__(3); /** @@ -14873,29 +14874,6 @@ var BaseSoundManager = new Class({ */ this.volume = 1; - /** - * Global playback rate at which all the sounds will be played. - * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed - * and 2.0 doubles the audio's playback speed. - * - * @name Phaser.Sound.BaseSoundManager#rate - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.rate = 1; - - /** - * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). - * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). - * - * @name Phaser.Sound.BaseSoundManager#detune - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.detune = 0; - /** * Flag indicating if sounds should be paused when game looses focus, * for instance when user switches to another tab/program/app. @@ -14906,6 +14884,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.pauseOnBlur = true; + game.events.on('blur', function () { if (this.pauseOnBlur) @@ -14913,6 +14892,7 @@ var BaseSoundManager = new Class({ this.onBlur(); } }, this); + game.events.on('focus', function () { if (this.pauseOnBlur) @@ -14920,6 +14900,7 @@ var BaseSoundManager = new Class({ this.onFocus(); } }, this); + game.events.once('destroy', this.destroy, this); /** @@ -14967,6 +14948,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 */ this.unlocked = false; + if (this.locked) { this.unlock(); @@ -15288,7 +15270,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param [scope] - Callback context. + * @param {object} scope - Callback context. */ forEachActiveSound: function (callbackfn, scope) { @@ -15300,50 +15282,81 @@ var BaseSoundManager = new Class({ callbackfn.call(scope || _this, sound, index, _this.sounds); } }); - } -}); -Object.defineProperty(BaseSoundManager.prototype, 'rate', { - get: function () - { - return this._rate; }, - set: function (value) - { - this._rate = value; - this.forEachActiveSound(function (sound) - { - sound.setRate(); - }); - /** - * @event Phaser.Sound.BaseSoundManager#rate - * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. - * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#rate property. - */ - this.emit('rate', this, value); - } -}); -Object.defineProperty(BaseSoundManager.prototype, 'detune', { - get: function () - { - return this._detune; + /** + * Global playback rate at which all the sounds will be played. + * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed + * and 2.0 doubles the audio's playback speed. + * + * @name Phaser.Sound.BaseSoundManager#rate + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rate: { + + get: function () + { + return this._rate; + }, + + set: function (value) + { + this._rate = value; + + this.forEachActiveSound(function (sound) + { + sound.setRate(); + }); + + /** + * @event Phaser.Sound.BaseSoundManager#rate + * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. + * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#rate property. + */ + this.emit('rate', this, value); + } + }, - set: function (value) - { - this._detune = value; - this.forEachActiveSound(function (sound) - { - sound.setRate(); - }); - /** - * @event Phaser.Sound.BaseSoundManager#detune - * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. - * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#detune property. - */ - this.emit('detune', this, value); + /** + * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29). + * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent). + * + * @name Phaser.Sound.BaseSoundManager#detune + * @type {number} + * @default 0 + * @since 3.0.0 + */ + detune: { + + get: function () + { + return this._detune; + }, + + set: function (value) + { + this._detune = value; + + this.forEachActiveSound(function (sound) + { + sound.setRate(); + }); + + /** + * @event Phaser.Sound.BaseSoundManager#detune + * @param {Phaser.Sound.BaseSoundManager} soundManager - Reference to the sound manager that emitted event. + * @param {number} value - An updated value of Phaser.Sound.BaseSoundManager#detune property. + */ + this.emit('detune', this, value); + } + } + }); + module.exports = BaseSoundManager; @@ -15357,7 +15370,7 @@ module.exports = BaseSoundManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var Extend = __webpack_require__(23); var NOOP = __webpack_require__(3); @@ -16856,7 +16869,7 @@ var TWEEN_CONST = { /** * TweenData state. * - * @name Phaser.Tweens.OFFSET_DELAY + * @name Phaser.Tweens.DELAY * @type {integer} * @since 3.0.0 */ @@ -16874,7 +16887,7 @@ var TWEEN_CONST = { /** * TweenData state. * - * @name Phaser.Tweens.PLAYING_FORWARD + * @name Phaser.Tweens.PENDING_RENDER * @type {integer} * @since 3.0.0 */ @@ -16939,7 +16952,7 @@ var TWEEN_CONST = { /** * Tween state. * - * @name Phaser.Tweens.LOOP_DELAY + * @name Phaser.Tweens.PAUSED * @type {integer} * @since 3.0.0 */ @@ -17006,9 +17019,9 @@ module.exports = TWEEN_CONST; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var MeshRender = __webpack_require__(647); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var MeshRender = __webpack_require__(655); /** * @classdesc @@ -17305,7 +17318,7 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(326); +var Components = __webpack_require__(327); var Sprite = __webpack_require__(37); /** @@ -17415,7 +17428,7 @@ var Common = __webpack_require__(38); var Body = __webpack_require__(59); var Bounds = __webpack_require__(95); var Vector = __webpack_require__(94); -var decomp = __webpack_require__(937); +var decomp = __webpack_require__(945); (function() { @@ -18578,47 +18591,47 @@ module.exports = Bounds; module.exports = { - CalculateFacesAt: __webpack_require__(150), + CalculateFacesAt: __webpack_require__(152), CalculateFacesWithin: __webpack_require__(34), - Copy: __webpack_require__(863), - CreateFromTiles: __webpack_require__(864), - CullTiles: __webpack_require__(865), - Fill: __webpack_require__(866), - FilterTiles: __webpack_require__(867), - FindByIndex: __webpack_require__(868), - FindTile: __webpack_require__(869), - ForEachTile: __webpack_require__(870), + Copy: __webpack_require__(871), + CreateFromTiles: __webpack_require__(872), + CullTiles: __webpack_require__(873), + Fill: __webpack_require__(874), + FilterTiles: __webpack_require__(875), + FindByIndex: __webpack_require__(876), + FindTile: __webpack_require__(877), + ForEachTile: __webpack_require__(878), GetTileAt: __webpack_require__(97), - GetTileAtWorldXY: __webpack_require__(871), + GetTileAtWorldXY: __webpack_require__(879), GetTilesWithin: __webpack_require__(15), - GetTilesWithinShape: __webpack_require__(872), - GetTilesWithinWorldXY: __webpack_require__(873), - HasTileAt: __webpack_require__(343), - HasTileAtWorldXY: __webpack_require__(874), + GetTilesWithinShape: __webpack_require__(880), + GetTilesWithinWorldXY: __webpack_require__(881), + HasTileAt: __webpack_require__(344), + HasTileAtWorldXY: __webpack_require__(882), IsInLayerBounds: __webpack_require__(74), - PutTileAt: __webpack_require__(151), - PutTileAtWorldXY: __webpack_require__(875), - PutTilesAt: __webpack_require__(876), - Randomize: __webpack_require__(877), - RemoveTileAt: __webpack_require__(344), - RemoveTileAtWorldXY: __webpack_require__(878), - RenderDebug: __webpack_require__(879), - ReplaceByIndex: __webpack_require__(342), - SetCollision: __webpack_require__(880), - SetCollisionBetween: __webpack_require__(881), - SetCollisionByExclusion: __webpack_require__(882), - SetCollisionByProperty: __webpack_require__(883), - SetCollisionFromCollisionGroup: __webpack_require__(884), - SetTileIndexCallback: __webpack_require__(885), - SetTileLocationCallback: __webpack_require__(886), - Shuffle: __webpack_require__(887), - SwapByIndex: __webpack_require__(888), + PutTileAt: __webpack_require__(153), + PutTileAtWorldXY: __webpack_require__(883), + PutTilesAt: __webpack_require__(884), + Randomize: __webpack_require__(885), + RemoveTileAt: __webpack_require__(345), + RemoveTileAtWorldXY: __webpack_require__(886), + RenderDebug: __webpack_require__(887), + ReplaceByIndex: __webpack_require__(343), + SetCollision: __webpack_require__(888), + SetCollisionBetween: __webpack_require__(889), + SetCollisionByExclusion: __webpack_require__(890), + SetCollisionByProperty: __webpack_require__(891), + SetCollisionFromCollisionGroup: __webpack_require__(892), + SetTileIndexCallback: __webpack_require__(893), + SetTileLocationCallback: __webpack_require__(894), + Shuffle: __webpack_require__(895), + SwapByIndex: __webpack_require__(896), TileToWorldX: __webpack_require__(98), - TileToWorldXY: __webpack_require__(889), + TileToWorldXY: __webpack_require__(897), TileToWorldY: __webpack_require__(99), - WeightedRandomize: __webpack_require__(890), + WeightedRandomize: __webpack_require__(898), WorldToTileX: __webpack_require__(39), - WorldToTileXY: __webpack_require__(891), + WorldToTileXY: __webpack_require__(899), WorldToTileY: __webpack_require__(40) }; @@ -19233,17 +19246,17 @@ module.exports = GetNewValue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(157); +var Defaults = __webpack_require__(159); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); var GetNewValue = __webpack_require__(101); -var GetProps = __webpack_require__(357); -var GetTargets = __webpack_require__(155); +var GetProps = __webpack_require__(358); +var GetTargets = __webpack_require__(157); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(156); -var Tween = __webpack_require__(158); -var TweenData = __webpack_require__(159); +var GetValueOp = __webpack_require__(158); +var Tween = __webpack_require__(160); +var TweenData = __webpack_require__(161); /** * [description] @@ -20152,7 +20165,7 @@ module.exports = Map; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var Rectangle = __webpack_require__(8); -var TransformMatrix = __webpack_require__(185); +var TransformMatrix = __webpack_require__(187); var ValueToColor = __webpack_require__(115); var Vector2 = __webpack_require__(6); @@ -21507,10 +21520,10 @@ module.exports = Camera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HexStringToColor = __webpack_require__(198); -var IntegerToColor = __webpack_require__(200); -var ObjectToColor = __webpack_require__(202); -var RGBStringToColor = __webpack_require__(203); +var HexStringToColor = __webpack_require__(200); +var IntegerToColor = __webpack_require__(202); +var ObjectToColor = __webpack_require__(204); +var RGBStringToColor = __webpack_require__(205); /** * Converts the given source color value into an instance of a Color class. @@ -21595,9 +21608,9 @@ module.exports = GetColor; var Class = __webpack_require__(0); var Matrix4 = __webpack_require__(118); -var RandomXYZ = __webpack_require__(204); -var RandomXYZW = __webpack_require__(205); -var RotateVec3 = __webpack_require__(206); +var RandomXYZ = __webpack_require__(206); +var RandomXYZW = __webpack_require__(207); +var RotateVec3 = __webpack_require__(208); var Set = __webpack_require__(61); var Sprite3D = __webpack_require__(81); var Vector2 = __webpack_require__(6); @@ -21643,7 +21656,7 @@ var Camera = new Class({ * [description] * * @name Phaser.Cameras.Sprite3D#displayList - * @type {[type]} + * @type {Phaser.GameObjects.DisplayList} * @since 3.0.0 */ this.displayList = scene.sys.displayList; @@ -21652,7 +21665,7 @@ var Camera = new Class({ * [description] * * @name Phaser.Cameras.Sprite3D#updateList - * @type {[type]} + * @type {Phaser.GameObjects.UpdateList} * @since 3.0.0 */ this.updateList = scene.sys.updateList; @@ -24130,7 +24143,7 @@ var Vector4 = new Class({ /** * The x component of this Vector. * - * @name Phaser.Math.Vector3#x + * @name Phaser.Math.Vector4#x * @type {number} * @default 0 * @since 3.0.0 @@ -24139,7 +24152,7 @@ var Vector4 = new Class({ /** * The y component of this Vector. * - * @name Phaser.Math.Vector3#y + * @name Phaser.Math.Vector4#y * @type {number} * @default 0 * @since 3.0.0 @@ -24148,7 +24161,7 @@ var Vector4 = new Class({ /** * The z component of this Vector. * - * @name Phaser.Math.Vector3#z + * @name Phaser.Math.Vector4#z * @type {number} * @default 0 * @since 3.0.0 @@ -24157,7 +24170,7 @@ var Vector4 = new Class({ /** * The w component of this Vector. * - * @name Phaser.Math.Vector3#w + * @name Phaser.Math.Vector4#w * @type {number} * @default 0 * @since 3.0.0 @@ -24185,7 +24198,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#clone * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} [description] */ clone: function () { @@ -24198,9 +24211,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#copy * @since 3.0.0 * - * @param {[type]} src - [description] + * @param {Phaser.Math.Vector4} src - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ copy: function (src) { @@ -24218,9 +24231,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#equals * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {boolean} [description] */ equals: function (v) { @@ -24233,12 +24246,12 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#set * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} z - [description] - * @param {[type]} w - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} z - [description] + * @param {number} w - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ set: function (x, y, z, w) { @@ -24266,9 +24279,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#add * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ add: function (v) { @@ -24286,9 +24299,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#subtract * @since 3.0.0 * - * @param {[type]} v - [description] + * @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ subtract: function (v) { @@ -24306,9 +24319,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#scale * @since 3.0.0 * - * @param {[type]} scale - [description] + * @param {number} scale - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ scale: function (scale) { @@ -24326,7 +24339,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#length * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ length: function () { @@ -24344,7 +24357,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#lengthSq * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ lengthSq: function () { @@ -24362,7 +24375,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#normalize * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ normalize: function () { @@ -24393,7 +24406,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ dot: function (v) { @@ -24409,7 +24422,7 @@ var Vector4 = new Class({ * @param {[type]} v - [description] * @param {[type]} t - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ lerp: function (v, t) { @@ -24436,7 +24449,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ multiply: function (v) { @@ -24456,7 +24469,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ divide: function (v) { @@ -24476,7 +24489,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ distance: function (v) { @@ -24496,7 +24509,7 @@ var Vector4 = new Class({ * * @param {[type]} v - [description] * - * @return {[type]} [description] + * @return {number} [description] */ distanceSq: function (v) { @@ -24514,7 +24527,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#negate * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ negate: function () { @@ -24534,7 +24547,7 @@ var Vector4 = new Class({ * * @param {[type]} mat - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ transformMat4: function (mat) { @@ -24562,7 +24575,7 @@ var Vector4 = new Class({ * * @param {[type]} q - [description] * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ transformQuat: function (q) { @@ -24595,7 +24608,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#reset * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.Math.Vector4} This Vector4 object. */ reset: function () { @@ -24609,6 +24622,7 @@ var Vector4 = new Class({ }); +// TODO: Check if these are required internally, if not, remove. Vector4.prototype.sub = Vector4.prototype.subtract; Vector4.prototype.mul = Vector4.prototype.multiply; Vector4.prototype.div = Vector4.prototype.divide; @@ -24946,7 +24960,7 @@ module.exports = AddToDOM; var OS = __webpack_require__(67); var Browser = __webpack_require__(82); -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); /** * Determines the features of the browser running this Phaser Game instance. @@ -25057,11 +25071,8 @@ function init () // Can't be done on a webgl context var image = ctx2D.createImageData(1, 1); - /** - * Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. - * - * @author Matt DesLauriers (@mattdesl) - */ + // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray. + // @author Matt DesLauriers (@mattdesl) isUint8 = image.data instanceof Uint8ClampedArray; CanvasPool.remove(canvas); @@ -26130,11 +26141,11 @@ module.exports = { PERIOD: 190, /** - * @name Phaser.Input.Keyboard.KeyCodes.FORWAD_SLASH + * @name Phaser.Input.Keyboard.KeyCodes.FORWARD_SLASH * @type {integer} * @since 3.0.0 */ - FORWAD_SLASH: 191, + FORWARD_SLASH: 191, /** * @name Phaser.Input.Keyboard.KeyCodes.BACK_SLASH @@ -26186,10 +26197,10 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(83); -var GetPhysicsPlugins = __webpack_require__(527); -var GetScenePlugins = __webpack_require__(528); -var Plugins = __webpack_require__(231); -var Settings = __webpack_require__(252); +var GetPhysicsPlugins = __webpack_require__(529); +var GetScenePlugins = __webpack_require__(530); +var Plugins = __webpack_require__(233); +var Settings = __webpack_require__(254); /** * @classdesc @@ -27322,12 +27333,12 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(265); -var ParseFromAtlas = __webpack_require__(544); -var ParseRetroFont = __webpack_require__(545); -var Render = __webpack_require__(546); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetBitmapTextSize = __webpack_require__(267); +var ParseFromAtlas = __webpack_require__(546); +var ParseRetroFont = __webpack_require__(547); +var Render = __webpack_require__(548); /** * @classdesc @@ -27590,12 +27601,12 @@ module.exports = BitmapText; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitterRender = __webpack_require__(549); -var Bob = __webpack_require__(552); +var BlitterRender = __webpack_require__(551); +var Bob = __webpack_require__(554); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var Frame = __webpack_require__(130); -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); var List = __webpack_require__(86); /** @@ -27849,10 +27860,10 @@ module.exports = Blitter; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetBitmapTextSize = __webpack_require__(265); -var Render = __webpack_require__(553); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetBitmapTextSize = __webpack_require__(267); +var Render = __webpack_require__(555); /** * @classdesc @@ -28232,12 +28243,12 @@ module.exports = DynamicBitmapText; var Camera = __webpack_require__(114); var Class = __webpack_require__(0); var Commands = __webpack_require__(127); -var Components = __webpack_require__(12); -var Ellipse = __webpack_require__(267); -var GameObject = __webpack_require__(2); +var Components = __webpack_require__(11); +var Ellipse = __webpack_require__(269); +var GameObject = __webpack_require__(1); var GetValue = __webpack_require__(4); var MATH_CONST = __webpack_require__(16); -var Render = __webpack_require__(565); +var Render = __webpack_require__(567); /** * @classdesc @@ -29364,8 +29375,8 @@ module.exports = Graphics; var Class = __webpack_require__(0); var Contains = __webpack_require__(68); -var GetPoint = __webpack_require__(268); -var GetPoints = __webpack_require__(269); +var GetPoint = __webpack_require__(270); +var GetPoints = __webpack_require__(271); var Random = __webpack_require__(109); /** @@ -29767,12 +29778,12 @@ module.exports = CircumferencePoint; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GravityWell = __webpack_require__(570); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GravityWell = __webpack_require__(572); var List = __webpack_require__(86); -var ParticleEmitter = __webpack_require__(571); -var Render = __webpack_require__(610); +var ParticleEmitter = __webpack_require__(573); +var Render = __webpack_require__(612); /** * @classdesc @@ -30218,6 +30229,87 @@ module.exports = GetRandomElement; /* 139 */ /***/ (function(module, exports, __webpack_require__) { +var Class = __webpack_require__(0); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var RenderTextureWebGL = __webpack_require__(615); +var Render = __webpack_require__(616); + +var RenderTexture = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.MatrixStack, + Components.Origin, + Components.Pipeline, + Components.ScaleMode, + Components.ScrollFactor, + Components.Size, + Components.Tint, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function RenderTexture(scene, x, y, width, height) + { + GameObject.call(this, scene, 'RenderTexture'); + this.initMatrixStack(); + + this.renderer = scene.sys.game.renderer; + + if (this.renderer.type === Phaser.WEBGL) + { + var gl = this.renderer.gl; + this.gl = gl; + this.fill = RenderTextureWebGL.fill; + this.clear = RenderTextureWebGL.clear; + this.draw = RenderTextureWebGL.draw; + this.drawFrame = RenderTextureWebGL.drawFrame; + this.texture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false); + this.framebuffer = this.renderer.createFramebuffer(width, height, this.texture, false); + } + else + { + // For now we'll just add canvas stubs + this.fill = function () {}; + this.clear = function () {}; + this.draw = function () {}; + this.drawFrame = function () {}; + } + + this.setPosition(x, y); + this.setSize(width, height); + this.initPipeline('TextureTintPipeline'); + }, + + destroy: function () + { + GameObject.destroy.call(this); + if (this.renderer.type === Phaser.WEBGL) + { + this.renderer.deleteTexture(this.texture); + this.renderer.deleteFramebuffer(this.framebuffer); + } + } + +}); + +module.exports = RenderTexture; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -30225,15 +30317,15 @@ module.exports = GetRandomElement; */ var AddToDOM = __webpack_require__(123); -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetTextSize = __webpack_require__(613); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetTextSize = __webpack_require__(619); var GetValue = __webpack_require__(4); -var RemoveFromDOM = __webpack_require__(229); -var TextRender = __webpack_require__(614); -var TextStyle = __webpack_require__(617); +var RemoveFromDOM = __webpack_require__(231); +var TextRender = __webpack_require__(620); +var TextStyle = __webpack_require__(623); /** * @classdesc @@ -31317,7 +31409,7 @@ module.exports = Text; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31326,12 +31418,12 @@ module.exports = Text; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var GetPowerOfTwo = __webpack_require__(288); -var TileSpriteRender = __webpack_require__(619); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var GetPowerOfTwo = __webpack_require__(290); +var TileSpriteRender = __webpack_require__(625); /** * @classdesc @@ -31570,7 +31662,96 @@ module.exports = TileSprite; /***/ }), -/* 141 */ +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var GetAdvancedValue = __webpack_require__(10); + +/** + * Adds an Animation component to a Sprite and populates it based on the given config. + * + * @function Phaser.Gameobjects.BuildGameObjectAnimation + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Sprite} sprite - [description] + * @param {object} config - [description] + * + * @return {Phaser.GameObjects.Sprite} The updated Sprite. + */ +var BuildGameObjectAnimation = function (sprite, config) +{ + var animConfig = GetAdvancedValue(config, 'anims', null); + + if (animConfig === null) + { + return sprite; + } + + if (typeof animConfig === 'string') + { + // { anims: 'key' } + sprite.anims.play(animConfig); + } + else if (typeof animConfig === 'object') + { + // { anims: { + // key: string + // startFrame: [string|integer] + // delay: [float] + // repeat: [integer] + // repeatDelay: [float] + // yoyo: [boolean] + // play: [boolean] + // delayedPlay: [boolean] + // } + // } + + var anims = sprite.anims; + + var key = GetAdvancedValue(animConfig, 'key', undefined); + var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); + + var delay = GetAdvancedValue(animConfig, 'delay', 0); + var repeat = GetAdvancedValue(animConfig, 'repeat', 0); + var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); + var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); + + var play = GetAdvancedValue(animConfig, 'play', false); + var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); + + anims.delay(delay); + anims.repeat(repeat); + anims.repeatDelay(repeatDelay); + anims.yoyo(yoyo); + + if (play) + { + anims.play(key, startFrame); + } + else if (delayedPlay > 0) + { + anims.delayedPlay(delayedPlay, key, startFrame); + } + else + { + anims.load(key); + } + } + + return sprite; +}; + +module.exports = BuildGameObjectAnimation; + + +/***/ }), +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32169,7 +32350,7 @@ module.exports = Quad; /***/ }), -/* 142 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -32255,7 +32436,7 @@ module.exports = ContainsArray; /***/ }), -/* 143 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -32301,7 +32482,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 144 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -32350,7 +32531,7 @@ module.exports = Contains; /***/ }), -/* 145 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -32378,7 +32559,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 146 */ +/* 148 */ /***/ (function(module, exports) { /** @@ -32430,7 +32611,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 147 */ +/* 149 */ /***/ (function(module, exports) { /** @@ -32471,7 +32652,7 @@ module.exports = GetURL; /***/ }), -/* 148 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32519,7 +32700,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 149 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32537,7 +32718,7 @@ var Composite = {}; module.exports = Composite; -var Events = __webpack_require__(162); +var Events = __webpack_require__(164); var Common = __webpack_require__(38); var Body = __webpack_require__(59); @@ -33209,7 +33390,7 @@ var Body = __webpack_require__(59); /***/ }), -/* 150 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33284,7 +33465,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 151 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33295,7 +33476,7 @@ module.exports = CalculateFacesAt; var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(150); +var CalculateFacesAt = __webpack_require__(152); var SetTileCollision = __webpack_require__(43); /** @@ -33363,7 +33544,7 @@ module.exports = PutTileAt; /***/ }), -/* 152 */ +/* 154 */ /***/ (function(module, exports) { /** @@ -33401,7 +33582,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 153 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33410,7 +33591,7 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var LayerData = __webpack_require__(75); var MapData = __webpack_require__(76); var Tile = __webpack_require__(44); @@ -33493,7 +33674,7 @@ module.exports = Parse2DArray; /***/ }), -/* 154 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33502,10 +33683,10 @@ module.exports = Parse2DArray; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var MapData = __webpack_require__(76); -var Parse = __webpack_require__(345); -var Tilemap = __webpack_require__(353); +var Parse = __webpack_require__(346); +var Tilemap = __webpack_require__(354); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -33579,7 +33760,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 155 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33626,7 +33807,7 @@ module.exports = GetTargets; /***/ }), -/* 156 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -33799,7 +33980,7 @@ module.exports = GetValueOp; /***/ }), -/* 157 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -33841,7 +34022,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 158 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33851,7 +34032,7 @@ module.exports = TWEEN_DEFAULTS; */ var Class = __webpack_require__(0); -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var GameObjectFactory = __webpack_require__(9); var TWEEN_CONST = __webpack_require__(87); @@ -34982,6 +35163,12 @@ var Tween = new Class({ case TWEEN_CONST.PLAYING_FORWARD: case TWEEN_CONST.PLAYING_BACKWARD: + if (!tweenData.target) + { + tweenData.state = TWEEN_CONST.COMPLETE; + break; + } + var elapsed = tweenData.elapsed; var duration = tweenData.duration; var diff = 0; @@ -35086,15 +35273,22 @@ var Tween = new Class({ case TWEEN_CONST.PENDING_RENDER: - tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]); + if (tweenData.target) + { + tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.target[tweenData.key]); - tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start); + tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start); - tweenData.current = tweenData.start; + tweenData.current = tweenData.start; - tweenData.target[tweenData.key] = tweenData.start; + tweenData.target[tweenData.key] = tweenData.start; - tweenData.state = TWEEN_CONST.PLAYING_FORWARD; + tweenData.state = TWEEN_CONST.PLAYING_FORWARD; + } + else + { + tweenData.state = TWEEN_CONST.COMPLETE; + } break; } @@ -35162,7 +35356,7 @@ module.exports = Tween; /***/ }), -/* 159 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -35276,7 +35470,7 @@ module.exports = TweenData; /***/ }), -/* 160 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35306,7 +35500,7 @@ module.exports = Wrap; /***/ }), -/* 161 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35336,7 +35530,7 @@ module.exports = WrapDegrees; /***/ }), -/* 162 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35452,7 +35646,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 163 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35471,9 +35665,9 @@ module.exports = Constraint; var Vertices = __webpack_require__(93); var Vector = __webpack_require__(94); -var Sleeping = __webpack_require__(341); +var Sleeping = __webpack_require__(342); var Bounds = __webpack_require__(95); -var Axes = __webpack_require__(848); +var Axes = __webpack_require__(856); var Common = __webpack_require__(38); (function() { @@ -35910,7 +36104,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 164 */ +/* 166 */ /***/ (function(module, exports) { var g; @@ -35937,7 +36131,7 @@ module.exports = g; /***/ }), -/* 165 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -35993,7 +36187,7 @@ module.exports = IsPlainObject; /***/ }), -/* 166 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36008,57 +36202,57 @@ module.exports = IsPlainObject; module.exports = { - Angle: __webpack_require__(375), - Call: __webpack_require__(376), - GetFirst: __webpack_require__(377), - GridAlign: __webpack_require__(378), - IncAlpha: __webpack_require__(395), - IncX: __webpack_require__(396), - IncXY: __webpack_require__(397), - IncY: __webpack_require__(398), - PlaceOnCircle: __webpack_require__(399), - PlaceOnEllipse: __webpack_require__(400), - PlaceOnLine: __webpack_require__(401), - PlaceOnRectangle: __webpack_require__(402), - PlaceOnTriangle: __webpack_require__(403), - PlayAnimation: __webpack_require__(404), - RandomCircle: __webpack_require__(405), - RandomEllipse: __webpack_require__(406), - RandomLine: __webpack_require__(407), - RandomRectangle: __webpack_require__(408), - RandomTriangle: __webpack_require__(409), - Rotate: __webpack_require__(410), - RotateAround: __webpack_require__(411), - RotateAroundDistance: __webpack_require__(412), - ScaleX: __webpack_require__(413), - ScaleXY: __webpack_require__(414), - ScaleY: __webpack_require__(415), - SetAlpha: __webpack_require__(416), - SetBlendMode: __webpack_require__(417), - SetDepth: __webpack_require__(418), - SetHitArea: __webpack_require__(419), - SetOrigin: __webpack_require__(420), - SetRotation: __webpack_require__(421), - SetScale: __webpack_require__(422), - SetScaleX: __webpack_require__(423), - SetScaleY: __webpack_require__(424), - SetTint: __webpack_require__(425), - SetVisible: __webpack_require__(426), - SetX: __webpack_require__(427), - SetXY: __webpack_require__(428), - SetY: __webpack_require__(429), - ShiftPosition: __webpack_require__(430), - Shuffle: __webpack_require__(431), - SmootherStep: __webpack_require__(432), - SmoothStep: __webpack_require__(433), - Spread: __webpack_require__(434), - ToggleVisible: __webpack_require__(435) + Angle: __webpack_require__(376), + Call: __webpack_require__(377), + GetFirst: __webpack_require__(378), + GridAlign: __webpack_require__(379), + IncAlpha: __webpack_require__(397), + IncX: __webpack_require__(398), + IncXY: __webpack_require__(399), + IncY: __webpack_require__(400), + PlaceOnCircle: __webpack_require__(401), + PlaceOnEllipse: __webpack_require__(402), + PlaceOnLine: __webpack_require__(403), + PlaceOnRectangle: __webpack_require__(404), + PlaceOnTriangle: __webpack_require__(405), + PlayAnimation: __webpack_require__(406), + RandomCircle: __webpack_require__(407), + RandomEllipse: __webpack_require__(408), + RandomLine: __webpack_require__(409), + RandomRectangle: __webpack_require__(410), + RandomTriangle: __webpack_require__(411), + Rotate: __webpack_require__(412), + RotateAround: __webpack_require__(413), + RotateAroundDistance: __webpack_require__(414), + ScaleX: __webpack_require__(415), + ScaleXY: __webpack_require__(416), + ScaleY: __webpack_require__(417), + SetAlpha: __webpack_require__(418), + SetBlendMode: __webpack_require__(419), + SetDepth: __webpack_require__(420), + SetHitArea: __webpack_require__(421), + SetOrigin: __webpack_require__(422), + SetRotation: __webpack_require__(423), + SetScale: __webpack_require__(424), + SetScaleX: __webpack_require__(425), + SetScaleY: __webpack_require__(426), + SetTint: __webpack_require__(427), + SetVisible: __webpack_require__(428), + SetX: __webpack_require__(429), + SetXY: __webpack_require__(430), + SetY: __webpack_require__(431), + ShiftPosition: __webpack_require__(432), + Shuffle: __webpack_require__(433), + SmootherStep: __webpack_require__(434), + SmoothStep: __webpack_require__(435), + Spread: __webpack_require__(436), + ToggleVisible: __webpack_require__(437) }; /***/ }), -/* 167 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36067,19 +36261,19 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ALIGN_CONST = __webpack_require__(168); +var ALIGN_CONST = __webpack_require__(170); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(169); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(170); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(171); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(172); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(174); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(175); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(176); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(177); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(178); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(171); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(172); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(173); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(174); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(176); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(177); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(178); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(179); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(180); /** * Takes given Game Object and aligns it so that it is positioned relative to the other. @@ -36105,7 +36299,7 @@ module.exports = QuickSet; /***/ }), -/* 168 */ +/* 170 */ /***/ (function(module, exports) { /** @@ -36239,7 +36433,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36281,7 +36475,7 @@ module.exports = BottomCenter; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36323,7 +36517,7 @@ module.exports = BottomLeft; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36365,7 +36559,7 @@ module.exports = BottomRight; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36374,7 +36568,7 @@ module.exports = BottomRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(173); +var CenterOn = __webpack_require__(175); var GetCenterX = __webpack_require__(46); var GetCenterY = __webpack_require__(49); @@ -36405,7 +36599,7 @@ module.exports = Center; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36440,7 +36634,7 @@ module.exports = CenterOn; /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36482,7 +36676,7 @@ module.exports = LeftCenter; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36524,7 +36718,7 @@ module.exports = RightCenter; /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36566,7 +36760,7 @@ module.exports = TopCenter; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36608,7 +36802,7 @@ module.exports = TopLeft; /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36650,7 +36844,7 @@ module.exports = TopRight; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36691,7 +36885,7 @@ module.exports = GetPoint; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36700,7 +36894,7 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(181); +var Circumference = __webpack_require__(183); var CircumferencePoint = __webpack_require__(104); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -36743,7 +36937,7 @@ module.exports = GetPoints; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -36771,7 +36965,7 @@ module.exports = Circumference; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36823,7 +37017,7 @@ module.exports = GetPoints; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -36863,7 +37057,7 @@ module.exports = RotateAround; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -36989,7 +37183,7 @@ module.exports = Pipeline; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37382,7 +37576,7 @@ module.exports = TransformMatrix; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37500,7 +37694,7 @@ module.exports = MarchingAnts; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -37540,7 +37734,7 @@ module.exports = RotateLeft; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -37580,7 +37774,7 @@ module.exports = RotateRight; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -37653,7 +37847,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 190 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -37685,7 +37879,7 @@ module.exports = SmootherStep; /***/ }), -/* 191 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -37717,7 +37911,7 @@ module.exports = SmoothStep; /***/ }), -/* 192 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37727,7 +37921,7 @@ module.exports = SmoothStep; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(193); +var Frame = __webpack_require__(195); var GetValue = __webpack_require__(4); /** @@ -37776,7 +37970,7 @@ var Animation = new Class({ /** * A frame based animation (as opposed to a bone based animation) * - * @name Phaser.Animations.Animation#key + * @name Phaser.Animations.Animation#type * @type {string} * @default frame * @since 3.0.0 @@ -38619,7 +38813,7 @@ module.exports = Animation; /***/ }), -/* 193 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38805,7 +38999,7 @@ module.exports = AnimationFrame; /***/ }), -/* 194 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38814,12 +39008,12 @@ module.exports = AnimationFrame; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Animation = __webpack_require__(192); +var Animation = __webpack_require__(194); var Class = __webpack_require__(0); var CustomMap = __webpack_require__(113); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var GetValue = __webpack_require__(4); -var Pad = __webpack_require__(195); +var Pad = __webpack_require__(197); /** * @classdesc @@ -39402,7 +39596,7 @@ module.exports = AnimationManager; /***/ }), -/* 195 */ +/* 197 */ /***/ (function(module, exports) { /** @@ -39478,7 +39672,7 @@ module.exports = Pad; /***/ }), -/* 196 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39489,7 +39683,7 @@ module.exports = Pad; var Class = __webpack_require__(0); var CustomMap = __webpack_require__(113); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); /** * @classdesc @@ -39655,7 +39849,7 @@ module.exports = BaseCache; /***/ }), -/* 197 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39664,7 +39858,7 @@ module.exports = BaseCache; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BaseCache = __webpack_require__(196); +var BaseCache = __webpack_require__(198); var Class = __webpack_require__(0); /** @@ -39879,7 +40073,7 @@ module.exports = CacheManager; /***/ }), -/* 198 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39932,7 +40126,7 @@ module.exports = HexStringToColor; /***/ }), -/* 199 */ +/* 201 */ /***/ (function(module, exports) { /** @@ -39963,7 +40157,7 @@ module.exports = GetColor32; /***/ }), -/* 200 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39973,7 +40167,7 @@ module.exports = GetColor32; */ var Color = __webpack_require__(36); -var IntegerToRGB = __webpack_require__(201); +var IntegerToRGB = __webpack_require__(203); /** * Converts the given color value into an instance of a Color object. @@ -39996,7 +40190,7 @@ module.exports = IntegerToColor; /***/ }), -/* 201 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -40044,7 +40238,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 202 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40074,7 +40268,7 @@ module.exports = ObjectToColor; /***/ }), -/* 203 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40120,7 +40314,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 204 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -40160,7 +40354,7 @@ module.exports = RandomXYZ; /***/ }), -/* 205 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -40197,7 +40391,7 @@ module.exports = RandomXYZW; /***/ }), -/* 206 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40208,7 +40402,7 @@ module.exports = RandomXYZW; var Vector3 = __webpack_require__(51); var Matrix4 = __webpack_require__(118); -var Quaternion = __webpack_require__(207); +var Quaternion = __webpack_require__(209); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -40245,7 +40439,7 @@ module.exports = RotateVec3; /***/ }), -/* 207 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40259,7 +40453,7 @@ module.exports = RotateVec3; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(51); -var Matrix3 = __webpack_require__(208); +var Matrix3 = __webpack_require__(210); var EPSILON = 0.000001; @@ -41013,7 +41207,7 @@ module.exports = Quaternion; /***/ }), -/* 208 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41603,7 +41797,7 @@ module.exports = Matrix3; /***/ }), -/* 209 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41790,7 +41984,7 @@ module.exports = OrthographicCamera; /***/ }), -/* 210 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41930,7 +42124,7 @@ module.exports = PerspectiveCamera; /***/ }), -/* 211 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41939,8 +42133,8 @@ module.exports = PerspectiveCamera; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Arne16 = __webpack_require__(212); -var CanvasPool = __webpack_require__(20); +var Arne16 = __webpack_require__(214); +var CanvasPool = __webpack_require__(21); var GetValue = __webpack_require__(4); /** @@ -42024,7 +42218,7 @@ module.exports = GenerateTexture; /***/ }), -/* 212 */ +/* 214 */ /***/ (function(module, exports) { /** @@ -42078,7 +42272,7 @@ module.exports = { /***/ }), -/* 213 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42090,7 +42284,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__(214); +var CubicBezier = __webpack_require__(216); var Curve = __webpack_require__(66); var Vector2 = __webpack_require__(6); @@ -42289,7 +42483,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 214 */ +/* 216 */ /***/ (function(module, exports) { /** @@ -42352,7 +42546,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 215 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42367,7 +42561,7 @@ var Class = __webpack_require__(0); var Curve = __webpack_require__(66); var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(4); -var RadToDeg = __webpack_require__(216); +var RadToDeg = __webpack_require__(218); var Vector2 = __webpack_require__(6); /** @@ -42939,7 +43133,7 @@ module.exports = EllipseCurve; /***/ }), -/* 216 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42969,7 +43163,7 @@ module.exports = RadToDeg; /***/ }), -/* 217 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43195,7 +43389,7 @@ module.exports = LineCurve; /***/ }), -/* 218 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43406,7 +43600,7 @@ module.exports = SplineCurve; /***/ }), -/* 219 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -43469,7 +43663,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 220 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43484,30 +43678,30 @@ module.exports = CanvasInterpolation; var Color = __webpack_require__(36); -Color.ColorToRGBA = __webpack_require__(482); -Color.ComponentToHex = __webpack_require__(221); +Color.ColorToRGBA = __webpack_require__(484); +Color.ComponentToHex = __webpack_require__(223); Color.GetColor = __webpack_require__(116); -Color.GetColor32 = __webpack_require__(199); -Color.HexStringToColor = __webpack_require__(198); -Color.HSLToColor = __webpack_require__(483); -Color.HSVColorWheel = __webpack_require__(485); -Color.HSVToRGB = __webpack_require__(223); -Color.HueToComponent = __webpack_require__(222); -Color.IntegerToColor = __webpack_require__(200); -Color.IntegerToRGB = __webpack_require__(201); -Color.Interpolate = __webpack_require__(486); -Color.ObjectToColor = __webpack_require__(202); -Color.RandomRGB = __webpack_require__(487); -Color.RGBStringToColor = __webpack_require__(203); -Color.RGBToHSV = __webpack_require__(488); -Color.RGBToString = __webpack_require__(489); +Color.GetColor32 = __webpack_require__(201); +Color.HexStringToColor = __webpack_require__(200); +Color.HSLToColor = __webpack_require__(485); +Color.HSVColorWheel = __webpack_require__(487); +Color.HSVToRGB = __webpack_require__(225); +Color.HueToComponent = __webpack_require__(224); +Color.IntegerToColor = __webpack_require__(202); +Color.IntegerToRGB = __webpack_require__(203); +Color.Interpolate = __webpack_require__(488); +Color.ObjectToColor = __webpack_require__(204); +Color.RandomRGB = __webpack_require__(489); +Color.RGBStringToColor = __webpack_require__(205); +Color.RGBToHSV = __webpack_require__(490); +Color.RGBToString = __webpack_require__(491); Color.ValueToColor = __webpack_require__(115); module.exports = Color; /***/ }), -/* 221 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -43537,7 +43731,7 @@ module.exports = ComponentToHex; /***/ }), -/* 222 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/** @@ -43591,10 +43785,10 @@ var HueToComponent = function (p, q, t) module.export = HueToComponent; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(484)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(486)(module))) /***/ }), -/* 223 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43678,7 +43872,7 @@ module.exports = HSVToRGB; /***/ }), -/* 224 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43687,7 +43881,7 @@ module.exports = HSVToRGB; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(225); +var Linear = __webpack_require__(227); /** * [description] @@ -43723,7 +43917,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 225 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -43753,7 +43947,7 @@ module.exports = Linear; /***/ }), -/* 226 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -43782,7 +43976,7 @@ module.exports = Between; /***/ }), -/* 227 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43841,7 +44035,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 228 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -43898,7 +44092,7 @@ module.exports = ParseXML; /***/ }), -/* 229 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -43927,7 +44121,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 230 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44124,7 +44318,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 231 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -44218,7 +44412,7 @@ module.exports = Plugins; /***/ }), -/* 232 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44227,7 +44421,7 @@ module.exports = Plugins; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); /** * Determines the canvas features of the browser running this Phaser Game instance. @@ -44333,7 +44527,7 @@ module.exports = init(); /***/ }), -/* 233 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -45008,7 +45202,7 @@ earcut.flatten = function (data) { }; /***/ }), -/* 234 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -45511,7 +45705,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45521,8 +45715,8 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(512); -var TextureTintPipeline = __webpack_require__(236); +var ShaderSourceFS = __webpack_require__(514); +var TextureTintPipeline = __webpack_require__(238); var LIGHT_COUNT = 10; @@ -45908,7 +46102,7 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 236 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45918,9 +46112,9 @@ module.exports = ForwardDiffuseLightPipeline; */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(513); -var ShaderSourceVS = __webpack_require__(514); +var ModelViewProjection = __webpack_require__(236); +var ShaderSourceFS = __webpack_require__(515); +var ShaderSourceVS = __webpack_require__(516); var Utils = __webpack_require__(42); var WebGLPipeline = __webpack_require__(126); @@ -46190,6 +46384,7 @@ var TextureTintPipeline = new Class({ this.vertexCount = 0; batches.length = 0; + this.pushBatch(); this.flushLocked = false; return this; @@ -46260,12 +46455,9 @@ var TextureTintPipeline = new Class({ } this.vertexBuffer = tilemap.vertexBuffer; - - renderer.setTexture2D(frame.source.glTexture, 0); renderer.setPipeline(this); - + renderer.setTexture2D(frame.source.glTexture, 0); gl.drawArrays(this.topology, 0, tilemap.vertexCount); - this.vertexBuffer = pipelineVertexBuffer; } @@ -46291,7 +46483,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var maxQuads = this.maxQuads; var cameraScrollX = camera.scrollX; var cameraScrollY = camera.scrollY; @@ -46421,6 +46612,8 @@ var TextureTintPipeline = new Class({ } } } + + this.setTexture2D(texture, 0); }, /** @@ -46440,7 +46633,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var list = blitter.getRenderList(); var length = list.length; var cameraMatrix = camera.matrix.matrix; @@ -46559,7 +46751,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = sprite.frame; var texture = frame.texture.source[frame.sourceIndex].glTexture; @@ -46687,7 +46878,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = mesh.frame; var texture = mesh.texture.source[frame.sourceIndex].glTexture; @@ -46766,7 +46956,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var cameraWidth = camera.width + 50; var cameraHeight = camera.height + 50; @@ -46990,7 +47179,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var frame = bitmapText.frame; var textureSource = bitmapText.texture.source[frame.sourceIndex]; @@ -47451,7 +47639,6 @@ var TextureTintPipeline = new Class({ var vertexViewF32 = this.vertexViewF32; var vertexViewU32 = this.vertexViewU32; var renderer = this.renderer; - var resolution = renderer.config.resolution; // eslint-disable-line no-unused-vars var cameraMatrix = camera.matrix.matrix; var width = srcWidth * (flipX ? -1.0 : 1.0); var height = srcHeight * (flipY ? -1.0 : 1.0); @@ -47533,6 +47720,93 @@ var TextureTintPipeline = new Class({ this.vertexCount += 6; }, + drawTexture: function ( + texture, + srcX, srcY, + frameX, frameY, frameWidth, frameHeight, + transformMatrix + ) + { + this.renderer.setPipeline(this); + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + var renderer = this.renderer; + var width = frameWidth; + var height = frameHeight; + var x = srcX; + var y = srcY; + var xw = x + width; + var yh = y + height; + var mva = transformMatrix[0]; + var mvb = transformMatrix[1]; + var mvc = transformMatrix[2]; + var mvd = transformMatrix[3]; + var mve = transformMatrix[4]; + var mvf = transformMatrix[5]; + var tx0 = x * mva + y * mvc + mve; + var ty0 = x * mvb + y * mvd + mvf; + var tx1 = x * mva + yh * mvc + mve; + var ty1 = x * mvb + yh * mvd + mvf; + var tx2 = xw * mva + yh * mvc + mve; + var ty2 = xw * mvb + yh * mvd + mvf; + var tx3 = xw * mva + y * mvc + mve; + var ty3 = xw * mvb + y * mvd + mvf; + var vertexOffset = 0; + var textureWidth = texture.width; + var textureHeight = texture.height; + var u0 = (frameX / textureWidth); + var v0 = (frameY / textureHeight); + var u1 = (frameX + frameWidth) / textureWidth; + var v1 = (frameY + frameHeight) / textureHeight; + var tint = 0xffffffff; + + this.setTexture2D(texture, 0); + + vertexOffset = this.vertexCount * this.vertexComponentCount; + + vertexViewF32[vertexOffset + 0] = tx0; + vertexViewF32[vertexOffset + 1] = ty0; + vertexViewF32[vertexOffset + 2] = u0; + vertexViewF32[vertexOffset + 3] = v0; + vertexViewU32[vertexOffset + 4] = tint; + vertexViewF32[vertexOffset + 5] = tx1; + vertexViewF32[vertexOffset + 6] = ty1; + vertexViewF32[vertexOffset + 7] = u0; + vertexViewF32[vertexOffset + 8] = v1; + vertexViewU32[vertexOffset + 9] = tint; + vertexViewF32[vertexOffset + 10] = tx2; + vertexViewF32[vertexOffset + 11] = ty2; + vertexViewF32[vertexOffset + 12] = u1; + vertexViewF32[vertexOffset + 13] = v1; + vertexViewU32[vertexOffset + 14] = tint; + vertexViewF32[vertexOffset + 15] = tx0; + vertexViewF32[vertexOffset + 16] = ty0; + vertexViewF32[vertexOffset + 17] = u0; + vertexViewF32[vertexOffset + 18] = v0; + vertexViewU32[vertexOffset + 19] = tint; + vertexViewF32[vertexOffset + 20] = tx2; + vertexViewF32[vertexOffset + 21] = ty2; + vertexViewF32[vertexOffset + 22] = u1; + vertexViewF32[vertexOffset + 23] = v1; + vertexViewU32[vertexOffset + 24] = tint; + vertexViewF32[vertexOffset + 25] = tx3; + vertexViewF32[vertexOffset + 26] = ty3; + vertexViewF32[vertexOffset + 27] = u1; + vertexViewF32[vertexOffset + 28] = v0; + vertexViewU32[vertexOffset + 29] = tint; + + this.vertexCount += 6; + + // Force an immediate draw + this.flush(); + }, + /** * [description] * @@ -47553,7 +47827,7 @@ module.exports = TextureTintPipeline; /***/ }), -/* 237 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47563,14 +47837,14 @@ module.exports = TextureTintPipeline; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); -var Gamepad = __webpack_require__(238); -var Keyboard = __webpack_require__(242); -var Mouse = __webpack_require__(245); -var Pointer = __webpack_require__(246); +var EventEmitter = __webpack_require__(14); +var Gamepad = __webpack_require__(240); +var Keyboard = __webpack_require__(244); +var Mouse = __webpack_require__(247); +var Pointer = __webpack_require__(248); var Rectangle = __webpack_require__(8); -var Touch = __webpack_require__(247); -var TransformXY = __webpack_require__(248); +var Touch = __webpack_require__(249); +var TransformXY = __webpack_require__(250); /** * @classdesc @@ -48112,7 +48386,7 @@ module.exports = InputManager; /***/ }), -/* 238 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48122,7 +48396,7 @@ module.exports = InputManager; */ var Class = __webpack_require__(0); -var Gamepad = __webpack_require__(239); +var Gamepad = __webpack_require__(241); // https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API // https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API @@ -48505,7 +48779,7 @@ module.exports = GamepadManager; /***/ }), -/* 239 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48514,8 +48788,8 @@ module.exports = GamepadManager; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Axis = __webpack_require__(240); -var Button = __webpack_require__(241); +var Axis = __webpack_require__(242); +var Button = __webpack_require__(243); var Class = __webpack_require__(0); /** @@ -48664,7 +48938,7 @@ module.exports = Gamepad; /***/ }), -/* 240 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48772,7 +49046,7 @@ module.exports = Axis; /***/ }), -/* 241 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48892,7 +49166,7 @@ module.exports = Button; /***/ }), -/* 242 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48902,13 +49176,13 @@ module.exports = Button; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); -var Key = __webpack_require__(243); +var EventEmitter = __webpack_require__(14); +var Key = __webpack_require__(245); var KeyCodes = __webpack_require__(128); -var KeyCombo = __webpack_require__(244); -var KeyMap = __webpack_require__(524); -var ProcessKeyDown = __webpack_require__(525); -var ProcessKeyUp = __webpack_require__(526); +var KeyCombo = __webpack_require__(246); +var KeyMap = __webpack_require__(526); +var ProcessKeyDown = __webpack_require__(527); +var ProcessKeyUp = __webpack_require__(528); /** * @classdesc @@ -49324,7 +49598,7 @@ module.exports = KeyboardManager; /***/ }), -/* 243 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49522,7 +49796,7 @@ module.exports = Key; /***/ }), -/* 244 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49532,9 +49806,9 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(521); -var ResetKeyCombo = __webpack_require__(523); +var GetFastValue = __webpack_require__(2); +var ProcessKeyCombo = __webpack_require__(523); +var ResetKeyCombo = __webpack_require__(525); /** * @classdesc @@ -49792,7 +50066,7 @@ module.exports = KeyCombo; /***/ }), -/* 245 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50098,7 +50372,7 @@ module.exports = MouseManager; /***/ }), -/* 246 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50737,7 +51011,7 @@ module.exports = Pointer; /***/ }), -/* 247 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50934,7 +51208,7 @@ module.exports = TouchManager; /***/ }), -/* 248 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51000,7 +51274,7 @@ module.exports = TransformXY; /***/ }), -/* 249 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51013,7 +51287,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); -var Scene = __webpack_require__(250); +var Scene = __webpack_require__(252); var Systems = __webpack_require__(129); /** @@ -52159,7 +52433,7 @@ module.exports = SceneManager; /***/ }), -/* 250 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52215,7 +52489,7 @@ module.exports = Scene; /***/ }), -/* 251 */ +/* 253 */ /***/ (function(module, exports) { /** @@ -52243,7 +52517,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 252 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52254,7 +52528,7 @@ module.exports = UppercaseFirst; var CONST = __webpack_require__(83); var GetValue = __webpack_require__(4); -var InjectionMap = __webpack_require__(529); +var InjectionMap = __webpack_require__(531); /** * Takes a Scene configuration object and returns a fully formed Systems object. @@ -52325,7 +52599,7 @@ module.exports = Settings; /***/ }), -/* 253 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52334,9 +52608,9 @@ module.exports = Settings; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(254); -var NoAudioSoundManager = __webpack_require__(256); -var WebAudioSoundManager = __webpack_require__(258); +var HTML5AudioSoundManager = __webpack_require__(256); +var NoAudioSoundManager = __webpack_require__(258); +var WebAudioSoundManager = __webpack_require__(260); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -52373,7 +52647,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 254 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52383,7 +52657,7 @@ module.exports = SoundManagerCreator; */ var Class = __webpack_require__(0); var BaseSoundManager = __webpack_require__(84); -var HTML5AudioSound = __webpack_require__(255); +var HTML5AudioSound = __webpack_require__(257); /** * HTML5 Audio implementation of the sound manager. @@ -52710,7 +52984,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 255 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53408,7 +53682,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 256 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53418,8 +53692,8 @@ module.exports = HTML5AudioSound; */ var BaseSoundManager = __webpack_require__(84); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); -var NoAudioSound = __webpack_require__(257); +var EventEmitter = __webpack_require__(14); +var NoAudioSound = __webpack_require__(259); var NOOP = __webpack_require__(3); /** @@ -53501,7 +53775,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 257 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53511,7 +53785,7 @@ module.exports = NoAudioSoundManager; */ var BaseSound = __webpack_require__(85); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var Extend = __webpack_require__(23); /** @@ -53609,7 +53883,7 @@ module.exports = NoAudioSound; /***/ }), -/* 258 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53619,7 +53893,7 @@ module.exports = NoAudioSound; */ var Class = __webpack_require__(0); var BaseSoundManager = __webpack_require__(84); -var WebAudioSound = __webpack_require__(259); +var WebAudioSound = __webpack_require__(261); /** * @classdesc @@ -53842,7 +54116,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 259 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54512,7 +54786,7 @@ module.exports = WebAudioSound; /***/ }), -/* 260 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54521,14 +54795,14 @@ module.exports = WebAudioSound; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); var Color = __webpack_require__(36); -var EventEmitter = __webpack_require__(13); -var GenerateTexture = __webpack_require__(211); +var EventEmitter = __webpack_require__(14); +var GenerateTexture = __webpack_require__(213); var GetValue = __webpack_require__(4); -var Parser = __webpack_require__(261); -var Texture = __webpack_require__(262); +var Parser = __webpack_require__(263); +var Texture = __webpack_require__(264); /** * @classdesc @@ -55298,7 +55572,7 @@ module.exports = TextureManager; /***/ }), -/* 261 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55313,21 +55587,21 @@ module.exports = TextureManager; module.exports = { - Canvas: __webpack_require__(530), - Image: __webpack_require__(531), - JSONArray: __webpack_require__(532), - JSONHash: __webpack_require__(533), - Pyxel: __webpack_require__(534), - SpriteSheet: __webpack_require__(535), - SpriteSheetFromAtlas: __webpack_require__(536), - StarlingXML: __webpack_require__(537), - UnityYAML: __webpack_require__(538) + Canvas: __webpack_require__(532), + Image: __webpack_require__(533), + JSONArray: __webpack_require__(534), + JSONHash: __webpack_require__(535), + Pyxel: __webpack_require__(536), + SpriteSheet: __webpack_require__(537), + SpriteSheetFromAtlas: __webpack_require__(538), + StarlingXML: __webpack_require__(539), + UnityYAML: __webpack_require__(540) }; /***/ }), -/* 262 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55338,7 +55612,7 @@ module.exports = { var Class = __webpack_require__(0); var Frame = __webpack_require__(130); -var TextureSource = __webpack_require__(263); +var TextureSource = __webpack_require__(265); /** * @classdesc @@ -55760,7 +56034,7 @@ module.exports = Texture; /***/ }), -/* 263 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55960,7 +56234,7 @@ module.exports = TextureSource; /***/ }), -/* 264 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56082,7 +56356,7 @@ else { })(); /***/ }), -/* 265 */ +/* 267 */ /***/ (function(module, exports) { /** @@ -56221,7 +56495,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 266 */ +/* 268 */ /***/ (function(module, exports) { /** @@ -56336,7 +56610,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 267 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56347,27 +56621,27 @@ module.exports = ParseXMLBitmapFont; var Ellipse = __webpack_require__(135); -Ellipse.Area = __webpack_require__(556); -Ellipse.Circumference = __webpack_require__(270); +Ellipse.Area = __webpack_require__(558); +Ellipse.Circumference = __webpack_require__(272); Ellipse.CircumferencePoint = __webpack_require__(136); -Ellipse.Clone = __webpack_require__(557); +Ellipse.Clone = __webpack_require__(559); Ellipse.Contains = __webpack_require__(68); -Ellipse.ContainsPoint = __webpack_require__(558); -Ellipse.ContainsRect = __webpack_require__(559); -Ellipse.CopyFrom = __webpack_require__(560); -Ellipse.Equals = __webpack_require__(561); -Ellipse.GetBounds = __webpack_require__(562); -Ellipse.GetPoint = __webpack_require__(268); -Ellipse.GetPoints = __webpack_require__(269); -Ellipse.Offset = __webpack_require__(563); -Ellipse.OffsetPoint = __webpack_require__(564); +Ellipse.ContainsPoint = __webpack_require__(560); +Ellipse.ContainsRect = __webpack_require__(561); +Ellipse.CopyFrom = __webpack_require__(562); +Ellipse.Equals = __webpack_require__(563); +Ellipse.GetBounds = __webpack_require__(564); +Ellipse.GetPoint = __webpack_require__(270); +Ellipse.GetPoints = __webpack_require__(271); +Ellipse.Offset = __webpack_require__(565); +Ellipse.OffsetPoint = __webpack_require__(566); Ellipse.Random = __webpack_require__(109); module.exports = Ellipse; /***/ }), -/* 268 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56408,7 +56682,7 @@ module.exports = GetPoint; /***/ }), -/* 269 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56417,7 +56691,7 @@ module.exports = GetPoint; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Circumference = __webpack_require__(270); +var Circumference = __webpack_require__(272); var CircumferencePoint = __webpack_require__(136); var FromPercent = __webpack_require__(64); var MATH_CONST = __webpack_require__(16); @@ -56460,7 +56734,7 @@ module.exports = GetPoints; /***/ }), -/* 270 */ +/* 272 */ /***/ (function(module, exports) { /** @@ -56492,7 +56766,7 @@ module.exports = Circumference; /***/ }), -/* 271 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56502,7 +56776,7 @@ module.exports = Circumference; */ var Commands = __webpack_require__(127); -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -56758,7 +57032,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 272 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56898,7 +57172,7 @@ module.exports = Range; /***/ }), -/* 273 */ +/* 275 */ /***/ (function(module, exports) { /** @@ -56927,7 +57201,7 @@ module.exports = FloatBetween; /***/ }), -/* 274 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56940,51 +57214,9 @@ module.exports = FloatBetween; module.exports = { - In: __webpack_require__(576), - Out: __webpack_require__(577), - InOut: __webpack_require__(578) - -}; - - -/***/ }), -/* 275 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Phaser.Math.Easing.Bounce - -module.exports = { - - In: __webpack_require__(579), - Out: __webpack_require__(580), - InOut: __webpack_require__(581) - -}; - - -/***/ }), -/* 276 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Phaser.Math.Easing.Circular - -module.exports = { - - In: __webpack_require__(582), - Out: __webpack_require__(583), - InOut: __webpack_require__(584) + In: __webpack_require__(578), + Out: __webpack_require__(579), + InOut: __webpack_require__(580) }; @@ -56999,13 +57231,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Cubic +// Phaser.Math.Easing.Bounce module.exports = { - In: __webpack_require__(585), - Out: __webpack_require__(586), - InOut: __webpack_require__(587) + In: __webpack_require__(581), + Out: __webpack_require__(582), + InOut: __webpack_require__(583) }; @@ -57020,13 +57252,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Elastic +// Phaser.Math.Easing.Circular module.exports = { - In: __webpack_require__(588), - Out: __webpack_require__(589), - InOut: __webpack_require__(590) + In: __webpack_require__(584), + Out: __webpack_require__(585), + InOut: __webpack_require__(586) }; @@ -57041,13 +57273,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Expo +// Phaser.Math.Easing.Cubic module.exports = { - In: __webpack_require__(591), - Out: __webpack_require__(592), - InOut: __webpack_require__(593) + In: __webpack_require__(587), + Out: __webpack_require__(588), + InOut: __webpack_require__(589) }; @@ -57062,9 +57294,15 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Linear +// Phaser.Math.Easing.Elastic -module.exports = __webpack_require__(594); +module.exports = { + + In: __webpack_require__(590), + Out: __webpack_require__(591), + InOut: __webpack_require__(592) + +}; /***/ }), @@ -57077,13 +57315,13 @@ module.exports = __webpack_require__(594); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Quadratic +// Phaser.Math.Easing.Expo module.exports = { - In: __webpack_require__(595), - Out: __webpack_require__(596), - InOut: __webpack_require__(597) + In: __webpack_require__(593), + Out: __webpack_require__(594), + InOut: __webpack_require__(595) }; @@ -57098,15 +57336,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Quartic +// Phaser.Math.Easing.Linear -module.exports = { - - In: __webpack_require__(598), - Out: __webpack_require__(599), - InOut: __webpack_require__(600) - -}; +module.exports = __webpack_require__(596); /***/ }), @@ -57119,13 +57351,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Quintic +// Phaser.Math.Easing.Quadratic module.exports = { - In: __webpack_require__(601), - Out: __webpack_require__(602), - InOut: __webpack_require__(603) + In: __webpack_require__(597), + Out: __webpack_require__(598), + InOut: __webpack_require__(599) }; @@ -57140,13 +57372,13 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Sine +// Phaser.Math.Easing.Quartic module.exports = { - In: __webpack_require__(604), - Out: __webpack_require__(605), - InOut: __webpack_require__(606) + In: __webpack_require__(600), + Out: __webpack_require__(601), + InOut: __webpack_require__(602) }; @@ -57161,13 +57393,55 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Math.Easing.Stepped +// Phaser.Math.Easing.Quintic -module.exports = __webpack_require__(607); +module.exports = { + + In: __webpack_require__(603), + Out: __webpack_require__(604), + InOut: __webpack_require__(605) + +}; /***/ }), /* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Phaser.Math.Easing.Sine + +module.exports = { + + In: __webpack_require__(606), + Out: __webpack_require__(607), + InOut: __webpack_require__(608) + +}; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +// Phaser.Math.Easing.Stepped + +module.exports = __webpack_require__(609); + + +/***/ }), +/* 288 */ /***/ (function(module, exports) { /** @@ -57204,7 +57478,7 @@ module.exports = HasAny; /***/ }), -/* 287 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57626,7 +57900,7 @@ module.exports = PathFollower; /***/ }), -/* 288 */ +/* 290 */ /***/ (function(module, exports) { /** @@ -57657,96 +57931,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var GetAdvancedValue = __webpack_require__(10); - -/** - * Adds an Animation component to a Sprite and populates it based on the given config. - * - * @function Phaser.Gameobjects.BuildGameObjectAnimation - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Sprite} sprite - [description] - * @param {object} config - [description] - * - * @return {Phaser.GameObjects.Sprite} The updated Sprite. - */ -var BuildGameObjectAnimation = function (sprite, config) -{ - var animConfig = GetAdvancedValue(config, 'anims', null); - - if (animConfig === null) - { - return sprite; - } - - if (typeof animConfig === 'string') - { - // { anims: 'key' } - sprite.anims.play(animConfig); - } - else if (typeof animConfig === 'object') - { - // { anims: { - // key: string - // startFrame: [string|integer] - // delay: [float] - // repeat: [integer] - // repeatDelay: [float] - // yoyo: [boolean] - // play: [boolean] - // delayedPlay: [boolean] - // } - // } - - var anims = sprite.anims; - - var key = GetAdvancedValue(animConfig, 'key', undefined); - var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); - - var delay = GetAdvancedValue(animConfig, 'delay', 0); - var repeat = GetAdvancedValue(animConfig, 'repeat', 0); - var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); - var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); - - var play = GetAdvancedValue(animConfig, 'play', false); - var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); - - anims.delay(delay); - anims.repeat(repeat); - anims.repeatDelay(repeatDelay); - anims.yoyo(yoyo); - - if (play) - { - anims.play(key, startFrame); - } - else if (delayedPlay > 0) - { - anims.delayedPlay(delayedPlay, key, startFrame); - } - else - { - anims.load(key); - } - } - - return sprite; -}; - -module.exports = BuildGameObjectAnimation; - - -/***/ }), -/* 290 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58000,7 +58185,7 @@ module.exports = Light; /***/ }), -/* 291 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58010,8 +58195,8 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(290); -var LightPipeline = __webpack_require__(235); +var Light = __webpack_require__(291); +var LightPipeline = __webpack_require__(237); var Utils = __webpack_require__(42); /** @@ -58330,7 +58515,7 @@ module.exports = LightsManager; /***/ }), -/* 292 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58345,20 +58530,20 @@ module.exports = LightsManager; module.exports = { - Circle: __webpack_require__(655), - Ellipse: __webpack_require__(267), - Intersects: __webpack_require__(293), - Line: __webpack_require__(675), - Point: __webpack_require__(693), - Polygon: __webpack_require__(707), - Rectangle: __webpack_require__(305), - Triangle: __webpack_require__(736) + Circle: __webpack_require__(663), + Ellipse: __webpack_require__(269), + Intersects: __webpack_require__(294), + Line: __webpack_require__(683), + Point: __webpack_require__(701), + Polygon: __webpack_require__(715), + Rectangle: __webpack_require__(306), + Triangle: __webpack_require__(744) }; /***/ }), -/* 293 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58373,26 +58558,26 @@ module.exports = { module.exports = { - CircleToCircle: __webpack_require__(665), - CircleToRectangle: __webpack_require__(666), - GetRectangleIntersection: __webpack_require__(667), - LineToCircle: __webpack_require__(295), + CircleToCircle: __webpack_require__(673), + CircleToRectangle: __webpack_require__(674), + GetRectangleIntersection: __webpack_require__(675), + LineToCircle: __webpack_require__(296), LineToLine: __webpack_require__(89), - LineToRectangle: __webpack_require__(668), - PointToLine: __webpack_require__(296), - PointToLineSegment: __webpack_require__(669), - RectangleToRectangle: __webpack_require__(294), - RectangleToTriangle: __webpack_require__(670), - RectangleToValues: __webpack_require__(671), - TriangleToCircle: __webpack_require__(672), - TriangleToLine: __webpack_require__(673), - TriangleToTriangle: __webpack_require__(674) + LineToRectangle: __webpack_require__(676), + PointToLine: __webpack_require__(297), + PointToLineSegment: __webpack_require__(677), + RectangleToRectangle: __webpack_require__(295), + RectangleToTriangle: __webpack_require__(678), + RectangleToValues: __webpack_require__(679), + TriangleToCircle: __webpack_require__(680), + TriangleToLine: __webpack_require__(681), + TriangleToTriangle: __webpack_require__(682) }; /***/ }), -/* 294 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -58426,7 +58611,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 295 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58511,7 +58696,7 @@ module.exports = LineToCircle; /***/ }), -/* 296 */ +/* 297 */ /***/ (function(module, exports) { /** @@ -58540,7 +58725,7 @@ module.exports = PointToLine; /***/ }), -/* 297 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -58576,7 +58761,7 @@ module.exports = Decompose; /***/ }), -/* 298 */ +/* 299 */ /***/ (function(module, exports) { /** @@ -58611,7 +58796,7 @@ module.exports = Decompose; /***/ }), -/* 299 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58621,7 +58806,7 @@ module.exports = Decompose; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(300); +var GetPoint = __webpack_require__(301); var GetPoints = __webpack_require__(108); var Random = __webpack_require__(110); @@ -58908,7 +59093,7 @@ module.exports = Line; /***/ }), -/* 300 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58948,7 +59133,7 @@ module.exports = GetPoint; /***/ }), -/* 301 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58982,7 +59167,7 @@ module.exports = NormalAngle; /***/ }), -/* 302 */ +/* 303 */ /***/ (function(module, exports) { /** @@ -59010,7 +59195,7 @@ module.exports = GetMagnitude; /***/ }), -/* 303 */ +/* 304 */ /***/ (function(module, exports) { /** @@ -59038,7 +59223,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 304 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59048,7 +59233,7 @@ module.exports = GetMagnitudeSq; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(144); +var Contains = __webpack_require__(146); /** * @classdesc @@ -59223,7 +59408,7 @@ module.exports = Polygon; /***/ }), -/* 305 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59234,46 +59419,46 @@ module.exports = Polygon; var Rectangle = __webpack_require__(8); -Rectangle.Area = __webpack_require__(712); -Rectangle.Ceil = __webpack_require__(713); -Rectangle.CeilAll = __webpack_require__(714); -Rectangle.CenterOn = __webpack_require__(306); -Rectangle.Clone = __webpack_require__(715); +Rectangle.Area = __webpack_require__(720); +Rectangle.Ceil = __webpack_require__(721); +Rectangle.CeilAll = __webpack_require__(722); +Rectangle.CenterOn = __webpack_require__(307); +Rectangle.Clone = __webpack_require__(723); Rectangle.Contains = __webpack_require__(33); -Rectangle.ContainsPoint = __webpack_require__(716); -Rectangle.ContainsRect = __webpack_require__(717); -Rectangle.CopyFrom = __webpack_require__(718); -Rectangle.Decompose = __webpack_require__(297); -Rectangle.Equals = __webpack_require__(719); -Rectangle.FitInside = __webpack_require__(720); -Rectangle.FitOutside = __webpack_require__(721); -Rectangle.Floor = __webpack_require__(722); -Rectangle.FloorAll = __webpack_require__(723); +Rectangle.ContainsPoint = __webpack_require__(724); +Rectangle.ContainsRect = __webpack_require__(725); +Rectangle.CopyFrom = __webpack_require__(726); +Rectangle.Decompose = __webpack_require__(298); +Rectangle.Equals = __webpack_require__(727); +Rectangle.FitInside = __webpack_require__(728); +Rectangle.FitOutside = __webpack_require__(729); +Rectangle.Floor = __webpack_require__(730); +Rectangle.FloorAll = __webpack_require__(731); Rectangle.FromPoints = __webpack_require__(121); -Rectangle.GetAspectRatio = __webpack_require__(145); -Rectangle.GetCenter = __webpack_require__(724); +Rectangle.GetAspectRatio = __webpack_require__(147); +Rectangle.GetCenter = __webpack_require__(732); Rectangle.GetPoint = __webpack_require__(106); -Rectangle.GetPoints = __webpack_require__(182); -Rectangle.GetSize = __webpack_require__(725); -Rectangle.Inflate = __webpack_require__(726); -Rectangle.MarchingAnts = __webpack_require__(186); -Rectangle.MergePoints = __webpack_require__(727); -Rectangle.MergeRect = __webpack_require__(728); -Rectangle.MergeXY = __webpack_require__(729); -Rectangle.Offset = __webpack_require__(730); -Rectangle.OffsetPoint = __webpack_require__(731); -Rectangle.Overlaps = __webpack_require__(732); +Rectangle.GetPoints = __webpack_require__(184); +Rectangle.GetSize = __webpack_require__(733); +Rectangle.Inflate = __webpack_require__(734); +Rectangle.MarchingAnts = __webpack_require__(188); +Rectangle.MergePoints = __webpack_require__(735); +Rectangle.MergeRect = __webpack_require__(736); +Rectangle.MergeXY = __webpack_require__(737); +Rectangle.Offset = __webpack_require__(738); +Rectangle.OffsetPoint = __webpack_require__(739); +Rectangle.Overlaps = __webpack_require__(740); Rectangle.Perimeter = __webpack_require__(78); -Rectangle.PerimeterPoint = __webpack_require__(733); +Rectangle.PerimeterPoint = __webpack_require__(741); Rectangle.Random = __webpack_require__(107); -Rectangle.Scale = __webpack_require__(734); -Rectangle.Union = __webpack_require__(735); +Rectangle.Scale = __webpack_require__(742); +Rectangle.Union = __webpack_require__(743); module.exports = Rectangle; /***/ }), -/* 306 */ +/* 307 */ /***/ (function(module, exports) { /** @@ -59308,7 +59493,7 @@ module.exports = CenterOn; /***/ }), -/* 307 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59394,7 +59579,7 @@ module.exports = GetPoint; /***/ }), -/* 308 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59485,7 +59670,7 @@ module.exports = GetPoints; /***/ }), -/* 309 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59525,7 +59710,7 @@ module.exports = Centroid; /***/ }), -/* 310 */ +/* 311 */ /***/ (function(module, exports) { /** @@ -59564,7 +59749,7 @@ module.exports = Offset; /***/ }), -/* 311 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59627,7 +59812,7 @@ module.exports = InCenter; /***/ }), -/* 312 */ +/* 313 */ /***/ (function(module, exports) { /** @@ -59676,7 +59861,7 @@ module.exports = InteractiveObject; /***/ }), -/* 313 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59685,7 +59870,7 @@ module.exports = InteractiveObject; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MergeXHRSettings = __webpack_require__(148); +var MergeXHRSettings = __webpack_require__(150); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -59739,7 +59924,7 @@ module.exports = XHRLoader; /***/ }), -/* 314 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59752,8 +59937,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(22); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(315); +var GetFastValue = __webpack_require__(2); +var HTML5AudioFile = __webpack_require__(316); /** * @classdesc @@ -59979,7 +60164,7 @@ module.exports = AudioFile; /***/ }), -/* 315 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59990,8 +60175,8 @@ module.exports = AudioFile; var Class = __webpack_require__(0); var File = __webpack_require__(18); -var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(147); +var GetFastValue = __webpack_require__(2); +var GetURL = __webpack_require__(149); /** * @classdesc @@ -60127,7 +60312,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 316 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60140,8 +60325,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var ParseXML = __webpack_require__(228); +var GetFastValue = __webpack_require__(2); +var ParseXML = __webpack_require__(230); /** * @classdesc @@ -60239,7 +60424,7 @@ module.exports = XMLFile; /***/ }), -/* 317 */ +/* 318 */ /***/ (function(module, exports) { /** @@ -60303,7 +60488,7 @@ module.exports = NumberArray; /***/ }), -/* 318 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60406,7 +60591,7 @@ module.exports = TextFile; /***/ }), -/* 319 */ +/* 320 */ /***/ (function(module, exports) { /** @@ -60443,7 +60628,7 @@ module.exports = Normalize; /***/ }), -/* 320 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60452,7 +60637,7 @@ module.exports = Normalize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Factorial = __webpack_require__(321); +var Factorial = __webpack_require__(322); /** * [description] @@ -60474,7 +60659,7 @@ module.exports = Bernstein; /***/ }), -/* 321 */ +/* 322 */ /***/ (function(module, exports) { /** @@ -60514,7 +60699,7 @@ module.exports = Factorial; /***/ }), -/* 322 */ +/* 323 */ /***/ (function(module, exports) { /** @@ -60549,7 +60734,7 @@ module.exports = Rotate; /***/ }), -/* 323 */ +/* 324 */ /***/ (function(module, exports) { /** @@ -60578,7 +60763,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 324 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60587,12 +60772,12 @@ module.exports = RoundAwayFromZero; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ArcadeImage = __webpack_require__(325); +var ArcadeImage = __webpack_require__(326); var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var PhysicsGroup = __webpack_require__(327); -var StaticPhysicsGroup = __webpack_require__(328); +var PhysicsGroup = __webpack_require__(328); +var StaticPhysicsGroup = __webpack_require__(329); /** * @classdesc @@ -60836,7 +61021,7 @@ module.exports = Factory; /***/ }), -/* 325 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60846,7 +61031,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(326); +var Components = __webpack_require__(327); var Image = __webpack_require__(70); /** @@ -60929,7 +61114,7 @@ module.exports = ArcadeImage; /***/ }), -/* 326 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60942,24 +61127,24 @@ module.exports = ArcadeImage; module.exports = { - Acceleration: __webpack_require__(827), - Angular: __webpack_require__(828), - Bounce: __webpack_require__(829), - Debug: __webpack_require__(830), - Drag: __webpack_require__(831), - Enable: __webpack_require__(832), - Friction: __webpack_require__(833), - Gravity: __webpack_require__(834), - Immovable: __webpack_require__(835), - Mass: __webpack_require__(836), - Size: __webpack_require__(837), - Velocity: __webpack_require__(838) + Acceleration: __webpack_require__(835), + Angular: __webpack_require__(836), + Bounce: __webpack_require__(837), + Debug: __webpack_require__(838), + Drag: __webpack_require__(839), + Enable: __webpack_require__(840), + Friction: __webpack_require__(841), + Gravity: __webpack_require__(842), + Immovable: __webpack_require__(843), + Mass: __webpack_require__(844), + Size: __webpack_require__(845), + Velocity: __webpack_require__(846) }; /***/ }), -/* 327 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60971,7 +61156,7 @@ module.exports = { var ArcadeSprite = __webpack_require__(91); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var Group = __webpack_require__(69); /** @@ -61184,7 +61369,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 328 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61331,7 +61516,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 329 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61340,26 +61525,26 @@ module.exports = StaticPhysicsGroup; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(330); +var Body = __webpack_require__(331); var Clamp = __webpack_require__(60); var Class = __webpack_require__(0); -var Collider = __webpack_require__(331); +var Collider = __webpack_require__(332); var CONST = __webpack_require__(58); var DistanceBetween = __webpack_require__(41); -var EventEmitter = __webpack_require__(13); -var GetOverlapX = __webpack_require__(332); -var GetOverlapY = __webpack_require__(333); +var EventEmitter = __webpack_require__(14); +var GetOverlapX = __webpack_require__(333); +var GetOverlapY = __webpack_require__(334); var GetValue = __webpack_require__(4); -var ProcessQueue = __webpack_require__(334); -var ProcessTileCallbacks = __webpack_require__(839); +var ProcessQueue = __webpack_require__(335); +var ProcessTileCallbacks = __webpack_require__(847); var Rectangle = __webpack_require__(8); -var RTree = __webpack_require__(335); -var SeparateTile = __webpack_require__(840); -var SeparateX = __webpack_require__(845); -var SeparateY = __webpack_require__(846); +var RTree = __webpack_require__(336); +var SeparateTile = __webpack_require__(848); +var SeparateX = __webpack_require__(853); +var SeparateY = __webpack_require__(854); var Set = __webpack_require__(61); -var StaticBody = __webpack_require__(338); -var TileIntersectsBody = __webpack_require__(337); +var StaticBody = __webpack_require__(339); +var TileIntersectsBody = __webpack_require__(338); var Vector2 = __webpack_require__(6); /** @@ -63059,7 +63244,7 @@ module.exports = World; /***/ }), -/* 330 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64915,7 +65100,7 @@ module.exports = Body; /***/ }), -/* 331 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65095,7 +65280,7 @@ module.exports = Collider; /***/ }), -/* 332 */ +/* 333 */ /***/ (function(module, exports) { /** @@ -65174,7 +65359,7 @@ module.exports = GetOverlapX; /***/ }), -/* 333 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -65253,7 +65438,7 @@ module.exports = GetOverlapY; /***/ }), -/* 334 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65451,7 +65636,7 @@ module.exports = ProcessQueue; /***/ }), -/* 335 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65460,7 +65645,7 @@ module.exports = ProcessQueue; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var quickselect = __webpack_require__(336); +var quickselect = __webpack_require__(337); /** * @classdesc @@ -66060,7 +66245,7 @@ module.exports = rbush; /***/ }), -/* 336 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -66178,7 +66363,7 @@ module.exports = QuickSelect; /***/ }), -/* 337 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -66215,7 +66400,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 338 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67071,7 +67256,7 @@ module.exports = StaticBody; /***/ }), -/* 339 */ +/* 340 */ /***/ (function(module, exports) { /** @@ -67143,7 +67328,7 @@ module.exports = { /***/ }), -/* 340 */ +/* 341 */ /***/ (function(module, exports) { /** @@ -67206,7 +67391,7 @@ module.exports = { /***/ }), -/* 341 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67219,7 +67404,7 @@ var Sleeping = {}; module.exports = Sleeping; -var Events = __webpack_require__(162); +var Events = __webpack_require__(164); (function() { @@ -67341,7 +67526,7 @@ var Events = __webpack_require__(162); /***/ }), -/* 342 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67384,7 +67569,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 343 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67426,7 +67611,7 @@ module.exports = HasTileAt; /***/ }), -/* 344 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67437,7 +67622,7 @@ module.exports = HasTileAt; var Tile = __webpack_require__(44); var IsInLayerBounds = __webpack_require__(74); -var CalculateFacesAt = __webpack_require__(150); +var CalculateFacesAt = __webpack_require__(152); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -67487,7 +67672,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 345 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67496,11 +67681,11 @@ module.exports = RemoveTileAt; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(153); -var ParseCSV = __webpack_require__(346); -var ParseJSONTiled = __webpack_require__(347); -var ParseWeltmeister = __webpack_require__(352); +var Formats = __webpack_require__(20); +var Parse2DArray = __webpack_require__(155); +var ParseCSV = __webpack_require__(347); +var ParseJSONTiled = __webpack_require__(348); +var ParseWeltmeister = __webpack_require__(353); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -67557,7 +67742,7 @@ module.exports = Parse; /***/ }), -/* 346 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67566,8 +67751,8 @@ module.exports = Parse; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); -var Parse2DArray = __webpack_require__(153); +var Formats = __webpack_require__(20); +var Parse2DArray = __webpack_require__(155); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -67605,7 +67790,7 @@ module.exports = ParseCSV; /***/ }), -/* 347 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67614,14 +67799,14 @@ module.exports = ParseCSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var MapData = __webpack_require__(76); -var ParseTileLayers = __webpack_require__(893); -var ParseImageLayers = __webpack_require__(895); -var ParseTilesets = __webpack_require__(896); -var ParseObjectLayers = __webpack_require__(898); -var BuildTilesetIndex = __webpack_require__(899); -var AssignTileProperties = __webpack_require__(900); +var ParseTileLayers = __webpack_require__(901); +var ParseImageLayers = __webpack_require__(903); +var ParseTilesets = __webpack_require__(904); +var ParseObjectLayers = __webpack_require__(906); +var BuildTilesetIndex = __webpack_require__(907); +var AssignTileProperties = __webpack_require__(908); /** * Parses a Tiled JSON object into a new MapData object. @@ -67681,7 +67866,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 348 */ +/* 349 */ /***/ (function(module, exports) { /** @@ -67771,7 +67956,7 @@ module.exports = ParseGID; /***/ }), -/* 349 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67943,7 +68128,7 @@ module.exports = ImageCollection; /***/ }), -/* 350 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67952,8 +68137,8 @@ module.exports = ImageCollection; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Pick = __webpack_require__(897); -var ParseGID = __webpack_require__(348); +var Pick = __webpack_require__(905); +var ParseGID = __webpack_require__(349); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -68025,7 +68210,7 @@ module.exports = ParseObject; /***/ }), -/* 351 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68035,7 +68220,7 @@ module.exports = ParseObject; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -68131,7 +68316,7 @@ module.exports = ObjectLayer; /***/ }), -/* 352 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68140,10 +68325,10 @@ module.exports = ObjectLayer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var MapData = __webpack_require__(76); -var ParseTileLayers = __webpack_require__(901); -var ParseTilesets = __webpack_require__(902); +var ParseTileLayers = __webpack_require__(909); +var ParseTilesets = __webpack_require__(910); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -68198,7 +68383,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 353 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68209,12 +68394,12 @@ module.exports = ParseWeltmeister; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(354); +var DynamicTilemapLayer = __webpack_require__(355); var Extend = __webpack_require__(23); -var Formats = __webpack_require__(19); +var Formats = __webpack_require__(20); var LayerData = __webpack_require__(75); -var Rotate = __webpack_require__(322); -var StaticTilemapLayer = __webpack_require__(355); +var Rotate = __webpack_require__(323); +var StaticTilemapLayer = __webpack_require__(356); var Tile = __webpack_require__(44); var TilemapComponents = __webpack_require__(96); var Tileset = __webpack_require__(100); @@ -70457,7 +70642,7 @@ module.exports = Tilemap; /***/ }), -/* 354 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70467,9 +70652,9 @@ module.exports = Tilemap; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(903); -var GameObject = __webpack_require__(2); +var Components = __webpack_require__(11); +var DynamicTilemapLayerRender = __webpack_require__(911); +var GameObject = __webpack_require__(1); var TilemapComponents = __webpack_require__(96); /** @@ -71576,7 +71761,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 355 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71586,9 +71771,9 @@ module.exports = DynamicTilemapLayer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(2); -var StaticTilemapLayerRender = __webpack_require__(906); +var Components = __webpack_require__(11); +var GameObject = __webpack_require__(1); +var StaticTilemapLayerRender = __webpack_require__(914); var TilemapComponents = __webpack_require__(96); var Utils = __webpack_require__(42); @@ -71870,7 +72055,7 @@ var StaticTilemapLayer = new Class({ var ty2 = tyh; var tx3 = txw; var ty3 = ty; - var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha); + var tint = Utils.getTintAppendFloatAlpha(0xffffff, this.alpha * tile.alpha); vertexViewF32[voffset + 0] = tx0; vertexViewF32[voffset + 1] = ty0; @@ -71910,10 +72095,10 @@ var StaticTilemapLayer = new Class({ this.vertexCount = vertexCount; this.dirty = false; - if (vertexBuffer === null) { vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW); + this.vertexBuffer = vertexBuffer; } else { @@ -71924,6 +72109,7 @@ var StaticTilemapLayer = new Class({ pipeline.modelIdentity(); pipeline.modelTranslate(this.x - (camera.scrollX * this.scrollFactorX), this.y - (camera.scrollY * this.scrollFactorY), 0.0); + pipeline.modelScale(this.scaleX, this.scaleY, 1.0); pipeline.viewLoad2D(camera.matrix.matrix); } @@ -72612,7 +72798,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 356 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72622,7 +72808,7 @@ module.exports = StaticTilemapLayer; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -72915,7 +73101,7 @@ module.exports = TimerEvent; /***/ }), -/* 357 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72924,7 +73110,7 @@ module.exports = TimerEvent; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RESERVED = __webpack_require__(915); +var RESERVED = __webpack_require__(923); /** * [description] @@ -72973,7 +73159,7 @@ module.exports = GetProps; /***/ }), -/* 358 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73019,7 +73205,7 @@ module.exports = GetTweens; /***/ }), -/* 359 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73028,15 +73214,15 @@ module.exports = GetTweens; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Defaults = __webpack_require__(157); +var Defaults = __webpack_require__(159); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); var GetNewValue = __webpack_require__(101); var GetValue = __webpack_require__(4); -var GetValueOp = __webpack_require__(156); -var Tween = __webpack_require__(158); -var TweenData = __webpack_require__(159); +var GetValueOp = __webpack_require__(158); +var Tween = __webpack_require__(160); +var TweenData = __webpack_require__(161); /** * [description] @@ -73147,7 +73333,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 360 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73157,15 +73343,15 @@ module.exports = NumberTweenBuilder; */ var Clone = __webpack_require__(52); -var Defaults = __webpack_require__(157); +var Defaults = __webpack_require__(159); var GetAdvancedValue = __webpack_require__(10); var GetBoolean = __webpack_require__(73); var GetEaseFunction = __webpack_require__(71); var GetNewValue = __webpack_require__(101); -var GetTargets = __webpack_require__(155); -var GetTweens = __webpack_require__(358); +var GetTargets = __webpack_require__(157); +var GetTweens = __webpack_require__(359); var GetValue = __webpack_require__(4); -var Timeline = __webpack_require__(361); +var Timeline = __webpack_require__(362); var TweenBuilder = __webpack_require__(102); /** @@ -73299,7 +73485,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 361 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73309,7 +73495,7 @@ module.exports = TimelineBuilder; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var TweenBuilder = __webpack_require__(102); var TWEEN_CONST = __webpack_require__(87); @@ -74153,7 +74339,7 @@ module.exports = Timeline; /***/ }), -/* 362 */ +/* 363 */ /***/ (function(module, exports) { /** @@ -74200,7 +74386,7 @@ module.exports = SpliceOne; /***/ }), -/* 363 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75020,7 +75206,7 @@ module.exports = Animation; /***/ }), -/* 364 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -75160,10 +75346,9 @@ module.exports = Pair; /***/ }), -/* 365 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(366); __webpack_require__(367); __webpack_require__(368); __webpack_require__(369); @@ -75172,10 +75357,11 @@ __webpack_require__(371); __webpack_require__(372); __webpack_require__(373); __webpack_require__(374); +__webpack_require__(375); /***/ }), -/* 366 */ +/* 367 */ /***/ (function(module, exports) { /** @@ -75215,7 +75401,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 367 */ +/* 368 */ /***/ (function(module, exports) { /** @@ -75231,7 +75417,7 @@ if (!Array.isArray) /***/ }), -/* 368 */ +/* 369 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -75419,7 +75605,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 369 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -75434,7 +75620,7 @@ if (!window.console) /***/ }), -/* 370 */ +/* 371 */ /***/ (function(module, exports) { /** @@ -75482,7 +75668,7 @@ if (!Function.prototype.bind) { /***/ }), -/* 371 */ +/* 372 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -75494,7 +75680,7 @@ if (!Math.trunc) { /***/ }), -/* 372 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -75531,7 +75717,7 @@ if (!Math.trunc) { /***/ }), -/* 373 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {// References: @@ -75601,10 +75787,10 @@ if (!global.cancelAnimationFrame) { }; } -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(166))) /***/ }), -/* 374 */ +/* 375 */ /***/ (function(module, exports) { /** @@ -75656,7 +75842,7 @@ if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "o /***/ }), -/* 375 */ +/* 376 */ /***/ (function(module, exports) { /** @@ -75690,7 +75876,7 @@ module.exports = Angle; /***/ }), -/* 376 */ +/* 377 */ /***/ (function(module, exports) { /** @@ -75727,7 +75913,7 @@ module.exports = Call; /***/ }), -/* 377 */ +/* 378 */ /***/ (function(module, exports) { /** @@ -75783,7 +75969,7 @@ module.exports = GetFirst; /***/ }), -/* 378 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75792,8 +75978,8 @@ module.exports = GetFirst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AlignIn = __webpack_require__(167); -var CONST = __webpack_require__(168); +var AlignIn = __webpack_require__(169); +var CONST = __webpack_require__(170); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); var Zone = __webpack_require__(77); @@ -75897,7 +76083,7 @@ module.exports = GridAlign; /***/ }), -/* 379 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76345,7 +76531,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 380 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76591,7 +76777,7 @@ module.exports = Alpha; /***/ }), -/* 381 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76702,7 +76888,7 @@ module.exports = BlendMode; /***/ }), -/* 382 */ +/* 383 */ /***/ (function(module, exports) { /** @@ -76789,7 +76975,7 @@ module.exports = ComputedSize; /***/ }), -/* 383 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -76873,7 +77059,7 @@ module.exports = Depth; /***/ }), -/* 384 */ +/* 385 */ /***/ (function(module, exports) { /** @@ -77021,7 +77207,7 @@ module.exports = Flip; /***/ }), -/* 385 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77031,7 +77217,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(8); -var RotateAround = __webpack_require__(183); +var RotateAround = __webpack_require__(185); var Vector2 = __webpack_require__(6); /** @@ -77215,7 +77401,159 @@ module.exports = GetBounds; /***/ }), -/* 386 */ +/* 387 */ +/***/ (function(module, exports) { + +var MatrixStack = { + + matrixStack: null, + currentMatrix: null, + currentMatrixIndex: 0, + + initMatrixStack: function () + { + this.matrixStack = new Float32Array(6000); // up to 1000 matrices + this.currentMatrix = new Float32Array([1.0, 0.0, 0.0, 1.0, 0.0, 0.0]); + this.currentMatrixIndex = 0; + return this; + }, + + save: function () + { + if (this.currentMatrixIndex >= this.matrixStack.length) return this; + + var matrixStack = this.matrixStack; + var currentMatrix = this.currentMatrix; + var currentMatrixIndex = this.currentMatrixIndex; + this.currentMatrixIndex += 6; + + matrixStack[currentMatrixIndex + 0] = currentMatrix[0]; + matrixStack[currentMatrixIndex + 1] = currentMatrix[1]; + matrixStack[currentMatrixIndex + 2] = currentMatrix[2]; + matrixStack[currentMatrixIndex + 3] = currentMatrix[3]; + matrixStack[currentMatrixIndex + 4] = currentMatrix[4]; + matrixStack[currentMatrixIndex + 5] = currentMatrix[5]; + + return this; + }, + + restore: function () + { + if (this.currentMatrixIndex <= 0) return this; + + this.currentMatrixIndex -= 6; + + var matrixStack = this.matrixStack; + var currentMatrix = this.currentMatrix; + var currentMatrixIndex = this.currentMatrixIndex; + + currentMatrix[0] = matrixStack[currentMatrixIndex + 0]; + currentMatrix[1] = matrixStack[currentMatrixIndex + 1]; + currentMatrix[2] = matrixStack[currentMatrixIndex + 2]; + currentMatrix[3] = matrixStack[currentMatrixIndex + 3]; + currentMatrix[4] = matrixStack[currentMatrixIndex + 4]; + currentMatrix[5] = matrixStack[currentMatrixIndex + 5]; + + return this; + }, + + loadIdentity: function () + { + this.setTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); + return this; + }, + + transform: function (a, b, c, d, tx, ty) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var m4 = currentMatrix[4]; + var m5 = currentMatrix[5]; + + currentMatrix[0] = m0 * a + m2 * b; + currentMatrix[1] = m1 * a + m3 * b; + currentMatrix[2] = m0 * c + m2 * d; + currentMatrix[3] = m1 * c + m3 * d; + currentMatrix[4] = m0 * tx + m2 * ty + m4; + currentMatrix[5] = m1 * tx + m3 * ty + m5; + + return this; + }, + + setTransform: function (a, b, c, d, tx, ty) + { + var currentMatrix = this.currentMatrix; + + currentMatrix[0] = a; + currentMatrix[1] = b; + currentMatrix[2] = c; + currentMatrix[3] = d; + currentMatrix[4] = tx; + currentMatrix[5] = ty; + + return this; + }, + + translate: function (x, y) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var m4 = currentMatrix[4]; + var m5 = currentMatrix[5]; + + currentMatrix[4] = m0 * x + m2 * y + m4; + currentMatrix[5] = m1 * x + m3 * y + m5; + + return this; + }, + + scale: function (x, y) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + + currentMatrix[0] = m0 * x; + currentMatrix[1] = m1 * x; + currentMatrix[2] = m2 * y; + currentMatrix[3] = m3 * y; + + return this; + }, + + rotate: function (t) + { + var currentMatrix = this.currentMatrix; + var m0 = currentMatrix[0]; + var m1 = currentMatrix[1]; + var m2 = currentMatrix[2]; + var m3 = currentMatrix[3]; + var st = Math.sin(t); + var ct = Math.cos(t); + + currentMatrix[0] = m0 * ct + m2 * st; + currentMatrix[1] = m1 * ct + m3 * st; + currentMatrix[2] = m2 * -st + m2 * ct; + currentMatrix[3] = m3 * -st + m3 * ct; + + return this; + } + +}; + +module.exports = MatrixStack; + + +/***/ }), +/* 388 */ /***/ (function(module, exports) { /** @@ -77407,7 +77745,7 @@ module.exports = Origin; /***/ }), -/* 387 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77478,7 +77816,7 @@ module.exports = ScaleMode; /***/ }), -/* 388 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -77570,7 +77908,7 @@ module.exports = ScrollFactor; /***/ }), -/* 389 */ +/* 391 */ /***/ (function(module, exports) { /** @@ -77715,7 +78053,7 @@ module.exports = Size; /***/ }), -/* 390 */ +/* 392 */ /***/ (function(module, exports) { /** @@ -77815,7 +78153,7 @@ module.exports = Texture; /***/ }), -/* 391 */ +/* 393 */ /***/ (function(module, exports) { /** @@ -78010,7 +78348,7 @@ module.exports = Tint; /***/ }), -/* 392 */ +/* 394 */ /***/ (function(module, exports) { /** @@ -78063,7 +78401,7 @@ module.exports = ToJSON; /***/ }), -/* 393 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78073,8 +78411,8 @@ module.exports = ToJSON; */ var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(160); -var WrapAngleDegrees = __webpack_require__(161); +var WrapAngle = __webpack_require__(162); +var WrapAngleDegrees = __webpack_require__(163); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -78416,7 +78754,7 @@ module.exports = Transform; /***/ }), -/* 394 */ +/* 396 */ /***/ (function(module, exports) { /** @@ -78496,7 +78834,7 @@ module.exports = Visible; /***/ }), -/* 395 */ +/* 397 */ /***/ (function(module, exports) { /** @@ -78530,7 +78868,7 @@ module.exports = IncAlpha; /***/ }), -/* 396 */ +/* 398 */ /***/ (function(module, exports) { /** @@ -78564,7 +78902,7 @@ module.exports = IncX; /***/ }), -/* 397 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -78600,7 +78938,7 @@ module.exports = IncXY; /***/ }), -/* 398 */ +/* 400 */ /***/ (function(module, exports) { /** @@ -78634,7 +78972,7 @@ module.exports = IncY; /***/ }), -/* 399 */ +/* 401 */ /***/ (function(module, exports) { /** @@ -78679,7 +79017,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 400 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -78727,7 +79065,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 401 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78769,7 +79107,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 402 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78778,9 +79116,9 @@ module.exports = PlaceOnLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MarchingAnts = __webpack_require__(186); -var RotateLeft = __webpack_require__(187); -var RotateRight = __webpack_require__(188); +var MarchingAnts = __webpack_require__(188); +var RotateLeft = __webpack_require__(189); +var RotateRight = __webpack_require__(190); // Place the items in the array around the perimeter of the given rectangle. @@ -78828,7 +79166,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 403 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78838,7 +79176,7 @@ module.exports = PlaceOnRectangle; */ // var GetPointsOnLine = require('../geom/line/GetPointsOnLine'); -var BresenhamPoints = __webpack_require__(189); +var BresenhamPoints = __webpack_require__(191); /** * [description] @@ -78886,7 +79224,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 404 */ +/* 406 */ /***/ (function(module, exports) { /** @@ -78921,7 +79259,7 @@ module.exports = PlayAnimation; /***/ }), -/* 405 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78957,7 +79295,7 @@ module.exports = RandomCircle; /***/ }), -/* 406 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78993,7 +79331,7 @@ module.exports = RandomEllipse; /***/ }), -/* 407 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79029,7 +79367,7 @@ module.exports = RandomLine; /***/ }), -/* 408 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79065,7 +79403,7 @@ module.exports = RandomRectangle; /***/ }), -/* 409 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79101,7 +79439,7 @@ module.exports = RandomTriangle; /***/ }), -/* 410 */ +/* 412 */ /***/ (function(module, exports) { /** @@ -79138,7 +79476,7 @@ module.exports = Rotate; /***/ }), -/* 411 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79181,7 +79519,7 @@ module.exports = RotateAround; /***/ }), -/* 412 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79228,7 +79566,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 413 */ +/* 415 */ /***/ (function(module, exports) { /** @@ -79262,7 +79600,7 @@ module.exports = ScaleX; /***/ }), -/* 414 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -79298,7 +79636,7 @@ module.exports = ScaleXY; /***/ }), -/* 415 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -79332,7 +79670,7 @@ module.exports = ScaleY; /***/ }), -/* 416 */ +/* 418 */ /***/ (function(module, exports) { /** @@ -79369,7 +79707,7 @@ module.exports = SetAlpha; /***/ }), -/* 417 */ +/* 419 */ /***/ (function(module, exports) { /** @@ -79403,7 +79741,7 @@ module.exports = SetBlendMode; /***/ }), -/* 418 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -79440,7 +79778,7 @@ module.exports = SetDepth; /***/ }), -/* 419 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -79475,7 +79813,7 @@ module.exports = SetHitArea; /***/ }), -/* 420 */ +/* 422 */ /***/ (function(module, exports) { /** @@ -79510,7 +79848,7 @@ module.exports = SetOrigin; /***/ }), -/* 421 */ +/* 423 */ /***/ (function(module, exports) { /** @@ -79547,7 +79885,7 @@ module.exports = SetRotation; /***/ }), -/* 422 */ +/* 424 */ /***/ (function(module, exports) { /** @@ -79590,7 +79928,7 @@ module.exports = SetScale; /***/ }), -/* 423 */ +/* 425 */ /***/ (function(module, exports) { /** @@ -79627,7 +79965,7 @@ module.exports = SetScaleX; /***/ }), -/* 424 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -79664,7 +80002,7 @@ module.exports = SetScaleY; /***/ }), -/* 425 */ +/* 427 */ /***/ (function(module, exports) { /** @@ -79701,7 +80039,7 @@ module.exports = SetTint; /***/ }), -/* 426 */ +/* 428 */ /***/ (function(module, exports) { /** @@ -79735,7 +80073,7 @@ module.exports = SetVisible; /***/ }), -/* 427 */ +/* 429 */ /***/ (function(module, exports) { /** @@ -79772,7 +80110,7 @@ module.exports = SetX; /***/ }), -/* 428 */ +/* 430 */ /***/ (function(module, exports) { /** @@ -79813,7 +80151,7 @@ module.exports = SetXY; /***/ }), -/* 429 */ +/* 431 */ /***/ (function(module, exports) { /** @@ -79850,7 +80188,7 @@ module.exports = SetY; /***/ }), -/* 430 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79977,7 +80315,7 @@ module.exports = ShiftPosition; /***/ }), -/* 431 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80007,7 +80345,7 @@ module.exports = Shuffle; /***/ }), -/* 432 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80016,7 +80354,7 @@ module.exports = Shuffle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmootherStep = __webpack_require__(190); +var MathSmootherStep = __webpack_require__(192); /** * [description] @@ -80061,7 +80399,7 @@ module.exports = SmootherStep; /***/ }), -/* 433 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80070,7 +80408,7 @@ module.exports = SmootherStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MathSmoothStep = __webpack_require__(191); +var MathSmoothStep = __webpack_require__(193); /** * [description] @@ -80115,7 +80453,7 @@ module.exports = SmoothStep; /***/ }), -/* 434 */ +/* 436 */ /***/ (function(module, exports) { /** @@ -80167,7 +80505,7 @@ module.exports = Spread; /***/ }), -/* 435 */ +/* 437 */ /***/ (function(module, exports) { /** @@ -80200,7 +80538,7 @@ module.exports = ToggleVisible; /***/ }), -/* 436 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80215,54 +80553,9 @@ module.exports = ToggleVisible; module.exports = { - Animation: __webpack_require__(192), - AnimationFrame: __webpack_require__(193), - AnimationManager: __webpack_require__(194) - -}; - - -/***/ }), -/* 437 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Cache - */ - -module.exports = { - - BaseCache: __webpack_require__(196), - CacheManager: __webpack_require__(197) - -}; - - -/***/ }), -/* 438 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Cameras - */ - -module.exports = { - - Controls: __webpack_require__(439), - Scene2D: __webpack_require__(442), - Sprite3D: __webpack_require__(444) + Animation: __webpack_require__(194), + AnimationFrame: __webpack_require__(195), + AnimationManager: __webpack_require__(196) }; @@ -80278,13 +80571,13 @@ module.exports = { */ /** - * @namespace Phaser.Cameras.Controls + * @namespace Phaser.Cache */ module.exports = { - Fixed: __webpack_require__(440), - Smoothed: __webpack_require__(441) + BaseCache: __webpack_require__(198), + CacheManager: __webpack_require__(199) }; @@ -80293,6 +80586,51 @@ module.exports = { /* 440 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Cameras + */ + +module.exports = { + + Controls: __webpack_require__(441), + Scene2D: __webpack_require__(444), + Sprite3D: __webpack_require__(446) + +}; + + +/***/ }), +/* 441 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Cameras.Controls + */ + +module.exports = { + + Fixed: __webpack_require__(442), + Smoothed: __webpack_require__(443) + +}; + + +/***/ }), +/* 442 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -80583,7 +80921,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 441 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81048,7 +81386,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 442 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81064,13 +81402,13 @@ module.exports = SmoothedKeyControl; module.exports = { Camera: __webpack_require__(114), - CameraManager: __webpack_require__(443) + CameraManager: __webpack_require__(445) }; /***/ }), -/* 443 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81081,8 +81419,8 @@ module.exports = { var Camera = __webpack_require__(114); var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); -var PluginManager = __webpack_require__(11); +var GetFastValue = __webpack_require__(2); +var PluginManager = __webpack_require__(12); var RectangleContains = __webpack_require__(33); /** @@ -81550,7 +81888,7 @@ module.exports = CameraManager; /***/ }), -/* 444 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81566,15 +81904,15 @@ module.exports = CameraManager; module.exports = { Camera: __webpack_require__(117), - CameraManager: __webpack_require__(448), - OrthographicCamera: __webpack_require__(209), - PerspectiveCamera: __webpack_require__(210) + CameraManager: __webpack_require__(450), + OrthographicCamera: __webpack_require__(211), + PerspectiveCamera: __webpack_require__(212) }; /***/ }), -/* 445 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81588,12 +81926,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(446); + renderWebGL = __webpack_require__(448); } if (true) { - renderCanvas = __webpack_require__(447); + renderCanvas = __webpack_require__(449); } module.exports = { @@ -81605,7 +81943,7 @@ module.exports = { /***/ }), -/* 446 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81614,7 +81952,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -81644,7 +81982,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 447 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81653,7 +81991,7 @@ module.exports = SpriteWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -81683,7 +82021,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 448 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81693,9 +82031,9 @@ module.exports = SpriteCanvasRenderer; */ var Class = __webpack_require__(0); -var OrthographicCamera = __webpack_require__(209); -var PerspectiveCamera = __webpack_require__(210); -var PluginManager = __webpack_require__(11); +var OrthographicCamera = __webpack_require__(211); +var PerspectiveCamera = __webpack_require__(212); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -81717,7 +82055,7 @@ var CameraManager = new Class({ /** * [description] * - * @name Phaser.Cameras.Sprite3D#scene + * @name Phaser.Cameras.Sprite3D.CameraManager#scene * @type {Phaser.Scene} * @since 3.0.0 */ @@ -81726,7 +82064,7 @@ var CameraManager = new Class({ /** * [description] * - * @name Phaser.Cameras.Sprite3D#systems + * @name Phaser.Cameras.Sprite3D.CameraManager#systems * @type {Phaser.Scenes.Systems} * @since 3.0.0 */ @@ -81735,7 +82073,7 @@ var CameraManager = new Class({ /** * An Array of the Camera objects being managed by this Camera Manager. * - * @name Phaser.Cameras.Sprite3D#cameras + * @name Phaser.Cameras.Sprite3D.CameraManager#cameras * @type {array} * @since 3.0.0 */ @@ -81785,8 +82123,8 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#addOrthographicCamera * @since 3.0.0 * - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} width - [description] + * @param {number} height - [description] * * @return {[type]} [description] */ @@ -81810,9 +82148,9 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#addPerspectiveCamera * @since 3.0.0 * - * @param {[type]} fieldOfView - [description] - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} [fieldOfView=80] - [description] + * @param {number} [width] - [description] + * @param {number} [height] - [description] * * @return {[type]} [description] */ @@ -81837,7 +82175,7 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#getCamera * @since 3.0.0 * - * @param {[type]} name - [description] + * @param {string} name - [description] * * @return {[type]} [description] */ @@ -81898,8 +82236,8 @@ var CameraManager = new Class({ * @method Phaser.Cameras.Sprite3D.CameraManager#update * @since 3.0.0 * - * @param {[type]} timestep - [description] - * @param {[type]} delta - [description] + * @param {number} timestep - [description] + * @param {number} delta - [description] */ update: function (timestep, delta) { @@ -81938,7 +82276,7 @@ module.exports = CameraManager; /***/ }), -/* 449 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81953,14 +82291,14 @@ module.exports = CameraManager; module.exports = { - GenerateTexture: __webpack_require__(211), - Palettes: __webpack_require__(450) + GenerateTexture: __webpack_require__(213), + Palettes: __webpack_require__(452) }; /***/ }), -/* 450 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81975,17 +82313,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(212), - C64: __webpack_require__(451), - CGA: __webpack_require__(452), - JMP: __webpack_require__(453), - MSX: __webpack_require__(454) + ARNE16: __webpack_require__(214), + C64: __webpack_require__(453), + CGA: __webpack_require__(454), + JMP: __webpack_require__(455), + MSX: __webpack_require__(456) }; /***/ }), -/* 451 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -82039,7 +82377,7 @@ module.exports = { /***/ }), -/* 452 */ +/* 454 */ /***/ (function(module, exports) { /** @@ -82093,7 +82431,7 @@ module.exports = { /***/ }), -/* 453 */ +/* 455 */ /***/ (function(module, exports) { /** @@ -82147,7 +82485,7 @@ module.exports = { /***/ }), -/* 454 */ +/* 456 */ /***/ (function(module, exports) { /** @@ -82201,7 +82539,7 @@ module.exports = { /***/ }), -/* 455 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82216,19 +82554,19 @@ module.exports = { module.exports = { - Path: __webpack_require__(456), + Path: __webpack_require__(458), - CubicBezier: __webpack_require__(213), + CubicBezier: __webpack_require__(215), Curve: __webpack_require__(66), - Ellipse: __webpack_require__(215), - Line: __webpack_require__(217), - Spline: __webpack_require__(218) + Ellipse: __webpack_require__(217), + Line: __webpack_require__(219), + Spline: __webpack_require__(220) }; /***/ }), -/* 456 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82240,13 +82578,13 @@ 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__(213); -var EllipseCurve = __webpack_require__(215); +var CubicBezierCurve = __webpack_require__(215); +var EllipseCurve = __webpack_require__(217); var GameObjectFactory = __webpack_require__(9); -var LineCurve = __webpack_require__(217); -var MovePathTo = __webpack_require__(457); +var LineCurve = __webpack_require__(219); +var MovePathTo = __webpack_require__(459); var Rectangle = __webpack_require__(8); -var SplineCurve = __webpack_require__(218); +var SplineCurve = __webpack_require__(220); var Vector2 = __webpack_require__(6); /** @@ -82993,7 +83331,7 @@ module.exports = Path; /***/ }), -/* 457 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83129,7 +83467,7 @@ module.exports = MoveTo; /***/ }), -/* 458 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83145,13 +83483,13 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(79), - DataManagerPlugin: __webpack_require__(459) + DataManagerPlugin: __webpack_require__(461) }; /***/ }), -/* 459 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83162,7 +83500,7 @@ module.exports = { var Class = __webpack_require__(0); var DataManager = __webpack_require__(79); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -83259,7 +83597,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 460 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83274,67 +83612,15 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(461), - Bounds: __webpack_require__(476), - Canvas: __webpack_require__(479), - Color: __webpack_require__(220), - Masks: __webpack_require__(490) + Align: __webpack_require__(463), + Bounds: __webpack_require__(478), + Canvas: __webpack_require__(481), + Color: __webpack_require__(222), + Masks: __webpack_require__(492) }; -/***/ }), -/* 461 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Display.Align - */ - -module.exports = { - - In: __webpack_require__(462), - To: __webpack_require__(463) - -}; - - -/***/ }), -/* 462 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.Display.Align.In - */ - -module.exports = { - - BottomCenter: __webpack_require__(169), - BottomLeft: __webpack_require__(170), - BottomRight: __webpack_require__(171), - Center: __webpack_require__(172), - LeftCenter: __webpack_require__(174), - QuickSet: __webpack_require__(167), - RightCenter: __webpack_require__(175), - TopCenter: __webpack_require__(176), - TopLeft: __webpack_require__(177), - TopRight: __webpack_require__(178) - -}; - - /***/ }), /* 463 */ /***/ (function(module, exports, __webpack_require__) { @@ -83346,23 +83632,13 @@ module.exports = { */ /** - * @namespace Phaser.Display.Align.To + * @namespace Phaser.Display.Align */ module.exports = { - BottomCenter: __webpack_require__(464), - BottomLeft: __webpack_require__(465), - BottomRight: __webpack_require__(466), - LeftBottom: __webpack_require__(467), - LeftCenter: __webpack_require__(468), - LeftTop: __webpack_require__(469), - RightBottom: __webpack_require__(470), - RightCenter: __webpack_require__(471), - RightTop: __webpack_require__(472), - TopCenter: __webpack_require__(473), - TopLeft: __webpack_require__(474), - TopRight: __webpack_require__(475) + In: __webpack_require__(464), + To: __webpack_require__(465) }; @@ -83371,6 +83647,68 @@ module.exports = { /* 464 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Display.Align.In + */ + +module.exports = { + + BottomCenter: __webpack_require__(171), + BottomLeft: __webpack_require__(172), + BottomRight: __webpack_require__(173), + Center: __webpack_require__(174), + LeftCenter: __webpack_require__(176), + QuickSet: __webpack_require__(169), + RightCenter: __webpack_require__(177), + TopCenter: __webpack_require__(178), + TopLeft: __webpack_require__(179), + TopRight: __webpack_require__(180) + +}; + + +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @namespace Phaser.Display.Align.To + */ + +module.exports = { + + BottomCenter: __webpack_require__(466), + BottomLeft: __webpack_require__(467), + BottomRight: __webpack_require__(468), + LeftBottom: __webpack_require__(469), + LeftCenter: __webpack_require__(470), + LeftTop: __webpack_require__(471), + RightBottom: __webpack_require__(472), + RightCenter: __webpack_require__(473), + RightTop: __webpack_require__(474), + TopCenter: __webpack_require__(475), + TopLeft: __webpack_require__(476), + TopRight: __webpack_require__(477) + +}; + + +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -83410,7 +83748,7 @@ module.exports = BottomCenter; /***/ }), -/* 465 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83452,7 +83790,7 @@ module.exports = BottomLeft; /***/ }), -/* 466 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83494,7 +83832,7 @@ module.exports = BottomRight; /***/ }), -/* 467 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83536,7 +83874,7 @@ module.exports = LeftBottom; /***/ }), -/* 468 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83578,7 +83916,7 @@ module.exports = LeftCenter; /***/ }), -/* 469 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83620,7 +83958,7 @@ module.exports = LeftTop; /***/ }), -/* 470 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83662,7 +84000,7 @@ module.exports = RightBottom; /***/ }), -/* 471 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83704,7 +84042,7 @@ module.exports = RightCenter; /***/ }), -/* 472 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83746,7 +84084,7 @@ module.exports = RightTop; /***/ }), -/* 473 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83788,7 +84126,7 @@ module.exports = TopCenter; /***/ }), -/* 474 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83830,7 +84168,7 @@ module.exports = TopLeft; /***/ }), -/* 475 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83872,7 +84210,7 @@ module.exports = TopRight; /***/ }), -/* 476 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83887,13 +84225,13 @@ module.exports = TopRight; module.exports = { - CenterOn: __webpack_require__(173), + CenterOn: __webpack_require__(175), GetBottom: __webpack_require__(24), GetCenterX: __webpack_require__(46), GetCenterY: __webpack_require__(49), GetLeft: __webpack_require__(26), - GetOffsetX: __webpack_require__(477), - GetOffsetY: __webpack_require__(478), + GetOffsetX: __webpack_require__(479), + GetOffsetY: __webpack_require__(480), GetRight: __webpack_require__(28), GetTop: __webpack_require__(30), SetBottom: __webpack_require__(25), @@ -83907,7 +84245,7 @@ module.exports = { /***/ }), -/* 477 */ +/* 479 */ /***/ (function(module, exports) { /** @@ -83937,7 +84275,7 @@ module.exports = GetOffsetX; /***/ }), -/* 478 */ +/* 480 */ /***/ (function(module, exports) { /** @@ -83967,7 +84305,7 @@ module.exports = GetOffsetY; /***/ }), -/* 479 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83982,17 +84320,17 @@ module.exports = GetOffsetY; module.exports = { - Interpolation: __webpack_require__(219), - Pool: __webpack_require__(20), + Interpolation: __webpack_require__(221), + Pool: __webpack_require__(21), Smoothing: __webpack_require__(120), - TouchAction: __webpack_require__(480), - UserSelect: __webpack_require__(481) + TouchAction: __webpack_require__(482), + UserSelect: __webpack_require__(483) }; /***/ }), -/* 480 */ +/* 482 */ /***/ (function(module, exports) { /** @@ -84027,7 +84365,7 @@ module.exports = TouchAction; /***/ }), -/* 481 */ +/* 483 */ /***/ (function(module, exports) { /** @@ -84074,7 +84412,7 @@ module.exports = UserSelect; /***/ }), -/* 482 */ +/* 484 */ /***/ (function(module, exports) { /** @@ -84122,7 +84460,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 483 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84132,7 +84470,7 @@ module.exports = ColorToRGBA; */ var Color = __webpack_require__(36); -var HueToComponent = __webpack_require__(222); +var HueToComponent = __webpack_require__(224); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -84172,7 +84510,7 @@ module.exports = HSLToColor; /***/ }), -/* 484 */ +/* 486 */ /***/ (function(module, exports) { module.exports = function(module) { @@ -84200,7 +84538,7 @@ module.exports = function(module) { /***/ }), -/* 485 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84209,7 +84547,7 @@ module.exports = function(module) { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HSVToRGB = __webpack_require__(223); +var HSVToRGB = __webpack_require__(225); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -84241,7 +84579,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 486 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84250,7 +84588,7 @@ module.exports = HSVColorWheel; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Linear = __webpack_require__(224); +var Linear = __webpack_require__(226); /** * Interpolates color values @@ -84344,7 +84682,7 @@ module.exports = { /***/ }), -/* 487 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84353,7 +84691,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Between = __webpack_require__(226); +var Between = __webpack_require__(228); var Color = __webpack_require__(36); /** @@ -84380,7 +84718,7 @@ module.exports = RandomRGB; /***/ }), -/* 488 */ +/* 490 */ /***/ (function(module, exports) { /** @@ -84444,7 +84782,7 @@ module.exports = RGBToHSV; /***/ }), -/* 489 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84453,7 +84791,7 @@ module.exports = RGBToHSV; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ComponentToHex = __webpack_require__(221); +var ComponentToHex = __webpack_require__(223); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -84488,7 +84826,7 @@ module.exports = RGBToString; /***/ }), -/* 490 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84503,14 +84841,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(491), - GeometryMask: __webpack_require__(492) + BitmapMask: __webpack_require__(493), + GeometryMask: __webpack_require__(494) }; /***/ }), -/* 491 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84725,7 +85063,7 @@ module.exports = BitmapMask; /***/ }), -/* 492 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84869,7 +85207,7 @@ module.exports = GeometryMask; /***/ }), -/* 493 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84885,16 +85223,16 @@ module.exports = GeometryMask; module.exports = { AddToDOM: __webpack_require__(123), - DOMContentLoaded: __webpack_require__(227), - ParseXML: __webpack_require__(228), - RemoveFromDOM: __webpack_require__(229), - RequestAnimationFrame: __webpack_require__(230) + DOMContentLoaded: __webpack_require__(229), + ParseXML: __webpack_require__(230), + RemoveFromDOM: __webpack_require__(231), + RequestAnimationFrame: __webpack_require__(232) }; /***/ }), -/* 494 */ +/* 496 */ /***/ (function(module, exports) { // shim for using process in browser @@ -85084,7 +85422,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 495 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85094,8 +85432,8 @@ process.umask = function() { return 0; }; */ var Class = __webpack_require__(0); -var EE = __webpack_require__(13); -var PluginManager = __webpack_require__(11); +var EE = __webpack_require__(14); +var PluginManager = __webpack_require__(12); /** * @namespace Phaser.Events @@ -85266,7 +85604,7 @@ module.exports = EventEmitter; /***/ }), -/* 496 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85276,25 +85614,25 @@ module.exports = EventEmitter; */ var AddToDOM = __webpack_require__(123); -var AnimationManager = __webpack_require__(194); -var CacheManager = __webpack_require__(197); -var CanvasPool = __webpack_require__(20); +var AnimationManager = __webpack_require__(196); +var CacheManager = __webpack_require__(199); +var CanvasPool = __webpack_require__(21); var Class = __webpack_require__(0); -var Config = __webpack_require__(497); -var CreateRenderer = __webpack_require__(498); +var Config = __webpack_require__(499); +var CreateRenderer = __webpack_require__(500); var DataManager = __webpack_require__(79); -var DebugHeader = __webpack_require__(515); -var Device = __webpack_require__(516); -var DOMContentLoaded = __webpack_require__(227); -var EventEmitter = __webpack_require__(13); -var InputManager = __webpack_require__(237); +var DebugHeader = __webpack_require__(517); +var Device = __webpack_require__(518); +var DOMContentLoaded = __webpack_require__(229); +var EventEmitter = __webpack_require__(14); +var InputManager = __webpack_require__(239); var NOOP = __webpack_require__(3); -var PluginManager = __webpack_require__(11); -var SceneManager = __webpack_require__(249); -var SoundManagerCreator = __webpack_require__(253); -var TextureManager = __webpack_require__(260); -var TimeStep = __webpack_require__(539); -var VisibilityHandler = __webpack_require__(540); +var PluginManager = __webpack_require__(12); +var SceneManager = __webpack_require__(251); +var SoundManagerCreator = __webpack_require__(255); +var TextureManager = __webpack_require__(262); +var TimeStep = __webpack_require__(541); +var VisibilityHandler = __webpack_require__(542); /** * @classdesc @@ -85747,7 +86085,7 @@ module.exports = Game; /***/ }), -/* 497 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85761,7 +86099,7 @@ var CONST = __webpack_require__(22); var GetValue = __webpack_require__(4); var MATH = __webpack_require__(16); var NOOP = __webpack_require__(3); -var Plugins = __webpack_require__(231); +var Plugins = __webpack_require__(233); var ValueToColor = __webpack_require__(115); /** @@ -85978,7 +86316,7 @@ module.exports = Config; /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85987,8 +86325,8 @@ module.exports = Config; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasInterpolation = __webpack_require__(219); -var CanvasPool = __webpack_require__(20); +var CanvasInterpolation = __webpack_require__(221); +var CanvasPool = __webpack_require__(21); var CONST = __webpack_require__(22); var Features = __webpack_require__(124); @@ -86066,8 +86404,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(499); - WebGLRenderer = __webpack_require__(504); + CanvasRenderer = __webpack_require__(501); + WebGLRenderer = __webpack_require__(506); // Let the config pick the renderer type, both are included if (config.renderType === CONST.WEBGL) @@ -86107,7 +86445,7 @@ module.exports = CreateRenderer; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86116,12 +86454,12 @@ module.exports = CreateRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BlitImage = __webpack_require__(500); -var CanvasSnapshot = __webpack_require__(501); +var BlitImage = __webpack_require__(502); +var CanvasSnapshot = __webpack_require__(503); var Class = __webpack_require__(0); var CONST = __webpack_require__(22); -var DrawImage = __webpack_require__(502); -var GetBlendModes = __webpack_require__(503); +var DrawImage = __webpack_require__(504); +var GetBlendModes = __webpack_require__(505); var ScaleModes = __webpack_require__(62); var Smoothing = __webpack_require__(120); @@ -86636,7 +86974,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, exports) { /** @@ -86677,7 +87015,7 @@ module.exports = BlitImage; /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports) { /** @@ -86716,7 +87054,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports) { /** @@ -86811,7 +87149,7 @@ module.exports = DrawImage; /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86821,7 +87159,7 @@ module.exports = DrawImage; */ var modes = __webpack_require__(45); -var CanvasFeatures = __webpack_require__(232); +var CanvasFeatures = __webpack_require__(234); /** * [description] @@ -86861,7 +87199,7 @@ module.exports = GetBlendModes; /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86874,13 +87212,13 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(22); var IsSizePowerOfTwo = __webpack_require__(125); var Utils = __webpack_require__(42); -var WebGLSnapshot = __webpack_require__(505); +var WebGLSnapshot = __webpack_require__(507); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(506); -var FlatTintPipeline = __webpack_require__(509); -var ForwardDiffuseLightPipeline = __webpack_require__(235); -var TextureTintPipeline = __webpack_require__(236); +var BitmapMaskPipeline = __webpack_require__(508); +var FlatTintPipeline = __webpack_require__(511); +var ForwardDiffuseLightPipeline = __webpack_require__(237); +var TextureTintPipeline = __webpack_require__(238); /** * @classdesc @@ -88069,8 +88407,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteTexture: function () + deleteTexture: function (texture) { + this.gl.deleteTexture(texture); return this; }, @@ -88084,8 +88423,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteFramebuffer: function () + deleteFramebuffer: function (framebuffer) { + this.gl.deleteFramebuffer(framebuffer); return this; }, @@ -88099,8 +88439,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteProgram: function () + deleteProgram: function (program) { + this.gl.deleteProgram(program); return this; }, @@ -88114,8 +88455,9 @@ var WebGLRenderer = new Class({ * * @return {Phaser.Renderer.WebGL.WebGLRenderer} [description] */ - deleteBuffer: function () + deleteBuffer: function (buffer) { + this.gl.deleteBuffer(buffer); return this; }, @@ -88662,7 +89004,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports) { /** @@ -88731,7 +89073,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88741,8 +89083,8 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(507); -var ShaderSourceVS = __webpack_require__(508); +var ShaderSourceFS = __webpack_require__(509); +var ShaderSourceVS = __webpack_require__(510); var WebGLPipeline = __webpack_require__(126); /** @@ -88942,19 +89284,19 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uMaskSampler;\r\n\r\nvoid main()\r\n{\r\n vec2 uv = gl_FragCoord.xy / uResolution;\r\n vec4 mainColor = texture2D(uMainSampler, uv);\r\n vec4 maskColor = texture2D(uMaskSampler, uv);\r\n float alpha = maskColor.a * mainColor.a;\r\n gl_FragColor = vec4(mainColor.rgb * alpha, alpha);\r\n}\r\n" /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision mediump float;\r\n\r\nattribute vec2 inPosition;\r\n\r\nvoid main()\r\n{\r\n gl_Position = vec4(inPosition, 0.0, 1.0);\r\n}\r\n" /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88965,10 +89307,10 @@ module.exports = "#define SHADER_NAME PHASER_BITMAP_MASK_VS\r\n\r\nprecision med var Class = __webpack_require__(0); var Commands = __webpack_require__(127); -var Earcut = __webpack_require__(233); -var ModelViewProjection = __webpack_require__(234); -var ShaderSourceFS = __webpack_require__(510); -var ShaderSourceVS = __webpack_require__(511); +var Earcut = __webpack_require__(235); +var ModelViewProjection = __webpack_require__(236); +var ShaderSourceFS = __webpack_require__(512); +var ShaderSourceVS = __webpack_require__(513); var Utils = __webpack_require__(42); var WebGLPipeline = __webpack_require__(126); @@ -90173,37 +90515,37 @@ module.exports = FlatTintPipeline; /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main() {\r\n gl_FragColor = vec4(outTint.rgb * outTint.a, outTint.a);\r\n}\r\n" /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FLAT_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec4 inTint;\r\n\r\nvarying vec4 outTint;\r\n\r\nvoid main () {\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTint = inTint;\r\n}\r\n" /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS\r\n\r\nprecision mediump float;\r\n\r\nstruct Light\r\n{\r\n vec2 position;\r\n vec3 color;\r\n float intensity;\r\n float radius;\r\n};\r\n\r\nconst int kMaxLights = %LIGHT_COUNT%;\r\n\r\nuniform vec4 uCamera; /* x, y, rotation, zoom */\r\nuniform vec2 uResolution;\r\nuniform sampler2D uMainSampler;\r\nuniform sampler2D uNormSampler;\r\nuniform vec3 uAmbientLightColor;\r\nuniform Light uLights[kMaxLights];\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main()\r\n{\r\n vec3 finalColor = vec3(0.0, 0.0, 0.0);\r\n vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);\r\n vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;\r\n vec3 normal = normalize(vec3(normalMap * 2.0 - 1.0));\r\n vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;\r\n\r\n for (int index = 0; index < kMaxLights; ++index)\r\n {\r\n Light light = uLights[index];\r\n vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);\r\n vec3 lightNormal = normalize(lightDir);\r\n float distToSurf = length(lightDir) * uCamera.w;\r\n float diffuseFactor = max(dot(normal, lightNormal), 0.0);\r\n float radius = (light.radius / res.x * uCamera.w) * uCamera.w;\r\n float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);\r\n vec3 diffuse = light.color * diffuseFactor;\r\n finalColor += (attenuation * diffuse) * light.intensity;\r\n }\r\n\r\n vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);\r\n gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);\r\n\r\n}\r\n" /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_FS\r\n\r\nprecision mediump float;\r\n\r\nuniform sampler2D uMainSampler;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main() \r\n{\r\n vec4 texel = texture2D(uMainSampler, outTexCoord);\r\n texel *= vec4(outTint.rgb * outTint.a, outTint.a);\r\n gl_FragColor = texel;\r\n}\r\n" /***/ }), -/* 514 */ +/* 516 */ /***/ (function(module, exports) { module.exports = "#define SHADER_NAME PHASER_TEXTURE_TINT_VS\r\n\r\nprecision mediump float;\r\n\r\nuniform mat4 uProjectionMatrix;\r\nuniform mat4 uViewMatrix;\r\nuniform mat4 uModelMatrix;\r\n\r\nattribute vec2 inPosition;\r\nattribute vec2 inTexCoord;\r\nattribute vec4 inTint;\r\n\r\nvarying vec2 outTexCoord;\r\nvarying vec4 outTint;\r\n\r\nvoid main () \r\n{\r\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);\r\n outTexCoord = inTexCoord;\r\n outTint = inTint;\r\n}\r\n\r\n" /***/ }), -/* 515 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90322,7 +90664,7 @@ module.exports = DebugHeader; /***/ }), -/* 516 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90345,17 +90687,17 @@ module.exports = { os: __webpack_require__(67), browser: __webpack_require__(82), features: __webpack_require__(124), - input: __webpack_require__(517), - audio: __webpack_require__(518), - video: __webpack_require__(519), - fullscreen: __webpack_require__(520), - canvasFeatures: __webpack_require__(232) + input: __webpack_require__(519), + audio: __webpack_require__(520), + video: __webpack_require__(521), + fullscreen: __webpack_require__(522), + canvasFeatures: __webpack_require__(234) }; /***/ }), -/* 517 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90435,7 +90777,7 @@ module.exports = init(); /***/ }), -/* 518 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90561,7 +90903,7 @@ module.exports = init(); /***/ }), -/* 519 */ +/* 521 */ /***/ (function(module, exports) { /** @@ -90647,7 +90989,7 @@ module.exports = init(); /***/ }), -/* 520 */ +/* 522 */ /***/ (function(module, exports) { /** @@ -90746,7 +91088,7 @@ module.exports = init(); /***/ }), -/* 521 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90755,7 +91097,7 @@ module.exports = init(); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(522); +var AdvanceKeyCombo = __webpack_require__(524); /** * Used internally by the KeyCombo class. @@ -90826,7 +91168,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 522 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -90867,7 +91209,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 523 */ +/* 525 */ /***/ (function(module, exports) { /** @@ -90901,7 +91243,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 524 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90923,7 +91265,7 @@ module.exports = KeyMap; /***/ }), -/* 525 */ +/* 527 */ /***/ (function(module, exports) { /** @@ -90978,7 +91320,7 @@ module.exports = ProcessKeyDown; /***/ }), -/* 526 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -91028,7 +91370,7 @@ module.exports = ProcessKeyUp; /***/ }), -/* 527 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91037,8 +91379,8 @@ module.exports = ProcessKeyUp; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); -var UppercaseFirst = __webpack_require__(251); +var GetFastValue = __webpack_require__(2); +var UppercaseFirst = __webpack_require__(253); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -91090,7 +91432,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 528 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91099,7 +91441,7 @@ module.exports = GetPhysicsPlugins; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. @@ -91136,7 +91478,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 529 */ +/* 531 */ /***/ (function(module, exports) { /** @@ -91184,7 +91526,7 @@ module.exports = InjectionMap; /***/ }), -/* 530 */ +/* 532 */ /***/ (function(module, exports) { /** @@ -91217,7 +91559,7 @@ module.exports = Canvas; /***/ }), -/* 531 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -91250,7 +91592,7 @@ module.exports = Image; /***/ }), -/* 532 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91355,7 +91697,7 @@ module.exports = JSONArray; /***/ }), -/* 533 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91452,7 +91794,7 @@ module.exports = JSONHash; /***/ }), -/* 534 */ +/* 536 */ /***/ (function(module, exports) { /** @@ -91525,7 +91867,7 @@ module.exports = Pyxel; /***/ }), -/* 535 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91534,7 +91876,7 @@ module.exports = Pyxel; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parses a Sprite Sheet and adds the Frames to the Texture. @@ -91637,7 +91979,7 @@ module.exports = SpriteSheet; /***/ }), -/* 536 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91646,7 +91988,7 @@ module.exports = SpriteSheet; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas. @@ -91820,7 +92162,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 537 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -91903,7 +92245,7 @@ module.exports = StarlingXML; /***/ }), -/* 538 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -92070,7 +92412,7 @@ TextureImporter: /***/ }), -/* 539 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92082,7 +92424,7 @@ TextureImporter: var Class = __webpack_require__(0); var GetValue = __webpack_require__(4); var NOOP = __webpack_require__(3); -var RequestAnimationFrame = __webpack_require__(230); +var RequestAnimationFrame = __webpack_require__(232); // Frame Rate config // fps: { @@ -92692,7 +93034,7 @@ module.exports = TimeStep; /***/ }), -/* 540 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -92806,7 +93148,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 541 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92821,12 +93163,12 @@ module.exports = VisibilityHandler; var GameObjects = { - DisplayList: __webpack_require__(542), - GameObjectCreator: __webpack_require__(14), + DisplayList: __webpack_require__(544), + GameObjectCreator: __webpack_require__(13), GameObjectFactory: __webpack_require__(9), - UpdateList: __webpack_require__(543), + UpdateList: __webpack_require__(545), - Components: __webpack_require__(12), + Components: __webpack_require__(11), BitmapText: __webpack_require__(131), Blitter: __webpack_require__(132), @@ -92835,44 +93177,47 @@ var GameObjects = { Group: __webpack_require__(69), Image: __webpack_require__(70), Particles: __webpack_require__(137), - PathFollower: __webpack_require__(287), + PathFollower: __webpack_require__(289), + RenderTexture: __webpack_require__(139), Sprite3D: __webpack_require__(81), Sprite: __webpack_require__(37), - Text: __webpack_require__(139), - TileSprite: __webpack_require__(140), + Text: __webpack_require__(140), + TileSprite: __webpack_require__(141), Zone: __webpack_require__(77), // Game Object Factories Factories: { - Blitter: __webpack_require__(622), - DynamicBitmapText: __webpack_require__(623), - Graphics: __webpack_require__(624), - Group: __webpack_require__(625), - Image: __webpack_require__(626), - Particles: __webpack_require__(627), - PathFollower: __webpack_require__(628), - Sprite3D: __webpack_require__(629), - Sprite: __webpack_require__(630), - StaticBitmapText: __webpack_require__(631), - Text: __webpack_require__(632), - TileSprite: __webpack_require__(633), - Zone: __webpack_require__(634) + Blitter: __webpack_require__(628), + DynamicBitmapText: __webpack_require__(629), + Graphics: __webpack_require__(630), + Group: __webpack_require__(631), + Image: __webpack_require__(632), + Particles: __webpack_require__(633), + PathFollower: __webpack_require__(634), + RenderTexture: __webpack_require__(635), + Sprite3D: __webpack_require__(636), + Sprite: __webpack_require__(637), + StaticBitmapText: __webpack_require__(638), + Text: __webpack_require__(639), + TileSprite: __webpack_require__(640), + Zone: __webpack_require__(641) }, Creators: { - Blitter: __webpack_require__(635), - DynamicBitmapText: __webpack_require__(636), - Graphics: __webpack_require__(637), - Group: __webpack_require__(638), - Image: __webpack_require__(639), - Particles: __webpack_require__(640), - Sprite3D: __webpack_require__(641), - Sprite: __webpack_require__(642), - StaticBitmapText: __webpack_require__(643), - Text: __webpack_require__(644), - TileSprite: __webpack_require__(645), - Zone: __webpack_require__(646) + Blitter: __webpack_require__(642), + DynamicBitmapText: __webpack_require__(643), + Graphics: __webpack_require__(644), + Group: __webpack_require__(645), + Image: __webpack_require__(646), + Particles: __webpack_require__(647), + RenderTexture: __webpack_require__(648), + Sprite3D: __webpack_require__(649), + Sprite: __webpack_require__(650), + StaticBitmapText: __webpack_require__(651), + Text: __webpack_require__(652), + TileSprite: __webpack_require__(653), + Zone: __webpack_require__(654) } }; @@ -92881,25 +93226,25 @@ if (true) { // WebGL only Game Objects GameObjects.Mesh = __webpack_require__(88); - GameObjects.Quad = __webpack_require__(141); + GameObjects.Quad = __webpack_require__(143); - GameObjects.Factories.Mesh = __webpack_require__(650); - GameObjects.Factories.Quad = __webpack_require__(651); + GameObjects.Factories.Mesh = __webpack_require__(658); + GameObjects.Factories.Quad = __webpack_require__(659); - GameObjects.Creators.Mesh = __webpack_require__(652); - GameObjects.Creators.Quad = __webpack_require__(653); + GameObjects.Creators.Mesh = __webpack_require__(660); + GameObjects.Creators.Quad = __webpack_require__(661); - GameObjects.Light = __webpack_require__(290); + GameObjects.Light = __webpack_require__(291); - __webpack_require__(291); - __webpack_require__(654); + __webpack_require__(292); + __webpack_require__(662); } module.exports = GameObjects; /***/ }), -/* 542 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92910,8 +93255,8 @@ module.exports = GameObjects; var Class = __webpack_require__(0); var List = __webpack_require__(86); -var PluginManager = __webpack_require__(11); -var StableSort = __webpack_require__(264); +var PluginManager = __webpack_require__(12); +var StableSort = __webpack_require__(266); /** * @classdesc @@ -93071,7 +93416,7 @@ module.exports = DisplayList; /***/ }), -/* 543 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93081,7 +93426,7 @@ module.exports = DisplayList; */ var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -93341,7 +93686,7 @@ module.exports = UpdateList; /***/ }), -/* 544 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93350,7 +93695,7 @@ module.exports = UpdateList; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(266); +var ParseXMLBitmapFont = __webpack_require__(268); var ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing) { @@ -93375,7 +93720,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 545 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93570,7 +93915,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 546 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93584,12 +93929,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(547); + renderWebGL = __webpack_require__(549); } if (true) { - renderCanvas = __webpack_require__(548); + renderCanvas = __webpack_require__(550); } module.exports = { @@ -93601,7 +93946,7 @@ module.exports = { /***/ }), -/* 547 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93610,7 +93955,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -93643,7 +93988,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 548 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93652,7 +93997,7 @@ module.exports = BitmapTextWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -93805,7 +94150,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 549 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93819,12 +94164,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(550); + renderWebGL = __webpack_require__(552); } if (true) { - renderCanvas = __webpack_require__(551); + renderCanvas = __webpack_require__(553); } module.exports = { @@ -93836,7 +94181,7 @@ module.exports = { /***/ }), -/* 550 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93845,7 +94190,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -93875,7 +94220,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 551 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93884,7 +94229,7 @@ module.exports = BlitterWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -93958,7 +94303,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 552 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94303,7 +94648,7 @@ module.exports = Bob; /***/ }), -/* 553 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94317,12 +94662,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(554); + renderWebGL = __webpack_require__(556); } if (true) { - renderCanvas = __webpack_require__(555); + renderCanvas = __webpack_require__(557); } module.exports = { @@ -94334,7 +94679,7 @@ module.exports = { /***/ }), -/* 554 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94343,7 +94688,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -94376,7 +94721,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 555 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94385,7 +94730,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -94569,7 +94914,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 556 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -94603,7 +94948,7 @@ module.exports = Area; /***/ }), -/* 557 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94633,7 +94978,7 @@ module.exports = Clone; /***/ }), -/* 558 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94664,7 +95009,7 @@ module.exports = ContainsPoint; /***/ }), -/* 559 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94700,7 +95045,7 @@ module.exports = ContainsRect; /***/ }), -/* 560 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -94730,7 +95075,7 @@ module.exports = CopyFrom; /***/ }), -/* 561 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -94765,7 +95110,7 @@ module.exports = Equals; /***/ }), -/* 562 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94803,7 +95148,7 @@ module.exports = GetBounds; /***/ }), -/* 563 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -94836,7 +95181,7 @@ module.exports = Offset; /***/ }), -/* 564 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -94868,7 +95213,7 @@ module.exports = OffsetPoint; /***/ }), -/* 565 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94882,15 +95227,15 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(566); + renderWebGL = __webpack_require__(568); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(271); + renderCanvas = __webpack_require__(273); } if (true) { - renderCanvas = __webpack_require__(271); + renderCanvas = __webpack_require__(273); } module.exports = { @@ -94902,7 +95247,7 @@ module.exports = { /***/ }), -/* 566 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94911,7 +95256,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -94941,7 +95286,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 567 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94955,12 +95300,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(568); + renderWebGL = __webpack_require__(570); } if (true) { - renderCanvas = __webpack_require__(569); + renderCanvas = __webpack_require__(571); } module.exports = { @@ -94972,7 +95317,7 @@ module.exports = { /***/ }), -/* 568 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94981,7 +95326,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -95011,7 +95356,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 569 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95020,7 +95365,7 @@ module.exports = ImageWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -95050,7 +95395,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 570 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95060,7 +95405,7 @@ module.exports = ImageCanvasRenderer; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -95265,7 +95610,7 @@ module.exports = GravityWell; /***/ }), -/* 571 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95276,18 +95621,18 @@ module.exports = GravityWell; var BlendModes = __webpack_require__(45); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(572); -var EdgeZone = __webpack_require__(573); -var EmitterOp = __webpack_require__(574); -var GetFastValue = __webpack_require__(1); +var Components = __webpack_require__(11); +var DeathZone = __webpack_require__(574); +var EdgeZone = __webpack_require__(575); +var EmitterOp = __webpack_require__(576); +var GetFastValue = __webpack_require__(2); var GetRandomElement = __webpack_require__(138); -var HasAny = __webpack_require__(286); +var HasAny = __webpack_require__(288); var HasValue = __webpack_require__(72); -var Particle = __webpack_require__(608); -var RandomZone = __webpack_require__(609); +var Particle = __webpack_require__(610); +var RandomZone = __webpack_require__(611); var Rectangle = __webpack_require__(8); -var StableSort = __webpack_require__(264); +var StableSort = __webpack_require__(266); var Vector2 = __webpack_require__(6); var Wrap = __webpack_require__(50); @@ -97246,7 +97591,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 572 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97324,7 +97669,7 @@ module.exports = DeathZone; /***/ }), -/* 573 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97563,7 +97908,7 @@ module.exports = EdgeZone; /***/ }), -/* 574 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97573,9 +97918,9 @@ module.exports = EdgeZone; */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(273); +var FloatBetween = __webpack_require__(275); var GetEaseFunction = __webpack_require__(71); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(50); /** @@ -98122,7 +98467,7 @@ module.exports = EmitterOp; /***/ }), -/* 575 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98131,18 +98476,18 @@ module.exports = EmitterOp; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Back = __webpack_require__(274); -var Bounce = __webpack_require__(275); -var Circular = __webpack_require__(276); -var Cubic = __webpack_require__(277); -var Elastic = __webpack_require__(278); -var Expo = __webpack_require__(279); -var Linear = __webpack_require__(280); -var Quadratic = __webpack_require__(281); -var Quartic = __webpack_require__(282); -var Quintic = __webpack_require__(283); -var Sine = __webpack_require__(284); -var Stepped = __webpack_require__(285); +var Back = __webpack_require__(276); +var Bounce = __webpack_require__(277); +var Circular = __webpack_require__(278); +var Cubic = __webpack_require__(279); +var Elastic = __webpack_require__(280); +var Expo = __webpack_require__(281); +var Linear = __webpack_require__(282); +var Quadratic = __webpack_require__(283); +var Quartic = __webpack_require__(284); +var Quintic = __webpack_require__(285); +var Sine = __webpack_require__(286); +var Stepped = __webpack_require__(287); // EaseMap module.exports = { @@ -98203,7 +98548,7 @@ module.exports = { /***/ }), -/* 576 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -98234,7 +98579,7 @@ module.exports = In; /***/ }), -/* 577 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -98265,7 +98610,7 @@ module.exports = Out; /***/ }), -/* 578 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -98305,7 +98650,7 @@ module.exports = InOut; /***/ }), -/* 579 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -98350,7 +98695,7 @@ module.exports = In; /***/ }), -/* 580 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -98393,7 +98738,7 @@ module.exports = Out; /***/ }), -/* 581 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -98457,7 +98802,7 @@ module.exports = InOut; /***/ }), -/* 582 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -98485,7 +98830,7 @@ module.exports = In; /***/ }), -/* 583 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -98513,7 +98858,7 @@ module.exports = Out; /***/ }), -/* 584 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -98548,7 +98893,7 @@ module.exports = InOut; /***/ }), -/* 585 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -98576,7 +98921,7 @@ module.exports = In; /***/ }), -/* 586 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -98604,7 +98949,7 @@ module.exports = Out; /***/ }), -/* 587 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -98639,7 +98984,7 @@ module.exports = InOut; /***/ }), -/* 588 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -98694,7 +99039,7 @@ module.exports = In; /***/ }), -/* 589 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -98749,7 +99094,7 @@ module.exports = Out; /***/ }), -/* 590 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -98811,7 +99156,7 @@ module.exports = InOut; /***/ }), -/* 591 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -98839,7 +99184,7 @@ module.exports = In; /***/ }), -/* 592 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -98867,7 +99212,7 @@ module.exports = Out; /***/ }), -/* 593 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -98902,7 +99247,7 @@ module.exports = InOut; /***/ }), -/* 594 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -98930,7 +99275,7 @@ module.exports = Linear; /***/ }), -/* 595 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -98958,7 +99303,7 @@ module.exports = In; /***/ }), -/* 596 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -98986,7 +99331,7 @@ module.exports = Out; /***/ }), -/* 597 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -99021,7 +99366,7 @@ module.exports = InOut; /***/ }), -/* 598 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -99049,7 +99394,7 @@ module.exports = In; /***/ }), -/* 599 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -99077,7 +99422,7 @@ module.exports = Out; /***/ }), -/* 600 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -99112,7 +99457,7 @@ module.exports = InOut; /***/ }), -/* 601 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -99140,7 +99485,7 @@ module.exports = In; /***/ }), -/* 602 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -99168,7 +99513,7 @@ module.exports = Out; /***/ }), -/* 603 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -99203,7 +99548,7 @@ module.exports = InOut; /***/ }), -/* 604 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -99242,7 +99587,7 @@ module.exports = In; /***/ }), -/* 605 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -99281,7 +99626,7 @@ module.exports = Out; /***/ }), -/* 606 */ +/* 608 */ /***/ (function(module, exports) { /** @@ -99320,7 +99665,7 @@ module.exports = InOut; /***/ }), -/* 607 */ +/* 609 */ /***/ (function(module, exports) { /** @@ -99362,7 +99707,7 @@ module.exports = Stepped; /***/ }), -/* 608 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99963,7 +100308,7 @@ module.exports = Particle; /***/ }), -/* 609 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100036,7 +100381,7 @@ module.exports = RandomZone; /***/ }), -/* 610 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100050,12 +100395,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(611); + renderWebGL = __webpack_require__(613); } if (true) { - renderCanvas = __webpack_require__(612); + renderCanvas = __webpack_require__(614); } module.exports = { @@ -100067,7 +100412,7 @@ module.exports = { /***/ }), -/* 611 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100076,7 +100421,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -100108,7 +100453,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 612 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100117,7 +100462,7 @@ module.exports = ParticleManagerWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -100205,7 +100550,126 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 613 */ +/* 615 */ +/***/ (function(module, exports) { + +var RenderTextureWebGL = { + + fill: function (color) + { + return this; + }, + + clear: function () + { + this.renderer.setFramebuffer(this.framebuffer); + var gl = this.gl; + gl.clearColor(0, 0, 0, 0); + gl.clear(gl.COLOR_BUFFER_BIT); + this.renderer.setFramebuffer(null); + return this; + }, + + draw: function (texture, x, y) + { + this.renderer.setFramebuffer(this.framebuffer); + this.renderer.pipelines.TextureTintPipeline.drawTexture(texture, x, y, 0, 0, texture.width, texture.height, this.currentMatrix); + this.renderer.setFramebuffer(null); + return this; + }, + + drawFrame: function (texture, x, y, frame) + { + this.renderer.setFramebuffer(this.framebuffer); + this.renderer.pipelines.TextureTintPipeline.drawTexture(texture, frame.x, frame.y, frame.width, frame.height, texture.width, texture.height, this.currentMatrix); + this.renderer.setFramebuffer(null); + return this; + } + +}; + +module.exports = RenderTextureWebGL; + + +/***/ }), +/* 616 */ +/***/ (function(module, exports, __webpack_require__) { + +var renderWebGL = __webpack_require__(3); +var renderCanvas = __webpack_require__(3); + +if (true) +{ + renderWebGL = __webpack_require__(617); +} + +if (true) +{ + renderCanvas = __webpack_require__(618); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 617 */ +/***/ (function(module, exports, __webpack_require__) { + +var GameObject = __webpack_require__(1); + +var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolationPercentage, camera) +{ + if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id))) + { + return; + } + + this.pipeline.batchTexture( + renderTexture, + renderTexture.texture, + renderTexture.texture.width, renderTexture.texture.height, + renderTexture.x, renderTexture.y, + renderTexture.width, renderTexture.height, + renderTexture.scaleX, renderTexture.scaleY, + renderTexture.rotation, + renderTexture.flipX, renderTexture.flipY, + renderTexture.scrollFactorX, renderTexture.scrollFactorY, + renderTexture.displayOriginX, renderTexture.displayOriginY, + 0, 0, renderTexture.texture.width, renderTexture.texture.height, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0, 0, + camera + ); +}; + +module.exports = RenderTextureWebGLRenderer; + + +/***/ }), +/* 618 */ +/***/ (function(module, exports, __webpack_require__) { + +var GameObject = __webpack_require__(1); + +var RenderTextureCanvasRenderer = function (renderer, renderTexture, interpolationPercentage, camera) +{ + if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id))) + { + return; + } + +}; + +module.exports = RenderTextureCanvasRenderer; + + +/***/ }), +/* 619 */ /***/ (function(module, exports) { /** @@ -100284,7 +100748,7 @@ module.exports = GetTextSize; /***/ }), -/* 614 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100298,12 +100762,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(615); + renderWebGL = __webpack_require__(621); } if (true) { - renderCanvas = __webpack_require__(616); + renderCanvas = __webpack_require__(622); } module.exports = { @@ -100315,7 +100779,7 @@ module.exports = { /***/ }), -/* 615 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100324,7 +100788,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -100360,7 +100824,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 616 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100369,7 +100833,7 @@ module.exports = TextWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -100434,7 +100898,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 617 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100446,7 +100910,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); -var MeasureText = __webpack_require__(618); +var MeasureText = __webpack_require__(624); // Key: [ Object Key, Default Value ] @@ -100729,9 +101193,9 @@ var TextStyle = new Class({ * @since 3.0.0 * * @param {[type]} style - [description] - * @param {[type]} updateText - [description] + * @param {boolean} [updateText=true] - [description] * - * @return {Phaser.GameObjects.Components.TextStyle This TextStyle component. + * @return {Phaser.GameObjects.Components.TextStyle} This TextStyle component. */ setStyle: function (style, updateText) { @@ -101004,7 +101468,7 @@ var TextStyle = new Class({ * @method Phaser.GameObjects.Components.TextStyle#setBackgroundColor * @since 3.0.0 * - * @param {string color - [description] + * @param {string} color - [description] * * @return {Phaser.GameObjects.Text} The parent Text object. */ @@ -101349,7 +101813,7 @@ module.exports = TextStyle; /***/ }), -/* 618 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101358,7 +101822,7 @@ module.exports = TextStyle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CanvasPool = __webpack_require__(20); +var CanvasPool = __webpack_require__(21); /** * Calculates the ascent, descent and fontSize of a given font style. @@ -101478,7 +101942,7 @@ module.exports = MeasureText; /***/ }), -/* 619 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101492,12 +101956,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(620); + renderWebGL = __webpack_require__(626); } if (true) { - renderCanvas = __webpack_require__(621); + renderCanvas = __webpack_require__(627); } module.exports = { @@ -101509,7 +101973,7 @@ module.exports = { /***/ }), -/* 620 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101518,7 +101982,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -101550,7 +102014,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 621 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101559,7 +102023,7 @@ module.exports = TileSpriteWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -101624,7 +102088,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 622 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101666,7 +102130,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 623 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101709,7 +102173,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 624 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101748,7 +102212,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 625 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101794,7 +102258,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 626 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101836,7 +102300,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 627 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101882,7 +102346,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 628 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101892,7 +102356,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(9); -var PathFollower = __webpack_require__(287); +var PathFollower = __webpack_require__(289); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -101930,7 +102394,20 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 629 */ +/* 635 */ +/***/ (function(module, exports, __webpack_require__) { + +var GameObjectFactory = __webpack_require__(9); +var RenderTexture = __webpack_require__(139); + +GameObjectFactory.register('renderTexture', function (x, y, width, height) +{ + return this.displayList.add(new RenderTexture(this.scene, x, y, width, height)); +}); + + +/***/ }), +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101978,7 +102455,7 @@ GameObjectFactory.register('sprite3D', function (x, y, z, key, frame) /***/ }), -/* 630 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102025,7 +102502,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 631 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102068,7 +102545,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) /***/ }), -/* 632 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102077,7 +102554,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Text = __webpack_require__(139); +var Text = __webpack_require__(140); var GameObjectFactory = __webpack_require__(9); /** @@ -102110,7 +102587,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 633 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102119,7 +102596,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileSprite = __webpack_require__(140); +var TileSprite = __webpack_require__(141); var GameObjectFactory = __webpack_require__(9); /** @@ -102154,7 +102631,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 634 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102196,7 +102673,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 635 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102206,8 +102683,8 @@ GameObjectFactory.register('zone', function (x, y, width, height) */ var Blitter = __webpack_require__(132); -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); /** @@ -102238,7 +102715,7 @@ GameObjectCreator.register('blitter', function (config) /***/ }), -/* 636 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102248,8 +102725,8 @@ GameObjectCreator.register('blitter', function (config) */ var BitmapText = __webpack_require__(133); -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); /** @@ -102282,7 +102759,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) /***/ }), -/* 637 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102291,7 +102768,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var Graphics = __webpack_require__(134); /** @@ -102315,7 +102792,7 @@ GameObjectCreator.register('graphics', function (config) /***/ }), -/* 638 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102324,7 +102801,7 @@ GameObjectCreator.register('graphics', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var Group = __webpack_require__(69); /** @@ -102348,7 +102825,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 639 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102357,8 +102834,8 @@ GameObjectCreator.register('group', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Image = __webpack_require__(70); @@ -102390,7 +102867,7 @@ GameObjectCreator.register('image', function (config) /***/ }), -/* 640 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102399,9 +102876,9 @@ GameObjectCreator.register('image', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var ParticleEmitterManager = __webpack_require__(137); /** @@ -102447,7 +102924,31 @@ GameObjectCreator.register('particles', function (config) /***/ }), -/* 641 */ +/* 648 */ +/***/ (function(module, exports, __webpack_require__) { + +var BuildGameObject = __webpack_require__(19); +var BuildGameObjectAnimation = __webpack_require__(142); +var GameObjectCreator = __webpack_require__(13); +var GetAdvancedValue = __webpack_require__(10); +var RenderTexture = __webpack_require__(139); + +GameObjectCreator.register('renderTexture', function (config) +{ + var x = GetAdvancedValue(config, 'x', 0); + var y = GetAdvancedValue(config, 'y', 0); + var width = GetAdvancedValue(config, 'width', 32); + var height = GetAdvancedValue(config, 'height', 32); + var renderTexture = new RenderTexture(this.scene, x, y, width, height); + + BuildGameObject(this.scene, renderTexture, config); + + return renderTexture; +}); + + +/***/ }), +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102456,9 +102957,9 @@ GameObjectCreator.register('particles', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(289); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var BuildGameObjectAnimation = __webpack_require__(142); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Sprite3D = __webpack_require__(81); @@ -102496,7 +102997,7 @@ GameObjectCreator.register('sprite3D', function (config) /***/ }), -/* 642 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102505,9 +103006,9 @@ GameObjectCreator.register('sprite3D', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var BuildGameObjectAnimation = __webpack_require__(289); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var BuildGameObjectAnimation = __webpack_require__(142); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Sprite = __webpack_require__(37); @@ -102545,7 +103046,7 @@ GameObjectCreator.register('sprite', function (config) /***/ }), -/* 643 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102555,8 +103056,8 @@ GameObjectCreator.register('sprite', function (config) */ var BitmapText = __webpack_require__(131); -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); @@ -102591,7 +103092,7 @@ GameObjectCreator.register('bitmapText', function (config) /***/ }), -/* 644 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102600,10 +103101,10 @@ GameObjectCreator.register('bitmapText', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var Text = __webpack_require__(139); +var Text = __webpack_require__(140); /** * Creates a new Text Game Object and returns it. @@ -102670,7 +103171,7 @@ GameObjectCreator.register('text', function (config) /***/ }), -/* 645 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102679,10 +103180,10 @@ GameObjectCreator.register('text', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var TileSprite = __webpack_require__(140); +var TileSprite = __webpack_require__(141); /** * Creates a new TileSprite Game Object and returns it. @@ -102716,7 +103217,7 @@ GameObjectCreator.register('tileSprite', function (config) /***/ }), -/* 646 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102725,7 +103226,7 @@ GameObjectCreator.register('tileSprite', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var Zone = __webpack_require__(77); @@ -102755,7 +103256,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 647 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102769,12 +103270,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(648); + renderWebGL = __webpack_require__(656); } if (true) { - renderCanvas = __webpack_require__(649); + renderCanvas = __webpack_require__(657); } module.exports = { @@ -102786,7 +103287,7 @@ module.exports = { /***/ }), -/* 648 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102795,7 +103296,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -102825,7 +103326,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 649 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -102854,7 +103355,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 650 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102904,7 +103405,7 @@ if (true) /***/ }), -/* 651 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102913,7 +103414,7 @@ if (true) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Quad = __webpack_require__(141); +var Quad = __webpack_require__(143); var GameObjectFactory = __webpack_require__(9); /** @@ -102950,7 +103451,7 @@ if (true) /***/ }), -/* 652 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102959,8 +103460,8 @@ if (true) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); var GetValue = __webpack_require__(4); var Mesh = __webpack_require__(88); @@ -102997,7 +103498,7 @@ GameObjectCreator.register('mesh', function (config) /***/ }), -/* 653 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103006,10 +103507,10 @@ GameObjectCreator.register('mesh', function (config) * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(21); -var GameObjectCreator = __webpack_require__(14); +var BuildGameObject = __webpack_require__(19); +var GameObjectCreator = __webpack_require__(13); var GetAdvancedValue = __webpack_require__(10); -var Quad = __webpack_require__(141); +var Quad = __webpack_require__(143); /** * Creates a new Quad Game Object and returns it. @@ -103041,7 +103542,7 @@ GameObjectCreator.register('quad', function (config) /***/ }), -/* 654 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103051,8 +103552,8 @@ GameObjectCreator.register('quad', function (config) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(291); -var PluginManager = __webpack_require__(11); +var LightsManager = __webpack_require__(292); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -103136,7 +103637,7 @@ module.exports = LightsPlugin; /***/ }), -/* 655 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103147,27 +103648,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(63); -Circle.Area = __webpack_require__(656); -Circle.Circumference = __webpack_require__(181); +Circle.Area = __webpack_require__(664); +Circle.Circumference = __webpack_require__(183); Circle.CircumferencePoint = __webpack_require__(104); -Circle.Clone = __webpack_require__(657); +Circle.Clone = __webpack_require__(665); Circle.Contains = __webpack_require__(32); -Circle.ContainsPoint = __webpack_require__(658); -Circle.ContainsRect = __webpack_require__(659); -Circle.CopyFrom = __webpack_require__(660); -Circle.Equals = __webpack_require__(661); -Circle.GetBounds = __webpack_require__(662); -Circle.GetPoint = __webpack_require__(179); -Circle.GetPoints = __webpack_require__(180); -Circle.Offset = __webpack_require__(663); -Circle.OffsetPoint = __webpack_require__(664); +Circle.ContainsPoint = __webpack_require__(666); +Circle.ContainsRect = __webpack_require__(667); +Circle.CopyFrom = __webpack_require__(668); +Circle.Equals = __webpack_require__(669); +Circle.GetBounds = __webpack_require__(670); +Circle.GetPoint = __webpack_require__(181); +Circle.GetPoints = __webpack_require__(182); +Circle.Offset = __webpack_require__(671); +Circle.OffsetPoint = __webpack_require__(672); Circle.Random = __webpack_require__(105); module.exports = Circle; /***/ }), -/* 656 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -103195,7 +103696,7 @@ module.exports = Area; /***/ }), -/* 657 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103225,7 +103726,7 @@ module.exports = Clone; /***/ }), -/* 658 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103256,7 +103757,7 @@ module.exports = ContainsPoint; /***/ }), -/* 659 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103292,7 +103793,7 @@ module.exports = ContainsRect; /***/ }), -/* 660 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -103322,7 +103823,7 @@ module.exports = CopyFrom; /***/ }), -/* 661 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -103356,7 +103857,7 @@ module.exports = Equals; /***/ }), -/* 662 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103394,7 +103895,7 @@ module.exports = GetBounds; /***/ }), -/* 663 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -103427,7 +103928,7 @@ module.exports = Offset; /***/ }), -/* 664 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -103459,7 +103960,7 @@ module.exports = OffsetPoint; /***/ }), -/* 665 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103490,7 +103991,7 @@ module.exports = CircleToCircle; /***/ }), -/* 666 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -103544,7 +104045,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 667 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103554,7 +104055,7 @@ module.exports = CircleToRectangle; */ var Rectangle = __webpack_require__(8); -var RectangleToRectangle = __webpack_require__(294); +var RectangleToRectangle = __webpack_require__(295); /** * [description] @@ -103587,7 +104088,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 668 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -103688,7 +104189,7 @@ module.exports = LineToRectangle; /***/ }), -/* 669 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103697,7 +104198,7 @@ module.exports = LineToRectangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PointToLine = __webpack_require__(296); +var PointToLine = __webpack_require__(297); /** * [description] @@ -103729,7 +104230,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 670 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103740,8 +104241,8 @@ module.exports = PointToLineSegment; var LineToLine = __webpack_require__(89); var Contains = __webpack_require__(33); -var ContainsArray = __webpack_require__(142); -var Decompose = __webpack_require__(297); +var ContainsArray = __webpack_require__(144); +var Decompose = __webpack_require__(298); /** * [description] @@ -103822,7 +104323,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 671 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -103862,7 +104363,7 @@ module.exports = RectangleToValues; /***/ }), -/* 672 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103871,7 +104372,7 @@ module.exports = RectangleToValues; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var LineToCircle = __webpack_require__(295); +var LineToCircle = __webpack_require__(296); var Contains = __webpack_require__(53); /** @@ -103925,7 +104426,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 673 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103979,7 +104480,7 @@ module.exports = TriangleToLine; /***/ }), -/* 674 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103988,8 +104489,8 @@ module.exports = TriangleToLine; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ContainsArray = __webpack_require__(142); -var Decompose = __webpack_require__(298); +var ContainsArray = __webpack_require__(144); +var Decompose = __webpack_require__(299); var LineToLine = __webpack_require__(89); /** @@ -104067,7 +104568,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 675 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104076,39 +104577,39 @@ module.exports = TriangleToTriangle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(299); +var Line = __webpack_require__(300); Line.Angle = __webpack_require__(54); -Line.BresenhamPoints = __webpack_require__(189); -Line.CenterOn = __webpack_require__(676); -Line.Clone = __webpack_require__(677); -Line.CopyFrom = __webpack_require__(678); -Line.Equals = __webpack_require__(679); -Line.GetMidPoint = __webpack_require__(680); -Line.GetNormal = __webpack_require__(681); -Line.GetPoint = __webpack_require__(300); +Line.BresenhamPoints = __webpack_require__(191); +Line.CenterOn = __webpack_require__(684); +Line.Clone = __webpack_require__(685); +Line.CopyFrom = __webpack_require__(686); +Line.Equals = __webpack_require__(687); +Line.GetMidPoint = __webpack_require__(688); +Line.GetNormal = __webpack_require__(689); +Line.GetPoint = __webpack_require__(301); Line.GetPoints = __webpack_require__(108); -Line.Height = __webpack_require__(682); +Line.Height = __webpack_require__(690); Line.Length = __webpack_require__(65); -Line.NormalAngle = __webpack_require__(301); -Line.NormalX = __webpack_require__(683); -Line.NormalY = __webpack_require__(684); -Line.Offset = __webpack_require__(685); -Line.PerpSlope = __webpack_require__(686); +Line.NormalAngle = __webpack_require__(302); +Line.NormalX = __webpack_require__(691); +Line.NormalY = __webpack_require__(692); +Line.Offset = __webpack_require__(693); +Line.PerpSlope = __webpack_require__(694); Line.Random = __webpack_require__(110); -Line.ReflectAngle = __webpack_require__(687); -Line.Rotate = __webpack_require__(688); -Line.RotateAroundPoint = __webpack_require__(689); -Line.RotateAroundXY = __webpack_require__(143); -Line.SetToAngle = __webpack_require__(690); -Line.Slope = __webpack_require__(691); -Line.Width = __webpack_require__(692); +Line.ReflectAngle = __webpack_require__(695); +Line.Rotate = __webpack_require__(696); +Line.RotateAroundPoint = __webpack_require__(697); +Line.RotateAroundXY = __webpack_require__(145); +Line.SetToAngle = __webpack_require__(698); +Line.Slope = __webpack_require__(699); +Line.Width = __webpack_require__(700); module.exports = Line; /***/ }), -/* 676 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -104148,7 +104649,7 @@ module.exports = CenterOn; /***/ }), -/* 677 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104157,7 +104658,7 @@ module.exports = CenterOn; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Line = __webpack_require__(299); +var Line = __webpack_require__(300); /** * [description] @@ -104178,7 +104679,7 @@ module.exports = Clone; /***/ }), -/* 678 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -104207,7 +104708,7 @@ module.exports = CopyFrom; /***/ }), -/* 679 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -104241,7 +104742,7 @@ module.exports = Equals; /***/ }), -/* 680 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104277,7 +104778,7 @@ module.exports = GetMidPoint; /***/ }), -/* 681 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104317,7 +104818,7 @@ module.exports = GetNormal; /***/ }), -/* 682 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -104345,7 +104846,7 @@ module.exports = Height; /***/ }), -/* 683 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104376,7 +104877,7 @@ module.exports = NormalX; /***/ }), -/* 684 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104407,7 +104908,7 @@ module.exports = NormalY; /***/ }), -/* 685 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -104443,7 +104944,7 @@ module.exports = Offset; /***/ }), -/* 686 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -104471,7 +104972,7 @@ module.exports = PerpSlope; /***/ }), -/* 687 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104481,7 +104982,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(54); -var NormalAngle = __webpack_require__(301); +var NormalAngle = __webpack_require__(302); /** * Returns the reflected angle between two lines. @@ -104507,7 +105008,7 @@ module.exports = ReflectAngle; /***/ }), -/* 688 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104516,7 +105017,7 @@ module.exports = ReflectAngle; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(143); +var RotateAroundXY = __webpack_require__(145); /** * [description] @@ -104541,7 +105042,7 @@ module.exports = Rotate; /***/ }), -/* 689 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104550,7 +105051,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(143); +var RotateAroundXY = __webpack_require__(145); /** * [description] @@ -104573,7 +105074,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 690 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -104611,7 +105112,7 @@ module.exports = SetToAngle; /***/ }), -/* 691 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -104639,7 +105140,7 @@ module.exports = Slope; /***/ }), -/* 692 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -104667,7 +105168,7 @@ module.exports = Width; /***/ }), -/* 693 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104678,27 +105179,27 @@ module.exports = Width; var Point = __webpack_require__(5); -Point.Ceil = __webpack_require__(694); -Point.Clone = __webpack_require__(695); -Point.CopyFrom = __webpack_require__(696); -Point.Equals = __webpack_require__(697); -Point.Floor = __webpack_require__(698); -Point.GetCentroid = __webpack_require__(699); -Point.GetMagnitude = __webpack_require__(302); -Point.GetMagnitudeSq = __webpack_require__(303); -Point.GetRectangleFromPoints = __webpack_require__(700); -Point.Interpolate = __webpack_require__(701); -Point.Invert = __webpack_require__(702); -Point.Negative = __webpack_require__(703); -Point.Project = __webpack_require__(704); -Point.ProjectUnit = __webpack_require__(705); -Point.SetMagnitude = __webpack_require__(706); +Point.Ceil = __webpack_require__(702); +Point.Clone = __webpack_require__(703); +Point.CopyFrom = __webpack_require__(704); +Point.Equals = __webpack_require__(705); +Point.Floor = __webpack_require__(706); +Point.GetCentroid = __webpack_require__(707); +Point.GetMagnitude = __webpack_require__(303); +Point.GetMagnitudeSq = __webpack_require__(304); +Point.GetRectangleFromPoints = __webpack_require__(708); +Point.Interpolate = __webpack_require__(709); +Point.Invert = __webpack_require__(710); +Point.Negative = __webpack_require__(711); +Point.Project = __webpack_require__(712); +Point.ProjectUnit = __webpack_require__(713); +Point.SetMagnitude = __webpack_require__(714); module.exports = Point; /***/ }), -/* 694 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -104726,7 +105227,7 @@ module.exports = Ceil; /***/ }), -/* 695 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104756,7 +105257,7 @@ module.exports = Clone; /***/ }), -/* 696 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -104785,7 +105286,7 @@ module.exports = CopyFrom; /***/ }), -/* 697 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -104814,7 +105315,7 @@ module.exports = Equals; /***/ }), -/* 698 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -104842,7 +105343,7 @@ module.exports = Floor; /***/ }), -/* 699 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104903,7 +105404,7 @@ module.exports = GetCentroid; /***/ }), -/* 700 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104971,7 +105472,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 701 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105010,7 +105511,7 @@ module.exports = Interpolate; /***/ }), -/* 702 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -105038,7 +105539,7 @@ module.exports = Invert; /***/ }), -/* 703 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105071,7 +105572,7 @@ module.exports = Negative; /***/ }), -/* 704 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105081,7 +105582,7 @@ module.exports = Negative; */ var Point = __webpack_require__(5); -var GetMagnitudeSq = __webpack_require__(303); +var GetMagnitudeSq = __webpack_require__(304); /** * [description] @@ -105115,7 +105616,7 @@ module.exports = Project; /***/ }), -/* 705 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105157,7 +105658,7 @@ module.exports = ProjectUnit; /***/ }), -/* 706 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105166,7 +105667,7 @@ module.exports = ProjectUnit; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetMagnitude = __webpack_require__(302); +var GetMagnitude = __webpack_require__(303); /** * [description] @@ -105199,7 +105700,7 @@ module.exports = SetMagnitude; /***/ }), -/* 707 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105208,19 +105709,19 @@ module.exports = SetMagnitude; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(304); +var Polygon = __webpack_require__(305); -Polygon.Clone = __webpack_require__(708); -Polygon.Contains = __webpack_require__(144); -Polygon.ContainsPoint = __webpack_require__(709); -Polygon.GetAABB = __webpack_require__(710); -Polygon.GetNumberArray = __webpack_require__(711); +Polygon.Clone = __webpack_require__(716); +Polygon.Contains = __webpack_require__(146); +Polygon.ContainsPoint = __webpack_require__(717); +Polygon.GetAABB = __webpack_require__(718); +Polygon.GetNumberArray = __webpack_require__(719); module.exports = Polygon; /***/ }), -/* 708 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105229,7 +105730,7 @@ module.exports = Polygon; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Polygon = __webpack_require__(304); +var Polygon = __webpack_require__(305); /** * [description] @@ -105250,7 +105751,7 @@ module.exports = Clone; /***/ }), -/* 709 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105259,7 +105760,7 @@ module.exports = Clone; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Contains = __webpack_require__(144); +var Contains = __webpack_require__(146); /** * [description] @@ -105281,7 +105782,7 @@ module.exports = ContainsPoint; /***/ }), -/* 710 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105335,7 +105836,7 @@ module.exports = GetAABB; /***/ }), -/* 711 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -105374,7 +105875,7 @@ module.exports = GetNumberArray; /***/ }), -/* 712 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -105402,7 +105903,7 @@ module.exports = Area; /***/ }), -/* 713 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -105433,7 +105934,7 @@ module.exports = Ceil; /***/ }), -/* 714 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -105466,7 +105967,7 @@ module.exports = CeilAll; /***/ }), -/* 715 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105496,7 +105997,7 @@ module.exports = Clone; /***/ }), -/* 716 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105527,7 +106028,7 @@ module.exports = ContainsPoint; /***/ }), -/* 717 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -105569,7 +106070,7 @@ module.exports = ContainsRect; /***/ }), -/* 718 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -105598,7 +106099,7 @@ module.exports = CopyFrom; /***/ }), -/* 719 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -105632,7 +106133,7 @@ module.exports = Equals; /***/ }), -/* 720 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105641,7 +106142,7 @@ module.exports = Equals; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(145); +var GetAspectRatio = __webpack_require__(147); // Fits the target rectangle into the source rectangle. // Preserves aspect ratio. @@ -105683,7 +106184,7 @@ module.exports = FitInside; /***/ }), -/* 721 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105692,7 +106193,7 @@ module.exports = FitInside; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetAspectRatio = __webpack_require__(145); +var GetAspectRatio = __webpack_require__(147); // Fits the target rectangle around the source rectangle. // Preserves aspect ration. @@ -105734,7 +106235,7 @@ module.exports = FitOutside; /***/ }), -/* 722 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -105765,7 +106266,7 @@ module.exports = Floor; /***/ }), -/* 723 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -105798,7 +106299,7 @@ module.exports = FloorAll; /***/ }), -/* 724 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105836,7 +106337,7 @@ module.exports = GetCenter; /***/ }), -/* 725 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105875,7 +106376,7 @@ module.exports = GetSize; /***/ }), -/* 726 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105884,7 +106385,7 @@ module.exports = GetSize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CenterOn = __webpack_require__(306); +var CenterOn = __webpack_require__(307); // Increases the size of the Rectangle object by the specified amounts. // The center point of the Rectangle object stays the same, and its size increases @@ -105916,7 +106417,7 @@ module.exports = Inflate; /***/ }), -/* 727 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -105966,7 +106467,7 @@ module.exports = MergePoints; /***/ }), -/* 728 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -106010,7 +106511,7 @@ module.exports = MergeRect; /***/ }), -/* 729 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -106052,7 +106553,7 @@ module.exports = MergeXY; /***/ }), -/* 730 */ +/* 738 */ /***/ (function(module, exports) { /** @@ -106085,7 +106586,7 @@ module.exports = Offset; /***/ }), -/* 731 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -106117,7 +106618,7 @@ module.exports = OffsetPoint; /***/ }), -/* 732 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -106151,7 +106652,7 @@ module.exports = Overlaps; /***/ }), -/* 733 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106206,7 +106707,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 734 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -106243,7 +106744,7 @@ module.exports = Scale; /***/ }), -/* 735 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106285,7 +106786,7 @@ module.exports = Union; /***/ }), -/* 736 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106296,36 +106797,36 @@ module.exports = Union; var Triangle = __webpack_require__(55); -Triangle.Area = __webpack_require__(737); -Triangle.BuildEquilateral = __webpack_require__(738); -Triangle.BuildFromPolygon = __webpack_require__(739); -Triangle.BuildRight = __webpack_require__(740); -Triangle.CenterOn = __webpack_require__(741); -Triangle.Centroid = __webpack_require__(309); -Triangle.CircumCenter = __webpack_require__(742); -Triangle.CircumCircle = __webpack_require__(743); -Triangle.Clone = __webpack_require__(744); +Triangle.Area = __webpack_require__(745); +Triangle.BuildEquilateral = __webpack_require__(746); +Triangle.BuildFromPolygon = __webpack_require__(747); +Triangle.BuildRight = __webpack_require__(748); +Triangle.CenterOn = __webpack_require__(749); +Triangle.Centroid = __webpack_require__(310); +Triangle.CircumCenter = __webpack_require__(750); +Triangle.CircumCircle = __webpack_require__(751); +Triangle.Clone = __webpack_require__(752); Triangle.Contains = __webpack_require__(53); -Triangle.ContainsArray = __webpack_require__(142); -Triangle.ContainsPoint = __webpack_require__(745); -Triangle.CopyFrom = __webpack_require__(746); -Triangle.Decompose = __webpack_require__(298); -Triangle.Equals = __webpack_require__(747); -Triangle.GetPoint = __webpack_require__(307); -Triangle.GetPoints = __webpack_require__(308); -Triangle.InCenter = __webpack_require__(311); -Triangle.Perimeter = __webpack_require__(748); -Triangle.Offset = __webpack_require__(310); +Triangle.ContainsArray = __webpack_require__(144); +Triangle.ContainsPoint = __webpack_require__(753); +Triangle.CopyFrom = __webpack_require__(754); +Triangle.Decompose = __webpack_require__(299); +Triangle.Equals = __webpack_require__(755); +Triangle.GetPoint = __webpack_require__(308); +Triangle.GetPoints = __webpack_require__(309); +Triangle.InCenter = __webpack_require__(312); +Triangle.Perimeter = __webpack_require__(756); +Triangle.Offset = __webpack_require__(311); Triangle.Random = __webpack_require__(111); -Triangle.Rotate = __webpack_require__(749); -Triangle.RotateAroundPoint = __webpack_require__(750); -Triangle.RotateAroundXY = __webpack_require__(146); +Triangle.Rotate = __webpack_require__(757); +Triangle.RotateAroundPoint = __webpack_require__(758); +Triangle.RotateAroundXY = __webpack_require__(148); module.exports = Triangle; /***/ }), -/* 737 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -106364,7 +106865,7 @@ module.exports = Area; /***/ }), -/* 738 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106414,7 +106915,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 739 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106423,7 +106924,7 @@ module.exports = BuildEquilateral; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var EarCut = __webpack_require__(233); +var EarCut = __webpack_require__(235); var Triangle = __webpack_require__(55); /** @@ -106487,7 +106988,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 740 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106536,7 +107037,7 @@ module.exports = BuildRight; /***/ }), -/* 741 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106545,8 +107046,8 @@ module.exports = BuildRight; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Centroid = __webpack_require__(309); -var Offset = __webpack_require__(310); +var Centroid = __webpack_require__(310); +var Offset = __webpack_require__(311); /** * [description] @@ -106579,7 +107080,7 @@ module.exports = CenterOn; /***/ }), -/* 742 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -106647,7 +107148,7 @@ module.exports = CircumCenter; /***/ }), -/* 743 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106728,7 +107229,7 @@ module.exports = CircumCircle; /***/ }), -/* 744 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106758,7 +107259,7 @@ module.exports = Clone; /***/ }), -/* 745 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106789,7 +107290,7 @@ module.exports = ContainsPoint; /***/ }), -/* 746 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -106818,7 +107319,7 @@ module.exports = CopyFrom; /***/ }), -/* 747 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -106854,7 +107355,7 @@ module.exports = Equals; /***/ }), -/* 748 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106890,7 +107391,7 @@ module.exports = Perimeter; /***/ }), -/* 749 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106899,8 +107400,8 @@ module.exports = Perimeter; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(146); -var InCenter = __webpack_require__(311); +var RotateAroundXY = __webpack_require__(148); +var InCenter = __webpack_require__(312); /** * [description] @@ -106924,7 +107425,7 @@ module.exports = Rotate; /***/ }), -/* 750 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106933,7 +107434,7 @@ module.exports = Rotate; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RotateAroundXY = __webpack_require__(146); +var RotateAroundXY = __webpack_require__(148); /** * [description] @@ -106956,7 +107457,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 751 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106971,20 +107472,20 @@ module.exports = RotateAroundPoint; module.exports = { - Gamepad: __webpack_require__(752), - InputManager: __webpack_require__(237), - InputPlugin: __webpack_require__(757), - InteractiveObject: __webpack_require__(312), - Keyboard: __webpack_require__(758), - Mouse: __webpack_require__(763), - Pointer: __webpack_require__(246), - Touch: __webpack_require__(764) + Gamepad: __webpack_require__(760), + InputManager: __webpack_require__(239), + InputPlugin: __webpack_require__(765), + InteractiveObject: __webpack_require__(313), + Keyboard: __webpack_require__(766), + Mouse: __webpack_require__(771), + Pointer: __webpack_require__(248), + Touch: __webpack_require__(772) }; /***/ }), -/* 752 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106999,17 +107500,17 @@ module.exports = { module.exports = { - Axis: __webpack_require__(240), - Button: __webpack_require__(241), - Gamepad: __webpack_require__(239), - GamepadManager: __webpack_require__(238), + Axis: __webpack_require__(242), + Button: __webpack_require__(243), + Gamepad: __webpack_require__(241), + GamepadManager: __webpack_require__(240), - Configs: __webpack_require__(753) + Configs: __webpack_require__(761) }; /***/ }), -/* 753 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107024,15 +107525,15 @@ module.exports = { module.exports = { - DUALSHOCK_4: __webpack_require__(754), - SNES_USB: __webpack_require__(755), - XBOX_360: __webpack_require__(756) + DUALSHOCK_4: __webpack_require__(762), + SNES_USB: __webpack_require__(763), + XBOX_360: __webpack_require__(764) }; /***/ }), -/* 754 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -107083,7 +107584,7 @@ module.exports = { /***/ }), -/* 755 */ +/* 763 */ /***/ (function(module, exports) { /** @@ -107123,7 +107624,7 @@ module.exports = { /***/ }), -/* 756 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -107175,7 +107676,7 @@ module.exports = { /***/ }), -/* 757 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107190,9 +107691,9 @@ var Class = __webpack_require__(0); var DistanceBetween = __webpack_require__(41); var Ellipse = __webpack_require__(135); var EllipseContains = __webpack_require__(68); -var EventEmitter = __webpack_require__(13); -var InteractiveObject = __webpack_require__(312); -var PluginManager = __webpack_require__(11); +var EventEmitter = __webpack_require__(14); +var InteractiveObject = __webpack_require__(313); +var PluginManager = __webpack_require__(12); var Rectangle = __webpack_require__(8); var RectangleContains = __webpack_require__(33); var Triangle = __webpack_require__(55); @@ -108757,7 +109258,7 @@ module.exports = InputPlugin; /***/ }), -/* 758 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108772,23 +109273,23 @@ module.exports = InputPlugin; module.exports = { - KeyboardManager: __webpack_require__(242), + KeyboardManager: __webpack_require__(244), - Key: __webpack_require__(243), + Key: __webpack_require__(245), KeyCodes: __webpack_require__(128), - KeyCombo: __webpack_require__(244), + KeyCombo: __webpack_require__(246), - JustDown: __webpack_require__(759), - JustUp: __webpack_require__(760), - DownDuration: __webpack_require__(761), - UpDuration: __webpack_require__(762) + JustDown: __webpack_require__(767), + JustUp: __webpack_require__(768), + DownDuration: __webpack_require__(769), + UpDuration: __webpack_require__(770) }; /***/ }), -/* 759 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -108827,7 +109328,7 @@ module.exports = JustDown; /***/ }), -/* 760 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -108866,7 +109367,7 @@ module.exports = JustUp; /***/ }), -/* 761 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -108898,7 +109399,7 @@ module.exports = DownDuration; /***/ }), -/* 762 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -108930,7 +109431,7 @@ module.exports = UpDuration; /***/ }), -/* 763 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108946,14 +109447,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(245) + MouseManager: __webpack_require__(247) }; /* eslint-enable */ /***/ }), -/* 764 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108969,14 +109470,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(247) + TouchManager: __webpack_require__(249) }; /* eslint-enable */ /***/ }), -/* 765 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108991,21 +109492,21 @@ module.exports = { module.exports = { - FileTypes: __webpack_require__(766), + FileTypes: __webpack_require__(774), File: __webpack_require__(18), FileTypesManager: __webpack_require__(7), - GetURL: __webpack_require__(147), - LoaderPlugin: __webpack_require__(782), - MergeXHRSettings: __webpack_require__(148), - XHRLoader: __webpack_require__(313), + GetURL: __webpack_require__(149), + LoaderPlugin: __webpack_require__(790), + MergeXHRSettings: __webpack_require__(150), + XHRLoader: __webpack_require__(314), XHRSettings: __webpack_require__(90) }; /***/ }), -/* 766 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109043,33 +109544,33 @@ module.exports = { module.exports = { - AnimationJSONFile: __webpack_require__(767), - AtlasJSONFile: __webpack_require__(768), - AudioFile: __webpack_require__(314), - AudioSprite: __webpack_require__(769), - BinaryFile: __webpack_require__(770), - BitmapFontFile: __webpack_require__(771), - GLSLFile: __webpack_require__(772), - HTML5AudioFile: __webpack_require__(315), - HTMLFile: __webpack_require__(773), + AnimationJSONFile: __webpack_require__(775), + AtlasJSONFile: __webpack_require__(776), + AudioFile: __webpack_require__(315), + AudioSprite: __webpack_require__(777), + BinaryFile: __webpack_require__(778), + BitmapFontFile: __webpack_require__(779), + GLSLFile: __webpack_require__(780), + HTML5AudioFile: __webpack_require__(316), + HTMLFile: __webpack_require__(781), ImageFile: __webpack_require__(57), JSONFile: __webpack_require__(56), - MultiAtlas: __webpack_require__(774), - PluginFile: __webpack_require__(775), - ScriptFile: __webpack_require__(776), - SpriteSheetFile: __webpack_require__(777), - SVGFile: __webpack_require__(778), - TextFile: __webpack_require__(318), - TilemapCSVFile: __webpack_require__(779), - TilemapJSONFile: __webpack_require__(780), - UnityAtlasFile: __webpack_require__(781), - XMLFile: __webpack_require__(316) + MultiAtlas: __webpack_require__(782), + PluginFile: __webpack_require__(783), + ScriptFile: __webpack_require__(784), + SpriteSheetFile: __webpack_require__(785), + SVGFile: __webpack_require__(786), + TextFile: __webpack_require__(319), + TilemapCSVFile: __webpack_require__(787), + TilemapJSONFile: __webpack_require__(788), + UnityAtlasFile: __webpack_require__(789), + XMLFile: __webpack_require__(317) }; /***/ }), -/* 767 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109151,7 +109652,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 768 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109229,7 +109730,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 769 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109238,7 +109739,7 @@ module.exports = AtlasJSONFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AudioFile = __webpack_require__(314); +var AudioFile = __webpack_require__(315); var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(56); @@ -109303,7 +109804,7 @@ FileTypesManager.register('audioSprite', function (key, urls, json, config, audi /***/ }), -/* 770 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109316,7 +109817,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -109409,7 +109910,7 @@ module.exports = BinaryFile; /***/ }), -/* 771 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109420,7 +109921,7 @@ module.exports = BinaryFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var XMLFile = __webpack_require__(316); +var XMLFile = __webpack_require__(317); /** * An Bitmap Font File. @@ -109487,7 +109988,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 772 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109500,7 +110001,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -109593,7 +110094,7 @@ module.exports = GLSLFile; /***/ }), -/* 773 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109606,7 +110107,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -109757,7 +110258,7 @@ module.exports = HTMLFile; /***/ }), -/* 774 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109769,7 +110270,7 @@ module.exports = HTMLFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); var JSONFile = __webpack_require__(56); -var NumberArray = __webpack_require__(317); +var NumberArray = __webpack_require__(318); /** * Adds a Multi File Texture Atlas to the current load queue. @@ -109846,7 +110347,7 @@ FileTypesManager.register('multiatlas', function (key, textureURLs, atlasURLs, t /***/ }), -/* 775 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109859,8 +110360,8 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var PluginManager = __webpack_require__(11); +var GetFastValue = __webpack_require__(2); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -109962,7 +110463,7 @@ module.exports = PluginFile; /***/ }), -/* 776 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109975,7 +110476,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -110074,7 +110575,7 @@ module.exports = ScriptFile; /***/ }), -/* 777 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110118,7 +110619,7 @@ var SpriteSheetFile = function (key, url, config, path, xhrSettings) * The file is **not** loaded immediately after calling this method. * Instead, the file is added to a queue within the Loader, which is processed automatically when the Loader starts. * - * @method Phaser.Loader.LoaderPlugin#image + * @method Phaser.Loader.LoaderPlugin#spritesheet * @since 3.0.0 * * @param {string} key - [description] @@ -110151,7 +110652,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 778 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110164,7 +110665,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -110306,7 +110807,7 @@ module.exports = SVGFile; /***/ }), -/* 779 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110319,7 +110820,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var File = __webpack_require__(18); var FileTypesManager = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(19); +var TILEMAP_FORMATS = __webpack_require__(20); /** * @classdesc @@ -110413,7 +110914,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 780 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110424,7 +110925,7 @@ module.exports = TilemapCSVFile; var FileTypesManager = __webpack_require__(7); var JSONFile = __webpack_require__(56); -var TILEMAP_FORMATS = __webpack_require__(19); +var TILEMAP_FORMATS = __webpack_require__(20); /** * A Tilemap File. @@ -110528,7 +111029,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 781 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110539,7 +111040,7 @@ module.exports = TilemapJSONFile; var FileTypesManager = __webpack_require__(7); var ImageFile = __webpack_require__(57); -var TextFile = __webpack_require__(318); +var TextFile = __webpack_require__(319); /** * An Atlas JSON File. @@ -110607,7 +111108,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 782 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110619,11 +111120,11 @@ module.exports = UnityAtlasFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(17); var CustomSet = __webpack_require__(61); -var EventEmitter = __webpack_require__(13); +var EventEmitter = __webpack_require__(14); var FileTypesManager = __webpack_require__(7); -var GetFastValue = __webpack_require__(1); -var ParseXMLBitmapFont = __webpack_require__(266); -var PluginManager = __webpack_require__(11); +var GetFastValue = __webpack_require__(2); +var ParseXMLBitmapFont = __webpack_require__(268); +var PluginManager = __webpack_require__(12); var XHRSettings = __webpack_require__(90); /** @@ -111589,7 +112090,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 783 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111608,58 +112109,58 @@ var Extend = __webpack_require__(23); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(784), - Distance: __webpack_require__(792), - Easing: __webpack_require__(795), - Fuzzy: __webpack_require__(796), - Interpolation: __webpack_require__(802), - Pow2: __webpack_require__(805), - Snap: __webpack_require__(807), + Angle: __webpack_require__(792), + Distance: __webpack_require__(800), + Easing: __webpack_require__(803), + Fuzzy: __webpack_require__(804), + Interpolation: __webpack_require__(810), + Pow2: __webpack_require__(813), + Snap: __webpack_require__(815), // Single functions - Average: __webpack_require__(811), - Bernstein: __webpack_require__(320), - Between: __webpack_require__(226), + Average: __webpack_require__(819), + Bernstein: __webpack_require__(321), + Between: __webpack_require__(228), CatmullRom: __webpack_require__(122), - CeilTo: __webpack_require__(812), + CeilTo: __webpack_require__(820), Clamp: __webpack_require__(60), DegToRad: __webpack_require__(35), - Difference: __webpack_require__(813), - Factorial: __webpack_require__(321), - FloatBetween: __webpack_require__(273), - FloorTo: __webpack_require__(814), + Difference: __webpack_require__(821), + Factorial: __webpack_require__(322), + FloatBetween: __webpack_require__(275), + FloorTo: __webpack_require__(822), FromPercent: __webpack_require__(64), - GetSpeed: __webpack_require__(815), - IsEven: __webpack_require__(816), - IsEvenStrict: __webpack_require__(817), - Linear: __webpack_require__(225), - MaxAdd: __webpack_require__(818), - MinSub: __webpack_require__(819), - Percent: __webpack_require__(820), - RadToDeg: __webpack_require__(216), - RandomXY: __webpack_require__(821), - RandomXYZ: __webpack_require__(204), - RandomXYZW: __webpack_require__(205), - Rotate: __webpack_require__(322), - RotateAround: __webpack_require__(183), + GetSpeed: __webpack_require__(823), + IsEven: __webpack_require__(824), + IsEvenStrict: __webpack_require__(825), + Linear: __webpack_require__(227), + MaxAdd: __webpack_require__(826), + MinSub: __webpack_require__(827), + Percent: __webpack_require__(828), + RadToDeg: __webpack_require__(218), + RandomXY: __webpack_require__(829), + RandomXYZ: __webpack_require__(206), + RandomXYZW: __webpack_require__(207), + Rotate: __webpack_require__(323), + RotateAround: __webpack_require__(185), RotateAroundDistance: __webpack_require__(112), - RoundAwayFromZero: __webpack_require__(323), - RoundTo: __webpack_require__(822), - SinCosTableGenerator: __webpack_require__(823), - SmootherStep: __webpack_require__(190), - SmoothStep: __webpack_require__(191), - TransformXY: __webpack_require__(248), - Within: __webpack_require__(824), + RoundAwayFromZero: __webpack_require__(324), + RoundTo: __webpack_require__(830), + SinCosTableGenerator: __webpack_require__(831), + SmootherStep: __webpack_require__(192), + SmoothStep: __webpack_require__(193), + TransformXY: __webpack_require__(250), + Within: __webpack_require__(832), Wrap: __webpack_require__(50), // Vector classes Vector2: __webpack_require__(6), Vector3: __webpack_require__(51), Vector4: __webpack_require__(119), - Matrix3: __webpack_require__(208), + Matrix3: __webpack_require__(210), Matrix4: __webpack_require__(118), - Quaternion: __webpack_require__(207), - RotateVec3: __webpack_require__(206) + Quaternion: __webpack_require__(209), + RotateVec3: __webpack_require__(208) }; @@ -111673,7 +112174,7 @@ module.exports = PhaserMath; /***/ }), -/* 784 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111688,22 +112189,22 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(785), - BetweenY: __webpack_require__(786), - BetweenPoints: __webpack_require__(787), - BetweenPointsY: __webpack_require__(788), - Reverse: __webpack_require__(789), - RotateTo: __webpack_require__(790), - ShortestBetween: __webpack_require__(791), - Normalize: __webpack_require__(319), - Wrap: __webpack_require__(160), - WrapDegrees: __webpack_require__(161) + Between: __webpack_require__(793), + BetweenY: __webpack_require__(794), + BetweenPoints: __webpack_require__(795), + BetweenPointsY: __webpack_require__(796), + Reverse: __webpack_require__(797), + RotateTo: __webpack_require__(798), + ShortestBetween: __webpack_require__(799), + Normalize: __webpack_require__(320), + Wrap: __webpack_require__(162), + WrapDegrees: __webpack_require__(163) }; /***/ }), -/* 785 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -111734,7 +112235,7 @@ module.exports = Between; /***/ }), -/* 786 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -111765,7 +112266,7 @@ module.exports = BetweenY; /***/ }), -/* 787 */ +/* 795 */ /***/ (function(module, exports) { /** @@ -111794,7 +112295,7 @@ module.exports = BetweenPoints; /***/ }), -/* 788 */ +/* 796 */ /***/ (function(module, exports) { /** @@ -111823,7 +112324,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 789 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111832,7 +112333,7 @@ module.exports = BetweenPointsY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Normalize = __webpack_require__(319); +var Normalize = __webpack_require__(320); /** * [description] @@ -111853,7 +112354,7 @@ module.exports = Reverse; /***/ }), -/* 790 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111920,7 +112421,7 @@ module.exports = RotateTo; /***/ }), -/* 791 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -111966,7 +112467,7 @@ module.exports = ShortestBetween; /***/ }), -/* 792 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111982,14 +112483,14 @@ module.exports = ShortestBetween; module.exports = { Between: __webpack_require__(41), - Power: __webpack_require__(793), - Squared: __webpack_require__(794) + Power: __webpack_require__(801), + Squared: __webpack_require__(802) }; /***/ }), -/* 793 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -112023,7 +112524,7 @@ module.exports = DistancePower; /***/ }), -/* 794 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -112057,7 +112558,7 @@ module.exports = DistanceSquared; /***/ }), -/* 795 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112072,24 +112573,24 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(274), - Bounce: __webpack_require__(275), - Circular: __webpack_require__(276), - Cubic: __webpack_require__(277), - Elastic: __webpack_require__(278), - Expo: __webpack_require__(279), - Linear: __webpack_require__(280), - Quadratic: __webpack_require__(281), - Quartic: __webpack_require__(282), - Quintic: __webpack_require__(283), - Sine: __webpack_require__(284), - Stepped: __webpack_require__(285) + Back: __webpack_require__(276), + Bounce: __webpack_require__(277), + Circular: __webpack_require__(278), + Cubic: __webpack_require__(279), + Elastic: __webpack_require__(280), + Expo: __webpack_require__(281), + Linear: __webpack_require__(282), + Quadratic: __webpack_require__(283), + Quartic: __webpack_require__(284), + Quintic: __webpack_require__(285), + Sine: __webpack_require__(286), + Stepped: __webpack_require__(287) }; /***/ }), -/* 796 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112104,17 +112605,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(797), - Equal: __webpack_require__(798), - Floor: __webpack_require__(799), - GreaterThan: __webpack_require__(800), - LessThan: __webpack_require__(801) + Ceil: __webpack_require__(805), + Equal: __webpack_require__(806), + Floor: __webpack_require__(807), + GreaterThan: __webpack_require__(808), + LessThan: __webpack_require__(809) }; /***/ }), -/* 797 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -112145,7 +112646,7 @@ module.exports = Ceil; /***/ }), -/* 798 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -112177,7 +112678,7 @@ module.exports = Equal; /***/ }), -/* 799 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -112208,7 +112709,7 @@ module.exports = Floor; /***/ }), -/* 800 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -112240,7 +112741,7 @@ module.exports = GreaterThan; /***/ }), -/* 801 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -112272,7 +112773,7 @@ module.exports = LessThan; /***/ }), -/* 802 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112287,16 +112788,16 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(803), - CatmullRom: __webpack_require__(804), - CubicBezier: __webpack_require__(214), - Linear: __webpack_require__(224) + Bezier: __webpack_require__(811), + CatmullRom: __webpack_require__(812), + CubicBezier: __webpack_require__(216), + Linear: __webpack_require__(226) }; /***/ }), -/* 803 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112305,7 +112806,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Bernstein = __webpack_require__(320); +var Bernstein = __webpack_require__(321); /** * [description] @@ -112335,7 +112836,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 804 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112392,7 +112893,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 805 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112407,15 +112908,15 @@ module.exports = CatmullRomInterpolation; module.exports = { - GetNext: __webpack_require__(288), + GetNext: __webpack_require__(290), IsSize: __webpack_require__(125), - IsValue: __webpack_require__(806) + IsValue: __webpack_require__(814) }; /***/ }), -/* 806 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -112443,7 +112944,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 807 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112458,15 +112959,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(808), - Floor: __webpack_require__(809), - To: __webpack_require__(810) + Ceil: __webpack_require__(816), + Floor: __webpack_require__(817), + To: __webpack_require__(818) }; /***/ }), -/* 808 */ +/* 816 */ /***/ (function(module, exports) { /** @@ -112506,7 +113007,7 @@ module.exports = SnapCeil; /***/ }), -/* 809 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -112546,7 +113047,7 @@ module.exports = SnapFloor; /***/ }), -/* 810 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -112586,7 +113087,7 @@ module.exports = SnapTo; /***/ }), -/* 811 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -112621,7 +113122,7 @@ module.exports = Average; /***/ }), -/* 812 */ +/* 820 */ /***/ (function(module, exports) { /** @@ -112656,7 +113157,7 @@ module.exports = CeilTo; /***/ }), -/* 813 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -112685,7 +113186,7 @@ module.exports = Difference; /***/ }), -/* 814 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -112720,7 +113221,7 @@ module.exports = FloorTo; /***/ }), -/* 815 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -112749,7 +113250,7 @@ module.exports = GetSpeed; /***/ }), -/* 816 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -112780,7 +113281,7 @@ module.exports = IsEven; /***/ }), -/* 817 */ +/* 825 */ /***/ (function(module, exports) { /** @@ -112809,7 +113310,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 818 */ +/* 826 */ /***/ (function(module, exports) { /** @@ -112839,7 +113340,7 @@ module.exports = MaxAdd; /***/ }), -/* 819 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -112869,7 +113370,7 @@ module.exports = MinSub; /***/ }), -/* 820 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -112928,7 +113429,7 @@ module.exports = Percent; /***/ }), -/* 821 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -112964,7 +113465,7 @@ module.exports = RandomXY; /***/ }), -/* 822 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -112999,7 +113500,7 @@ module.exports = RoundTo; /***/ }), -/* 823 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -113053,7 +113554,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 824 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -113083,7 +113584,7 @@ module.exports = Within; /***/ }), -/* 825 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113098,22 +113599,22 @@ module.exports = Within; module.exports = { - ArcadePhysics: __webpack_require__(826), - Body: __webpack_require__(330), - Collider: __webpack_require__(331), - Factory: __webpack_require__(324), - Group: __webpack_require__(327), - Image: __webpack_require__(325), + ArcadePhysics: __webpack_require__(834), + Body: __webpack_require__(331), + Collider: __webpack_require__(332), + Factory: __webpack_require__(325), + Group: __webpack_require__(328), + Image: __webpack_require__(326), Sprite: __webpack_require__(91), - StaticBody: __webpack_require__(338), - StaticGroup: __webpack_require__(328), - World: __webpack_require__(329) + StaticBody: __webpack_require__(339), + StaticGroup: __webpack_require__(329), + World: __webpack_require__(330) }; /***/ }), -/* 826 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113123,11 +113624,11 @@ module.exports = { */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(324); -var GetFastValue = __webpack_require__(1); +var Factory = __webpack_require__(325); +var GetFastValue = __webpack_require__(2); var Merge = __webpack_require__(103); -var PluginManager = __webpack_require__(11); -var World = __webpack_require__(329); +var PluginManager = __webpack_require__(12); +var World = __webpack_require__(330); var DistanceBetween = __webpack_require__(41); var DegToRad = __webpack_require__(35); @@ -113584,7 +114085,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 827 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -113659,7 +114160,7 @@ module.exports = Acceleration; /***/ }), -/* 828 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -113733,7 +114234,7 @@ module.exports = Angular; /***/ }), -/* 829 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -113825,7 +114326,7 @@ module.exports = Bounce; /***/ }), -/* 830 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -113949,7 +114450,7 @@ module.exports = Debug; /***/ }), -/* 831 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -114024,7 +114525,7 @@ module.exports = Drag; /***/ }), -/* 832 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -114134,7 +114635,7 @@ module.exports = Enable; /***/ }), -/* 833 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -114209,7 +114710,7 @@ module.exports = Friction; /***/ }), -/* 834 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -114284,7 +114785,7 @@ module.exports = Gravity; /***/ }), -/* 835 */ +/* 843 */ /***/ (function(module, exports) { /** @@ -114326,7 +114827,7 @@ module.exports = Immovable; /***/ }), -/* 836 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -114366,7 +114867,7 @@ module.exports = Mass; /***/ }), -/* 837 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -114445,7 +114946,7 @@ module.exports = Size; /***/ }), -/* 838 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -114540,7 +115041,7 @@ module.exports = Velocity; /***/ }), -/* 839 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -114581,7 +115082,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 840 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114590,9 +115091,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TileCheckX = __webpack_require__(841); -var TileCheckY = __webpack_require__(843); -var TileIntersectsBody = __webpack_require__(337); +var TileCheckX = __webpack_require__(849); +var TileCheckY = __webpack_require__(851); +var TileIntersectsBody = __webpack_require__(338); /** * The core separation function to separate a physics body and a tile. @@ -114694,7 +115195,7 @@ module.exports = SeparateTile; /***/ }), -/* 841 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114703,7 +115204,7 @@ module.exports = SeparateTile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(842); +var ProcessTileSeparationX = __webpack_require__(850); /** * Check the body against the given tile on the X axis. @@ -114769,7 +115270,7 @@ module.exports = TileCheckX; /***/ }), -/* 842 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -114814,7 +115315,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 843 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114823,7 +115324,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(844); +var ProcessTileSeparationY = __webpack_require__(852); /** * Check the body against the given tile on the Y axis. @@ -114889,7 +115390,7 @@ module.exports = TileCheckY; /***/ }), -/* 844 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -114934,7 +115435,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 845 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114943,7 +115444,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapX = __webpack_require__(332); +var GetOverlapX = __webpack_require__(333); /** * [description] @@ -115021,7 +115522,7 @@ module.exports = SeparateX; /***/ }), -/* 846 */ +/* 854 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115030,7 +115531,7 @@ module.exports = SeparateX; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetOverlapY = __webpack_require__(333); +var GetOverlapY = __webpack_require__(334); /** * [description] @@ -115108,7 +115609,7 @@ module.exports = SeparateY; /***/ }), -/* 847 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115121,24 +115622,24 @@ module.exports = SeparateY; module.exports = { - Acceleration: __webpack_require__(953), - BodyScale: __webpack_require__(954), - BodyType: __webpack_require__(955), - Bounce: __webpack_require__(956), - CheckAgainst: __webpack_require__(957), - Collides: __webpack_require__(958), - Debug: __webpack_require__(959), - Friction: __webpack_require__(960), - Gravity: __webpack_require__(961), - Offset: __webpack_require__(962), - SetGameObject: __webpack_require__(963), - Velocity: __webpack_require__(964) + Acceleration: __webpack_require__(961), + BodyScale: __webpack_require__(962), + BodyType: __webpack_require__(963), + Bounce: __webpack_require__(964), + CheckAgainst: __webpack_require__(965), + Collides: __webpack_require__(966), + Debug: __webpack_require__(967), + Friction: __webpack_require__(968), + Gravity: __webpack_require__(969), + Offset: __webpack_require__(970), + SetGameObject: __webpack_require__(971), + Velocity: __webpack_require__(972) }; /***/ }), -/* 848 */ +/* 856 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115208,7 +115709,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 849 */ +/* 857 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115221,24 +115722,24 @@ var Common = __webpack_require__(38); module.exports = { - Bounce: __webpack_require__(970), - Collision: __webpack_require__(971), - Force: __webpack_require__(972), - Friction: __webpack_require__(973), - Gravity: __webpack_require__(974), - Mass: __webpack_require__(975), - Static: __webpack_require__(976), - Sensor: __webpack_require__(977), - SetBody: __webpack_require__(978), - Sleep: __webpack_require__(979), - Transform: __webpack_require__(980), - Velocity: __webpack_require__(981) + Bounce: __webpack_require__(978), + Collision: __webpack_require__(979), + Force: __webpack_require__(980), + Friction: __webpack_require__(981), + Gravity: __webpack_require__(982), + Mass: __webpack_require__(983), + Static: __webpack_require__(984), + Sensor: __webpack_require__(985), + SetBody: __webpack_require__(986), + Sleep: __webpack_require__(987), + Transform: __webpack_require__(988), + Velocity: __webpack_require__(989) }; /***/ }), -/* 850 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115250,8 +115751,8 @@ module.exports = { var Bodies = __webpack_require__(92); var Body = __webpack_require__(59); var Class = __webpack_require__(0); -var Components = __webpack_require__(849); -var GetFastValue = __webpack_require__(1); +var Components = __webpack_require__(857); +var GetFastValue = __webpack_require__(2); var HasValue = __webpack_require__(72); var Vertices = __webpack_require__(93); @@ -115565,7 +116066,7 @@ module.exports = MatterTileBody; /***/ }), -/* 851 */ +/* 859 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115580,8 +116081,8 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(852); -var Pair = __webpack_require__(364); +var SAT = __webpack_require__(860); +var Pair = __webpack_require__(365); var Bounds = __webpack_require__(95); (function() { @@ -115678,7 +116179,7 @@ var Bounds = __webpack_require__(95); /***/ }), -/* 852 */ +/* 860 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115954,7 +116455,7 @@ var Vector = __webpack_require__(94); /***/ }), -/* 853 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115963,34 +116464,34 @@ var Vector = __webpack_require__(94); * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Matter = __webpack_require__(941); +var Matter = __webpack_require__(949); Matter.Body = __webpack_require__(59); -Matter.Composite = __webpack_require__(149); -Matter.World = __webpack_require__(855); +Matter.Composite = __webpack_require__(151); +Matter.World = __webpack_require__(863); -Matter.Detector = __webpack_require__(851); -Matter.Grid = __webpack_require__(942); -Matter.Pairs = __webpack_require__(943); -Matter.Pair = __webpack_require__(364); -Matter.Query = __webpack_require__(983); -Matter.Resolver = __webpack_require__(944); -Matter.SAT = __webpack_require__(852); +Matter.Detector = __webpack_require__(859); +Matter.Grid = __webpack_require__(950); +Matter.Pairs = __webpack_require__(951); +Matter.Pair = __webpack_require__(365); +Matter.Query = __webpack_require__(991); +Matter.Resolver = __webpack_require__(952); +Matter.SAT = __webpack_require__(860); -Matter.Constraint = __webpack_require__(163); +Matter.Constraint = __webpack_require__(165); Matter.Common = __webpack_require__(38); -Matter.Engine = __webpack_require__(945); -Matter.Events = __webpack_require__(162); -Matter.Sleeping = __webpack_require__(341); -Matter.Plugin = __webpack_require__(854); +Matter.Engine = __webpack_require__(953); +Matter.Events = __webpack_require__(164); +Matter.Sleeping = __webpack_require__(342); +Matter.Plugin = __webpack_require__(862); Matter.Bodies = __webpack_require__(92); -Matter.Composites = __webpack_require__(938); +Matter.Composites = __webpack_require__(946); -Matter.Axes = __webpack_require__(848); +Matter.Axes = __webpack_require__(856); Matter.Bounds = __webpack_require__(95); -Matter.Svg = __webpack_require__(985); +Matter.Svg = __webpack_require__(993); Matter.Vector = __webpack_require__(94); Matter.Vertices = __webpack_require__(93); @@ -116007,7 +116508,7 @@ module.exports = Matter; /***/ }), -/* 854 */ +/* 862 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116357,7 +116858,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 855 */ +/* 863 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116377,8 +116878,8 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(149); -var Constraint = __webpack_require__(163); +var Composite = __webpack_require__(151); +var Constraint = __webpack_require__(165); var Common = __webpack_require__(38); (function() { @@ -116493,7 +116994,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 856 */ +/* 864 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116508,16 +117009,16 @@ var Common = __webpack_require__(38); module.exports = { - SceneManager: __webpack_require__(249), - ScenePlugin: __webpack_require__(857), - Settings: __webpack_require__(252), + SceneManager: __webpack_require__(251), + ScenePlugin: __webpack_require__(865), + Settings: __webpack_require__(254), Systems: __webpack_require__(129) }; /***/ }), -/* 857 */ +/* 865 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116528,7 +117029,7 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(83); -var PluginManager = __webpack_require__(11); +var PluginManager = __webpack_require__(12); /** * @classdesc @@ -116623,7 +117124,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - start: function (key) + start: function (key, data) { if (key === undefined) { key = this.key; } @@ -116637,7 +117138,7 @@ var ScenePlugin = new Class({ else { this.manager.stop(this.key); - this.manager.start(key); + this.manager.start(key, data); } } @@ -116674,7 +117175,7 @@ var ScenePlugin = new Class({ * * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object. */ - launch: function (key) + launch: function (key, data) { if (key && key !== this.key) { @@ -116684,7 +117185,7 @@ var ScenePlugin = new Class({ } else { - this.manager.start(key); + this.manager.start(key, data); } } @@ -117039,7 +117540,7 @@ module.exports = ScenePlugin; /***/ }), -/* 858 */ +/* 866 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117081,25 +117582,25 @@ module.exports = ScenePlugin; module.exports = { - SoundManagerCreator: __webpack_require__(253), + SoundManagerCreator: __webpack_require__(255), BaseSound: __webpack_require__(85), BaseSoundManager: __webpack_require__(84), - WebAudioSound: __webpack_require__(259), - WebAudioSoundManager: __webpack_require__(258), + WebAudioSound: __webpack_require__(261), + WebAudioSoundManager: __webpack_require__(260), - HTML5AudioSound: __webpack_require__(255), - HTML5AudioSoundManager: __webpack_require__(254), + HTML5AudioSound: __webpack_require__(257), + HTML5AudioSoundManager: __webpack_require__(256), - NoAudioSound: __webpack_require__(257), - NoAudioSoundManager: __webpack_require__(256) + NoAudioSound: __webpack_require__(259), + NoAudioSoundManager: __webpack_require__(258) }; /***/ }), -/* 859 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117116,15 +117617,15 @@ module.exports = { List: __webpack_require__(86), Map: __webpack_require__(113), - ProcessQueue: __webpack_require__(334), - RTree: __webpack_require__(335), + ProcessQueue: __webpack_require__(335), + RTree: __webpack_require__(336), Set: __webpack_require__(61) }; /***/ }), -/* 860 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117139,19 +117640,19 @@ module.exports = { module.exports = { - Parsers: __webpack_require__(261), + Parsers: __webpack_require__(263), - FilterMode: __webpack_require__(861), + FilterMode: __webpack_require__(869), Frame: __webpack_require__(130), - Texture: __webpack_require__(262), - TextureManager: __webpack_require__(260), - TextureSource: __webpack_require__(263) + Texture: __webpack_require__(264), + TextureManager: __webpack_require__(262), + TextureSource: __webpack_require__(265) }; /***/ }), -/* 861 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -117190,7 +117691,7 @@ module.exports = CONST; /***/ }), -/* 862 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117206,29 +117707,29 @@ module.exports = CONST; module.exports = { Components: __webpack_require__(96), - Parsers: __webpack_require__(892), + Parsers: __webpack_require__(900), - Formats: __webpack_require__(19), - ImageCollection: __webpack_require__(349), - ParseToTilemap: __webpack_require__(154), + Formats: __webpack_require__(20), + ImageCollection: __webpack_require__(350), + ParseToTilemap: __webpack_require__(156), Tile: __webpack_require__(44), - Tilemap: __webpack_require__(353), - TilemapCreator: __webpack_require__(909), - TilemapFactory: __webpack_require__(910), + Tilemap: __webpack_require__(354), + TilemapCreator: __webpack_require__(917), + TilemapFactory: __webpack_require__(918), Tileset: __webpack_require__(100), LayerData: __webpack_require__(75), MapData: __webpack_require__(76), - ObjectLayer: __webpack_require__(351), + ObjectLayer: __webpack_require__(352), - DynamicTilemapLayer: __webpack_require__(354), - StaticTilemapLayer: __webpack_require__(355) + DynamicTilemapLayer: __webpack_require__(355), + StaticTilemapLayer: __webpack_require__(356) }; /***/ }), -/* 863 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117293,7 +117794,7 @@ module.exports = Copy; /***/ }), -/* 864 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117305,7 +117806,7 @@ module.exports = Copy; var TileToWorldX = __webpack_require__(98); var TileToWorldY = __webpack_require__(99); var GetTilesWithin = __webpack_require__(15); -var ReplaceByIndex = __webpack_require__(342); +var ReplaceByIndex = __webpack_require__(343); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -117380,7 +117881,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 865 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -117448,7 +117949,7 @@ module.exports = CullTiles; /***/ }), -/* 866 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117502,7 +118003,7 @@ module.exports = Fill; /***/ }), -/* 867 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117551,7 +118052,7 @@ module.exports = FilterTiles; /***/ }), -/* 868 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -117638,7 +118139,7 @@ module.exports = FindByIndex; /***/ }), -/* 869 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117685,7 +118186,7 @@ module.exports = FindTile; /***/ }), -/* 870 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117729,7 +118230,7 @@ module.exports = ForEachTile; /***/ }), -/* 871 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117770,7 +118271,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 872 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117779,9 +118280,9 @@ module.exports = GetTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Geom = __webpack_require__(292); +var Geom = __webpack_require__(293); var GetTilesWithin = __webpack_require__(15); -var Intersects = __webpack_require__(293); +var Intersects = __webpack_require__(294); var NOOP = __webpack_require__(3); var TileToWorldX = __webpack_require__(98); var TileToWorldY = __webpack_require__(99); @@ -117869,7 +118370,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 873 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117921,7 +118422,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 874 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117930,7 +118431,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var HasTileAt = __webpack_require__(343); +var HasTileAt = __webpack_require__(344); var WorldToTileX = __webpack_require__(39); var WorldToTileY = __webpack_require__(40); @@ -117960,7 +118461,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 875 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117969,7 +118470,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var PutTileAt = __webpack_require__(151); +var PutTileAt = __webpack_require__(153); var WorldToTileX = __webpack_require__(39); var WorldToTileY = __webpack_require__(40); @@ -118002,7 +118503,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 876 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118012,7 +118513,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(34); -var PutTileAt = __webpack_require__(151); +var PutTileAt = __webpack_require__(153); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -118066,7 +118567,7 @@ module.exports = PutTilesAt; /***/ }), -/* 877 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118123,7 +118624,7 @@ module.exports = Randomize; /***/ }), -/* 878 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118132,7 +118633,7 @@ module.exports = Randomize; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RemoveTileAt = __webpack_require__(344); +var RemoveTileAt = __webpack_require__(345); var WorldToTileX = __webpack_require__(39); var WorldToTileY = __webpack_require__(40); @@ -118165,7 +118666,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 879 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118175,7 +118676,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(15); -var Color = __webpack_require__(220); +var Color = __webpack_require__(222); /** * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to @@ -118250,7 +118751,7 @@ module.exports = RenderDebug; /***/ }), -/* 880 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118261,7 +118762,7 @@ module.exports = RenderDebug; var SetTileCollision = __webpack_require__(43); var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(154); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -118311,7 +118812,7 @@ module.exports = SetCollision; /***/ }), -/* 881 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118322,7 +118823,7 @@ module.exports = SetCollision; var SetTileCollision = __webpack_require__(43); var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(154); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -118377,7 +118878,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 882 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118388,7 +118889,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(43); var CalculateFacesWithin = __webpack_require__(34); -var SetLayerCollisionIndex = __webpack_require__(152); +var SetLayerCollisionIndex = __webpack_require__(154); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -118432,7 +118933,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 883 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118506,7 +119007,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 884 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118564,7 +119065,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 885 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -118611,7 +119112,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 886 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118653,7 +119154,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 887 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118697,7 +119198,7 @@ module.exports = Shuffle; /***/ }), -/* 888 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118747,7 +119248,7 @@ module.exports = SwapByIndex; /***/ }), -/* 889 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118790,7 +119291,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 890 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118869,7 +119370,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 891 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118914,7 +119415,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 892 */ +/* 900 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118929,18 +119430,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(345), - Parse2DArray: __webpack_require__(153), - ParseCSV: __webpack_require__(346), + Parse: __webpack_require__(346), + Parse2DArray: __webpack_require__(155), + ParseCSV: __webpack_require__(347), - Impact: __webpack_require__(352), - Tiled: __webpack_require__(347) + Impact: __webpack_require__(353), + Tiled: __webpack_require__(348) }; /***/ }), -/* 893 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118949,10 +119450,10 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Base64Decode = __webpack_require__(894); -var GetFastValue = __webpack_require__(1); +var Base64Decode = __webpack_require__(902); +var GetFastValue = __webpack_require__(2); var LayerData = __webpack_require__(75); -var ParseGID = __webpack_require__(348); +var ParseGID = __webpack_require__(349); var Tile = __webpack_require__(44); /** @@ -119066,7 +119567,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 894 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -119109,7 +119610,7 @@ module.exports = Base64Decode; /***/ }), -/* 895 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119118,7 +119619,7 @@ module.exports = Base64Decode; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * [description] @@ -119161,7 +119662,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 896 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119171,8 +119672,8 @@ module.exports = ParseImageLayers; */ var Tileset = __webpack_require__(100); -var ImageCollection = __webpack_require__(349); -var ParseObject = __webpack_require__(350); +var ImageCollection = __webpack_require__(350); +var ParseObject = __webpack_require__(351); /** * Tilesets & Image Collections @@ -119266,7 +119767,7 @@ module.exports = ParseTilesets; /***/ }), -/* 897 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119309,7 +119810,7 @@ module.exports = Pick; /***/ }), -/* 898 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119318,9 +119819,9 @@ module.exports = Pick; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(350); -var ObjectLayer = __webpack_require__(351); +var GetFastValue = __webpack_require__(2); +var ParseObject = __webpack_require__(351); +var ObjectLayer = __webpack_require__(352); /** * [description] @@ -119368,7 +119869,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 899 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -119441,7 +119942,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 900 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119514,7 +120015,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 901 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119598,7 +120099,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 902 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119649,7 +120150,7 @@ module.exports = ParseTilesets; /***/ }), -/* 903 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119663,12 +120164,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(904); + renderWebGL = __webpack_require__(912); } if (true) { - renderCanvas = __webpack_require__(905); + renderCanvas = __webpack_require__(913); } module.exports = { @@ -119680,7 +120181,7 @@ module.exports = { /***/ }), -/* 904 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119689,7 +120190,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -119721,7 +120222,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 905 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119730,7 +120231,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -119813,7 +120314,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 906 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119827,12 +120328,12 @@ var renderCanvas = __webpack_require__(3); if (true) { - renderWebGL = __webpack_require__(907); + renderWebGL = __webpack_require__(915); } if (true) { - renderCanvas = __webpack_require__(908); + renderCanvas = __webpack_require__(916); } module.exports = { @@ -119844,7 +120345,7 @@ module.exports = { /***/ }), -/* 907 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119853,7 +120354,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -119885,7 +120386,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 908 */ +/* 916 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119894,7 +120395,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObject = __webpack_require__(2); +var GameObject = __webpack_require__(1); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -119958,7 +120459,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 909 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119967,8 +120468,8 @@ module.exports = StaticTilemapLayerCanvasRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GameObjectCreator = __webpack_require__(14); -var ParseToTilemap = __webpack_require__(154); +var GameObjectCreator = __webpack_require__(13); +var ParseToTilemap = __webpack_require__(156); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -120018,7 +120519,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 910 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120028,7 +120529,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(9); -var ParseToTilemap = __webpack_require__(154); +var ParseToTilemap = __webpack_require__(156); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -120084,7 +120585,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 911 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120099,14 +120600,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(912), - TimerEvent: __webpack_require__(356) + Clock: __webpack_require__(920), + TimerEvent: __webpack_require__(357) }; /***/ }), -/* 912 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120116,8 +120617,8 @@ module.exports = { */ var Class = __webpack_require__(0); -var PluginManager = __webpack_require__(11); -var TimerEvent = __webpack_require__(356); +var PluginManager = __webpack_require__(12); +var TimerEvent = __webpack_require__(357); /** * @classdesc @@ -120474,7 +120975,7 @@ module.exports = Clock; /***/ }), -/* 913 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120489,18 +120990,18 @@ module.exports = Clock; module.exports = { - Builders: __webpack_require__(914), + Builders: __webpack_require__(922), - TweenManager: __webpack_require__(916), - Tween: __webpack_require__(158), - TweenData: __webpack_require__(159), - Timeline: __webpack_require__(361) + TweenManager: __webpack_require__(924), + Tween: __webpack_require__(160), + TweenData: __webpack_require__(161), + Timeline: __webpack_require__(362) }; /***/ }), -/* 914 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120518,19 +121019,19 @@ module.exports = { GetBoolean: __webpack_require__(73), GetEaseFunction: __webpack_require__(71), GetNewValue: __webpack_require__(101), - GetProps: __webpack_require__(357), - GetTargets: __webpack_require__(155), - GetTweens: __webpack_require__(358), - GetValueOp: __webpack_require__(156), - NumberTweenBuilder: __webpack_require__(359), - TimelineBuilder: __webpack_require__(360), + GetProps: __webpack_require__(358), + GetTargets: __webpack_require__(157), + GetTweens: __webpack_require__(359), + GetValueOp: __webpack_require__(158), + NumberTweenBuilder: __webpack_require__(360), + TimelineBuilder: __webpack_require__(361), TweenBuilder: __webpack_require__(102) }; /***/ }), -/* 915 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -120602,7 +121103,7 @@ module.exports = [ /***/ }), -/* 916 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120612,9 +121113,9 @@ module.exports = [ */ var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(359); -var PluginManager = __webpack_require__(11); -var TimelineBuilder = __webpack_require__(360); +var NumberTweenBuilder = __webpack_require__(360); +var PluginManager = __webpack_require__(12); +var TimelineBuilder = __webpack_require__(361); var TWEEN_CONST = __webpack_require__(87); var TweenBuilder = __webpack_require__(102); @@ -121256,7 +121757,7 @@ module.exports = TweenManager; /***/ }), -/* 917 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121271,15 +121772,15 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(918), - Objects: __webpack_require__(922), - String: __webpack_require__(926) + Array: __webpack_require__(926), + Objects: __webpack_require__(930), + String: __webpack_require__(934) }; /***/ }), -/* 918 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121294,23 +121795,23 @@ module.exports = { module.exports = { - FindClosestInSorted: __webpack_require__(919), + FindClosestInSorted: __webpack_require__(927), GetRandomElement: __webpack_require__(138), - NumberArray: __webpack_require__(317), - NumberArrayStep: __webpack_require__(920), - QuickSelect: __webpack_require__(336), - Range: __webpack_require__(272), - RemoveRandomElement: __webpack_require__(921), - RotateLeft: __webpack_require__(187), - RotateRight: __webpack_require__(188), + NumberArray: __webpack_require__(318), + NumberArrayStep: __webpack_require__(928), + QuickSelect: __webpack_require__(337), + Range: __webpack_require__(274), + RemoveRandomElement: __webpack_require__(929), + RotateLeft: __webpack_require__(189), + RotateRight: __webpack_require__(190), Shuffle: __webpack_require__(80), - SpliceOne: __webpack_require__(362) + SpliceOne: __webpack_require__(363) }; /***/ }), -/* 919 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -121358,7 +121859,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 920 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121367,7 +121868,7 @@ module.exports = FindClosestInSorted; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var RoundAwayFromZero = __webpack_require__(323); +var RoundAwayFromZero = __webpack_require__(324); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -121435,7 +121936,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 921 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121444,7 +121945,7 @@ module.exports = NumberArrayStep; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var SpliceOne = __webpack_require__(362); +var SpliceOne = __webpack_require__(363); /** * Removes a random object from the given array and returns it. @@ -121473,7 +121974,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 922 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121491,21 +121992,21 @@ module.exports = { Clone: __webpack_require__(52), Extend: __webpack_require__(23), GetAdvancedValue: __webpack_require__(10), - GetFastValue: __webpack_require__(1), - GetMinMaxValue: __webpack_require__(923), + GetFastValue: __webpack_require__(2), + GetMinMaxValue: __webpack_require__(931), GetValue: __webpack_require__(4), - HasAll: __webpack_require__(924), - HasAny: __webpack_require__(286), + HasAll: __webpack_require__(932), + HasAny: __webpack_require__(288), HasValue: __webpack_require__(72), - IsPlainObject: __webpack_require__(165), + IsPlainObject: __webpack_require__(167), Merge: __webpack_require__(103), - MergeRight: __webpack_require__(925) + MergeRight: __webpack_require__(933) }; /***/ }), -/* 923 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121544,7 +122045,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 924 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -121581,7 +122082,7 @@ module.exports = HasAll; /***/ }), -/* 925 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121624,7 +122125,7 @@ module.exports = MergeRight; /***/ }), -/* 926 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121639,16 +122140,16 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(927), - Pad: __webpack_require__(195), - Reverse: __webpack_require__(928), - UppercaseFirst: __webpack_require__(251) + Format: __webpack_require__(935), + Pad: __webpack_require__(197), + Reverse: __webpack_require__(936), + UppercaseFirst: __webpack_require__(253) }; /***/ }), -/* 927 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -121685,7 +122186,7 @@ module.exports = Format; /***/ }), -/* 928 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -121714,7 +122215,7 @@ module.exports = ReverseString; /***/ }), -/* 929 */ +/* 937 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121724,10 +122225,10 @@ module.exports = ReverseString; */ var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(339); -var GetVelocity = __webpack_require__(950); -var TYPE = __webpack_require__(340); -var UpdateMotion = __webpack_require__(951); +var COLLIDES = __webpack_require__(340); +var GetVelocity = __webpack_require__(958); +var TYPE = __webpack_require__(341); +var UpdateMotion = __webpack_require__(959); /** * @classdesc @@ -122308,7 +122809,7 @@ module.exports = Body; /***/ }), -/* 930 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122318,7 +122819,7 @@ module.exports = Body; */ var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(952); +var DefaultDefs = __webpack_require__(960); /** * @classdesc @@ -122672,7 +123173,7 @@ module.exports = CollisionMap; /***/ }), -/* 931 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122682,9 +123183,9 @@ module.exports = CollisionMap; */ var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(932); -var ImpactImage = __webpack_require__(933); -var ImpactSprite = __webpack_require__(934); +var ImpactBody = __webpack_require__(940); +var ImpactImage = __webpack_require__(941); +var ImpactSprite = __webpack_require__(942); /** * @classdesc @@ -122817,7 +123318,7 @@ module.exports = Factory; /***/ }), -/* 932 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122827,7 +123328,7 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(847); +var Components = __webpack_require__(855); /** * @classdesc @@ -122950,7 +123451,7 @@ module.exports = ImpactBody; /***/ }), -/* 933 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122960,7 +123461,7 @@ module.exports = ImpactBody; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(847); +var Components = __webpack_require__(855); var Image = __webpack_require__(70); /** @@ -123109,7 +123610,7 @@ module.exports = ImpactImage; /***/ }), -/* 934 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123119,7 +123620,7 @@ module.exports = ImpactImage; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(847); +var Components = __webpack_require__(855); var Sprite = __webpack_require__(37); /** @@ -123272,7 +123773,7 @@ module.exports = ImpactSprite; /***/ }), -/* 935 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123281,17 +123782,17 @@ module.exports = ImpactSprite; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var Body = __webpack_require__(929); +var Body = __webpack_require__(937); var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(339); -var CollisionMap = __webpack_require__(930); -var EventEmitter = __webpack_require__(13); -var GetFastValue = __webpack_require__(1); +var COLLIDES = __webpack_require__(340); +var CollisionMap = __webpack_require__(938); +var EventEmitter = __webpack_require__(14); +var GetFastValue = __webpack_require__(2); var HasValue = __webpack_require__(72); var Set = __webpack_require__(61); -var Solver = __webpack_require__(966); -var TILEMAP_FORMATS = __webpack_require__(19); -var TYPE = __webpack_require__(340); +var Solver = __webpack_require__(974); +var TILEMAP_FORMATS = __webpack_require__(20); +var TYPE = __webpack_require__(341); /** * @classdesc @@ -124263,7 +124764,7 @@ module.exports = World; /***/ }), -/* 936 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124274,12 +124775,12 @@ module.exports = World; var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); -var Composites = __webpack_require__(938); -var Constraint = __webpack_require__(163); -var MatterImage = __webpack_require__(939); -var MatterSprite = __webpack_require__(940); -var MatterTileBody = __webpack_require__(850); -var PointerConstraint = __webpack_require__(982); +var Composites = __webpack_require__(946); +var Constraint = __webpack_require__(165); +var MatterImage = __webpack_require__(947); +var MatterSprite = __webpack_require__(948); +var MatterTileBody = __webpack_require__(858); +var PointerConstraint = __webpack_require__(990); /** * @classdesc @@ -124856,7 +125357,7 @@ module.exports = Factory; /***/ }), -/* 937 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -125467,7 +125968,7 @@ function scalar_eq(a,b,precision){ /***/ }), -/* 938 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125483,8 +125984,8 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(149); -var Constraint = __webpack_require__(163); +var Composite = __webpack_require__(151); +var Constraint = __webpack_require__(165); var Common = __webpack_require__(38); var Body = __webpack_require__(59); var Bodies = __webpack_require__(92); @@ -125800,7 +126301,7 @@ var Bodies = __webpack_require__(92); /***/ }), -/* 939 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125811,11 +126312,11 @@ var Bodies = __webpack_require__(92); var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); -var Components = __webpack_require__(849); -var GameObject = __webpack_require__(2); -var GetFastValue = __webpack_require__(1); +var Components = __webpack_require__(857); +var GameObject = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var Image = __webpack_require__(70); -var Pipeline = __webpack_require__(184); +var Pipeline = __webpack_require__(186); var Vector2 = __webpack_require__(6); /** @@ -125930,7 +126431,7 @@ module.exports = MatterImage; /***/ }), -/* 940 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125939,13 +126440,13 @@ module.exports = MatterImage; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AnimationComponent = __webpack_require__(363); +var AnimationComponent = __webpack_require__(364); var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); -var Components = __webpack_require__(849); -var GameObject = __webpack_require__(2); -var GetFastValue = __webpack_require__(1); -var Pipeline = __webpack_require__(184); +var Components = __webpack_require__(857); +var GameObject = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); +var Pipeline = __webpack_require__(186); var Sprite = __webpack_require__(37); var Vector2 = __webpack_require__(6); @@ -126067,7 +126568,7 @@ module.exports = MatterSprite; /***/ }), -/* 941 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126080,7 +126581,7 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(854); +var Plugin = __webpack_require__(862); var Common = __webpack_require__(38); (function() { @@ -126159,7 +126660,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 942 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126172,8 +126673,8 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(364); -var Detector = __webpack_require__(851); +var Pair = __webpack_require__(365); +var Detector = __webpack_require__(859); var Common = __webpack_require__(38); (function() { @@ -126486,7 +126987,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 943 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126499,7 +127000,7 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(364); +var Pair = __webpack_require__(365); var Common = __webpack_require__(38); (function() { @@ -126651,7 +127152,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 944 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127008,7 +127509,7 @@ var Bounds = __webpack_require__(95); /***/ }), -/* 945 */ +/* 953 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127025,15 +127526,15 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(855); -var Sleeping = __webpack_require__(341); -var Resolver = __webpack_require__(944); -var Pairs = __webpack_require__(943); -var Metrics = __webpack_require__(984); -var Grid = __webpack_require__(942); -var Events = __webpack_require__(162); -var Composite = __webpack_require__(149); -var Constraint = __webpack_require__(163); +var World = __webpack_require__(863); +var Sleeping = __webpack_require__(342); +var Resolver = __webpack_require__(952); +var Pairs = __webpack_require__(951); +var Metrics = __webpack_require__(992); +var Grid = __webpack_require__(950); +var Events = __webpack_require__(164); +var Composite = __webpack_require__(151); +var Constraint = __webpack_require__(165); var Common = __webpack_require__(38); var Body = __webpack_require__(59); @@ -127523,7 +128024,7 @@ var Body = __webpack_require__(59); /***/ }), -/* 946 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127536,15 +128037,15 @@ var Body = __webpack_require__(59); var Bodies = __webpack_require__(92); var Class = __webpack_require__(0); -var Composite = __webpack_require__(149); -var Engine = __webpack_require__(945); -var EventEmitter = __webpack_require__(13); -var GetFastValue = __webpack_require__(1); +var Composite = __webpack_require__(151); +var Engine = __webpack_require__(953); +var EventEmitter = __webpack_require__(14); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(4); var MatterBody = __webpack_require__(59); -var MatterEvents = __webpack_require__(162); -var MatterWorld = __webpack_require__(855); -var MatterTileBody = __webpack_require__(850); +var MatterEvents = __webpack_require__(164); +var MatterWorld = __webpack_require__(863); +var MatterTileBody = __webpack_require__(858); /** * @classdesc @@ -128235,7 +128736,7 @@ module.exports = World; /***/ }), -/* 947 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -128244,7 +128745,7 @@ module.exports = World; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -__webpack_require__(365); +__webpack_require__(366); var CONST = __webpack_require__(22); var Extend = __webpack_require__(23); @@ -128255,33 +128756,33 @@ var Extend = __webpack_require__(23); var Phaser = { - Actions: __webpack_require__(166), - Animation: __webpack_require__(436), - Cache: __webpack_require__(437), - Cameras: __webpack_require__(438), + Actions: __webpack_require__(168), + Animation: __webpack_require__(438), + Cache: __webpack_require__(439), + Cameras: __webpack_require__(440), Class: __webpack_require__(0), - Create: __webpack_require__(449), - Curves: __webpack_require__(455), - Data: __webpack_require__(458), - Display: __webpack_require__(460), - DOM: __webpack_require__(493), - EventEmitter: __webpack_require__(495), - Game: __webpack_require__(496), - GameObjects: __webpack_require__(541), - Geom: __webpack_require__(292), - Input: __webpack_require__(751), - Loader: __webpack_require__(765), - Math: __webpack_require__(783), - Physics: __webpack_require__(948), - Scene: __webpack_require__(250), - Scenes: __webpack_require__(856), - Sound: __webpack_require__(858), - Structs: __webpack_require__(859), - Textures: __webpack_require__(860), - Tilemaps: __webpack_require__(862), - Time: __webpack_require__(911), - Tweens: __webpack_require__(913), - Utils: __webpack_require__(917) + Create: __webpack_require__(451), + Curves: __webpack_require__(457), + Data: __webpack_require__(460), + Display: __webpack_require__(462), + DOM: __webpack_require__(495), + EventEmitter: __webpack_require__(497), + Game: __webpack_require__(498), + GameObjects: __webpack_require__(543), + Geom: __webpack_require__(293), + Input: __webpack_require__(759), + Loader: __webpack_require__(773), + Math: __webpack_require__(791), + Physics: __webpack_require__(956), + Scene: __webpack_require__(252), + Scenes: __webpack_require__(864), + Sound: __webpack_require__(866), + Structs: __webpack_require__(867), + Textures: __webpack_require__(868), + Tilemaps: __webpack_require__(870), + Time: __webpack_require__(919), + Tweens: __webpack_require__(921), + Utils: __webpack_require__(925) }; @@ -128301,10 +128802,10 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(164))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(166))) /***/ }), -/* 948 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128319,15 +128820,15 @@ global.Phaser = Phaser; module.exports = { - Arcade: __webpack_require__(825), - Impact: __webpack_require__(949), - Matter: __webpack_require__(969) + Arcade: __webpack_require__(833), + Impact: __webpack_require__(957), + Matter: __webpack_require__(977) }; /***/ }), -/* 949 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128354,22 +128855,22 @@ module.exports = { module.exports = { - Body: __webpack_require__(929), - COLLIDES: __webpack_require__(339), - CollisionMap: __webpack_require__(930), - Factory: __webpack_require__(931), - Image: __webpack_require__(933), - ImpactBody: __webpack_require__(932), - ImpactPhysics: __webpack_require__(965), - Sprite: __webpack_require__(934), - TYPE: __webpack_require__(340), - World: __webpack_require__(935) + Body: __webpack_require__(937), + COLLIDES: __webpack_require__(340), + CollisionMap: __webpack_require__(938), + Factory: __webpack_require__(939), + Image: __webpack_require__(941), + ImpactBody: __webpack_require__(940), + ImpactPhysics: __webpack_require__(973), + Sprite: __webpack_require__(942), + TYPE: __webpack_require__(341), + World: __webpack_require__(943) }; /***/ }), -/* 950 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128425,7 +128926,7 @@ module.exports = GetVelocity; /***/ }), -/* 951 */ +/* 959 */ /***/ (function(module, exports) { /** @@ -128520,7 +129021,7 @@ module.exports = UpdateMotion; /***/ }), -/* 952 */ +/* 960 */ /***/ (function(module, exports) { /** @@ -128591,7 +129092,7 @@ module.exports = { /***/ }), -/* 953 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -128667,7 +129168,7 @@ module.exports = Acceleration; /***/ }), -/* 954 */ +/* 962 */ /***/ (function(module, exports) { /** @@ -128740,7 +129241,7 @@ module.exports = BodyScale; /***/ }), -/* 955 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128749,7 +129250,7 @@ module.exports = BodyScale; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TYPE = __webpack_require__(340); +var TYPE = __webpack_require__(341); /** * [description] @@ -128823,7 +129324,7 @@ module.exports = BodyType; /***/ }), -/* 956 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -128901,7 +129402,7 @@ module.exports = Bounce; /***/ }), -/* 957 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128910,7 +129411,7 @@ module.exports = Bounce; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var TYPE = __webpack_require__(340); +var TYPE = __webpack_require__(341); /** * [description] @@ -129022,7 +129523,7 @@ module.exports = CheckAgainst; /***/ }), -/* 958 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129031,7 +129532,7 @@ module.exports = CheckAgainst; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var COLLIDES = __webpack_require__(339); +var COLLIDES = __webpack_require__(340); /** * [description] @@ -129169,7 +129670,7 @@ module.exports = Collides; /***/ }), -/* 959 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -129293,7 +129794,7 @@ module.exports = Debug; /***/ }), -/* 960 */ +/* 968 */ /***/ (function(module, exports) { /** @@ -129369,7 +129870,7 @@ module.exports = Friction; /***/ }), -/* 961 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -129430,7 +129931,7 @@ module.exports = Gravity; /***/ }), -/* 962 */ +/* 970 */ /***/ (function(module, exports) { /** @@ -129479,7 +129980,7 @@ module.exports = Offset; /***/ }), -/* 963 */ +/* 971 */ /***/ (function(module, exports) { /** @@ -129554,7 +130055,7 @@ module.exports = SetGameObject; /***/ }), -/* 964 */ +/* 972 */ /***/ (function(module, exports) { /** @@ -129653,7 +130154,7 @@ module.exports = Velocity; /***/ }), -/* 965 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129663,11 +130164,11 @@ module.exports = Velocity; */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(931); -var GetFastValue = __webpack_require__(1); +var Factory = __webpack_require__(939); +var GetFastValue = __webpack_require__(2); var Merge = __webpack_require__(103); -var PluginManager = __webpack_require__(11); -var World = __webpack_require__(935); +var PluginManager = __webpack_require__(12); +var World = __webpack_require__(943); /** * @classdesc @@ -129832,7 +130333,7 @@ module.exports = ImpactPhysics; /***/ }), -/* 966 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129841,9 +130342,9 @@ module.exports = ImpactPhysics; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var COLLIDES = __webpack_require__(339); -var SeperateX = __webpack_require__(967); -var SeperateY = __webpack_require__(968); +var COLLIDES = __webpack_require__(340); +var SeperateX = __webpack_require__(975); +var SeperateY = __webpack_require__(976); /** * Impact Physics Solver @@ -129906,7 +130407,7 @@ module.exports = Solver; /***/ }), -/* 967 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -129962,7 +130463,7 @@ module.exports = SeperateX; /***/ }), -/* 968 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -130047,7 +130548,7 @@ module.exports = SeperateY; /***/ }), -/* 969 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130062,20 +130563,20 @@ module.exports = SeperateY; module.exports = { - Factory: __webpack_require__(936), - Image: __webpack_require__(939), - Matter: __webpack_require__(853), - MatterPhysics: __webpack_require__(986), - PolyDecomp: __webpack_require__(937), - Sprite: __webpack_require__(940), - TileBody: __webpack_require__(850), - World: __webpack_require__(946) + Factory: __webpack_require__(944), + Image: __webpack_require__(947), + Matter: __webpack_require__(861), + MatterPhysics: __webpack_require__(994), + PolyDecomp: __webpack_require__(945), + Sprite: __webpack_require__(948), + TileBody: __webpack_require__(858), + World: __webpack_require__(954) }; /***/ }), -/* 970 */ +/* 978 */ /***/ (function(module, exports) { /** @@ -130115,7 +130616,7 @@ module.exports = Bounce; /***/ }), -/* 971 */ +/* 979 */ /***/ (function(module, exports) { /** @@ -130203,7 +130704,7 @@ module.exports = Collision; /***/ }), -/* 972 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130350,7 +130851,7 @@ module.exports = Force; /***/ }), -/* 973 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -130436,7 +130937,7 @@ module.exports = Friction; /***/ }), -/* 974 */ +/* 982 */ /***/ (function(module, exports) { /** @@ -130476,7 +130977,7 @@ module.exports = Gravity; /***/ }), -/* 975 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130535,7 +131036,7 @@ module.exports = Mass; /***/ }), -/* 976 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130590,7 +131091,7 @@ module.exports = Static; /***/ }), -/* 977 */ +/* 985 */ /***/ (function(module, exports) { /** @@ -130643,7 +131144,7 @@ module.exports = Sensor; /***/ }), -/* 978 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130654,7 +131155,7 @@ module.exports = Sensor; var Bodies = __webpack_require__(92); var Body = __webpack_require__(59); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * [description] @@ -130862,7 +131363,7 @@ module.exports = SetBody; /***/ }), -/* 979 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130871,7 +131372,7 @@ module.exports = SetBody; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var MatterEvents = __webpack_require__(162); +var MatterEvents = __webpack_require__(164); /** * [description] @@ -130983,7 +131484,7 @@ module.exports = Sleep; /***/ }), -/* 980 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130994,8 +131495,8 @@ module.exports = Sleep; var Body = __webpack_require__(59); var MATH_CONST = __webpack_require__(16); -var WrapAngle = __webpack_require__(160); -var WrapAngleDegrees = __webpack_require__(161); +var WrapAngle = __webpack_require__(162); +var WrapAngleDegrees = __webpack_require__(163); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -131275,7 +131776,7 @@ module.exports = Transform; /***/ }), -/* 981 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131375,7 +131876,7 @@ module.exports = Velocity; /***/ }), -/* 982 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131386,12 +131887,12 @@ module.exports = Velocity; var Bounds = __webpack_require__(95); var Class = __webpack_require__(0); -var Composite = __webpack_require__(149); -var Constraint = __webpack_require__(163); -var Detector = __webpack_require__(851); -var GetFastValue = __webpack_require__(1); +var Composite = __webpack_require__(151); +var Constraint = __webpack_require__(165); +var Detector = __webpack_require__(859); +var GetFastValue = __webpack_require__(2); var Merge = __webpack_require__(103); -var Sleeping = __webpack_require__(341); +var Sleeping = __webpack_require__(342); var Vector2 = __webpack_require__(6); var Vertices = __webpack_require__(93); @@ -131666,7 +132167,7 @@ module.exports = PointerConstraint; /***/ }), -/* 983 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131682,7 +132183,7 @@ var Query = {}; module.exports = Query; var Vector = __webpack_require__(94); -var SAT = __webpack_require__(852); +var SAT = __webpack_require__(860); var Bounds = __webpack_require__(95); var Bodies = __webpack_require__(92); var Vertices = __webpack_require__(93); @@ -131784,7 +132285,7 @@ var Vertices = __webpack_require__(93); /***/ }), -/* 984 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -131797,7 +132298,7 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(149); +var Composite = __webpack_require__(151); var Common = __webpack_require__(38); (function() { @@ -131883,7 +132384,7 @@ var Common = __webpack_require__(38); /***/ }), -/* 985 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132108,7 +132609,7 @@ var Bounds = __webpack_require__(95); })(); /***/ }), -/* 986 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132118,16 +132619,16 @@ var Bounds = __webpack_require__(95); */ var Class = __webpack_require__(0); -var Factory = __webpack_require__(936); -var GetFastValue = __webpack_require__(1); +var Factory = __webpack_require__(944); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(4); -var MatterAttractors = __webpack_require__(987); -var MatterLib = __webpack_require__(941); -var MatterWrap = __webpack_require__(988); +var MatterAttractors = __webpack_require__(995); +var MatterLib = __webpack_require__(949); +var MatterWrap = __webpack_require__(996); var Merge = __webpack_require__(103); -var Plugin = __webpack_require__(854); -var PluginManager = __webpack_require__(11); -var World = __webpack_require__(946); +var Plugin = __webpack_require__(862); +var PluginManager = __webpack_require__(12); +var World = __webpack_require__(954); /** * @classdesc @@ -132337,10 +132838,10 @@ module.exports = MatterPhysics; /***/ }), -/* 987 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(853); +var Matter = __webpack_require__(861); /** * An attractors plugin for matter.js. @@ -132478,10 +132979,10 @@ module.exports = MatterAttractors; */ /***/ }), -/* 988 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(853); +var Matter = __webpack_require__(861); /** * A coordinate wrapping plugin for matter.js. diff --git a/dist/phaser.min.js b/dist/phaser.min.js index ead95579f..230d77d11 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()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=947)}([function(t,e){function i(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){var o=(u=e,c=r,f=void 0,p=void 0,p=(d=i)?u[c]:Object.getOwnPropertyDescriptor(u,c),!d&&p.value&&"object"==typeof p.value&&(p=p.value),!!(p&&(f=p,f.get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===p.enumerable&&(p.enumerable=!0),void 0===p.configurable&&(p.configurable=!0),p));if(!1!==o){if(a=(n||t).prototype,h=r,l=void 0,(l=Object.getOwnPropertyDescriptor(a,h))&&(l.value&&"object"==typeof l.value&&(l=l.value),!1===l.configurable)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,o)}else t.prototype[r]=e[r]}var a,h,l,u,c,d,f,p}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(182),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return t instanceof HTMLElement},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n>>0},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;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*g+x)*b,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(307),o=i(308),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(1),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,i,r,o){o=o||t.position;for(var a=0;a0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(179),o=i(180),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(121),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(494))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(166),s=i(0),r=i(1),o=i(4),a=i(272),h=i(61),l=i(37),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(2),r=i(37),o=i(6),a=i(119),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(13),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})}});Object.defineProperty(o.prototype,"rate",{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}}),Object.defineProperty(o.prototype,"detune",{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(13),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(647),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(326),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(38),o=i(59),a=i(95),h=i(94),l=i(937);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(38);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){t.exports={CalculateFacesAt:i(150),CalculateFacesWithin:i(34),Copy:i(863),CreateFromTiles:i(864),CullTiles:i(865),Fill:i(866),FilterTiles:i(867),FindByIndex:i(868),FindTile:i(869),ForEachTile:i(870),GetTileAt:i(97),GetTileAtWorldXY:i(871),GetTilesWithin:i(15),GetTilesWithinShape:i(872),GetTilesWithinWorldXY:i(873),HasTileAt:i(343),HasTileAtWorldXY:i(874),IsInLayerBounds:i(74),PutTileAt:i(151),PutTileAtWorldXY:i(875),PutTilesAt:i(876),Randomize:i(877),RemoveTileAt:i(344),RemoveTileAtWorldXY:i(878),RenderDebug:i(879),ReplaceByIndex:i(342),SetCollision:i(880),SetCollisionBetween:i(881),SetCollisionByExclusion:i(882),SetCollisionByProperty:i(883),SetCollisionFromCollisionGroup:i(884),SetTileIndexCallback:i(885),SetTileLocationCallback:i(886),Shuffle:i(887),SwapByIndex:i(888),TileToWorldX:i(98),TileToWorldXY:i(889),TileToWorldY:i(99),WeightedRandomize:i(890),WorldToTileX:i(39),WorldToTileXY:i(891),WorldToTileY:i(40)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||w-y||A>-m||S-y||T>-m||w-y||A>-m||S-v&&A*n+C*r+h>-y&&(A+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],l=n[4],u=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*u-a*l)*c,y=(r*l-s*u)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),b=this.zoom,w=this.scrollX,T=this.scrollY,S=t+(w*m-T*x)*b,A=e+(w*x+T*m)*b;return i.x=S*d+A*p+v,i.y=S*f+A*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;eu&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom,this.roundPixels&&(this._shakeOffsetX|=0,this._shakeOffsetY|=0))}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=l},function(t,e,i){var n=i(198),s=i(200),r=i(202),o=i(203);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(118),r=i(204),o=i(205),a=i(206),h=i(61),l=i(81),u=i(6),c=i(51),d=i(119),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWAD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(83),r=i(527),o=i(528),a=i(231),h=i(252),l=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=l},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(544),h=i(545),l=i(546),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(549),s=i(552),r=i(0),o=i(12),a=i(130),h=i(2),l=i(86),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=u},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(265),a=i(553),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(114),s=i(0),r=i(127),o=i(12),a=i(267),h=i(2),l=i(4),u=i(16),c=i(565),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=l(e,"x",0),n=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(268),o=i(269),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(2),o=i(570),a=i(86),h=i(571),l=i(610),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h]+" ")}r0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(l[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(l[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(20),s=i(0),r=i(12),o=i(2),a=i(288),h=i(619),l=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){var u=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=u,this.setTexture(h,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,b=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(38);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(375),Call:i(376),GetFirst:i(377),GridAlign:i(378),IncAlpha:i(395),IncX:i(396),IncXY:i(397),IncY:i(398),PlaceOnCircle:i(399),PlaceOnEllipse:i(400),PlaceOnLine:i(401),PlaceOnRectangle:i(402),PlaceOnTriangle:i(403),PlayAnimation:i(404),RandomCircle:i(405),RandomEllipse:i(406),RandomLine:i(407),RandomRectangle:i(408),RandomTriangle:i(409),Rotate:i(410),RotateAround:i(411),RotateAroundDistance:i(412),ScaleX:i(413),ScaleXY:i(414),ScaleY:i(415),SetAlpha:i(416),SetBlendMode:i(417),SetDepth:i(418),SetHitArea:i(419),SetOrigin:i(420),SetRotation:i(421),SetScale:i(422),SetScaleX:i(423),SetScaleY:i(424),SetTint:i(425),SetVisible:i(426),SetX:i(427),SetXY:i(428),SetY:i(429),ShiftPosition:i(430),Shuffle:i(431),SmootherStep:i(432),SmoothStep:i(433),Spread:i(434),ToggleVisible:i(435)}},function(t,e,i){var n=i(168),s=[];s[n.BOTTOM_CENTER]=i(169),s[n.BOTTOM_LEFT]=i(170),s[n.BOTTOM_RIGHT]=i(171),s[n.CENTER]=i(172),s[n.LEFT_CENTER]=i(174),s[n.RIGHT_CENTER]=i(175),s[n.TOP_CENTER]=i(176),s[n.TOP_LEFT]=i(177),s[n.TOP_RIGHT]=i(178);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(46),r=i(25),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(173),s=i(46),r=i(49);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(47),s=i(48);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(49),s=i(26),r=i(48),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(28),r=i(48),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(30),r=i(47),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(181),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=l[0],l[0].prevFrame=o;var v=1/(l.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(192),s=i(0),r=i(113),o=i(13),a=i(4),h=i(195),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(13),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(196),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(118),r=i(207),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(208),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,w=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,_=c*m-p*g,E=d*y-f*v,P=d*m-p*v,L=f*m-p*y,k=x*L-b*P+w*E+T*_-S*M+A*C;return k?(k=1/k,i[0]=(h*L-l*P+u*E)*k,i[1]=(l*_-a*L-u*M)*k,i[2]=(a*P-h*_+u*C)*k,i[3]=(r*P-s*L-o*E)*k,i[4]=(n*L-r*_+o*M)*k,i[5]=(s*_-n*P-o*C)*k,i[6]=(v*A-y*S+m*T)*k,i[7]=(y*w-g*A-m*b)*k,i[8]=(g*S-v*w+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(212),s=i(20),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(484)(t))},function(t,e,i){var n=i(116);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l={r:i=Math.floor(i*=255),g:i,b:i,color:0},u=s%6;return 0===u?(l.g=h,l.b=o):1===u?(l.r=a,l.b=o):2===u?(l.r=o,l.b=h):3===u?(l.r=o,l.g=a):4===u?(l.r=h,l.g=o):5===u&&(l.g=o,l.b=a),l.color=n(l.r,l.g,l.b),l}},function(t,e,i){var n=i(225);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(20),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=w(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h,l,u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&(l=c,(h=u).next.i!==l.i&&h.prev.i!==l.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,l)&&x(h,l)&&x(l,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,l))){var d=b(u,c);return u=r(u,u.next),d=r(d,d.next),o(u,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}u=u.next}while(u!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function w(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(512),r=i(236),o=new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,o=t.lights.cull(e),a=Math.min(o.length,10),h=e.matrix,l={x:0,y:0},u=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(a<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,l=0,u=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(u.texture,0),n.drawArrays(o,u.first,l)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setTexture2D(s.source.glTexture,0),n.setPipeline(this),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,a=(o.config.resolution,this.maxQuads),h=e.scrollX,l=e.scrollY,u=e.matrix.matrix,c=u[0],d=u[1],f=u[2],p=u[3],g=u[4],v=u[5],y=Math.sin,m=Math.cos,x=this.vertexComponentCount,b=this.vertexCapacity,w=t.defaultFrame.source.glTexture;this.setTexture2D(w,0);for(var T=0;T=b&&(this.flush(),this.setTexture2D(w,0));for(var L=0;L=b&&(this.flush(),this.setTexture2D(w,0))}}}},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=(this.renderer.config.resolution,t.getRenderList()),o=r.length,h=e.matrix.matrix,l=h[0],u=h[1],c=h[2],d=h[3],f=h[4],p=h[5],g=e.scrollX*t.scrollFactorX,v=e.scrollY*t.scrollFactorY,y=Math.ceil(o/this.maxQuads),m=0,x=t.x-g,b=t.y-v,w=0;w=this.vertexCapacity&&this.flush()}m+=T,o-=T,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=(this.renderer.config.resolution,e.matrix.matrix),h=t.frame,l=h.texture.source[h.sourceIndex].glTexture,u=!!l.isRenderTexture,c=t.flipX,d=t.flipY^u,f=h.uvs,p=h.width*(c?-1:1),g=h.height*(d?-1:1),v=-t.displayOriginX+h.x+h.width*(c?1:0),y=-t.displayOriginY+h.y+h.height*(d?1:0),m=v+p,x=y+g,b=t.x-e.scrollX*t.scrollFactorX,w=t.y-e.scrollY*t.scrollFactorY,T=t.scaleX,S=t.scaleY,A=-t.rotation,C=t._alphaTL,M=t._alphaTR,_=t._alphaBL,E=t._alphaBR,P=t._tintTL,L=t._tintTR,k=t._tintBL,F=t._tintBR,O=Math.sin(A),R=Math.cos(A),B=R*T,D=-O*T,I=O*S,Y=R*S,z=b,X=w,N=o[0],V=o[1],W=o[2],G=o[3],U=B*N+D*W,j=B*V+D*G,H=I*N+Y*W,q=I*V+Y*G,K=z*N+X*W+o[4],J=z*V+X*G+o[5],Z=v*U+y*H+K,Q=v*j+y*q+J,$=v*U+x*H+K,tt=v*j+x*q+J,et=m*U+x*H+K,it=m*j+x*q+J,nt=m*U+y*H+K,st=m*j+y*q+J,rt=n(P,C),ot=n(L,M),at=n(k,_),ht=n(F,E);this.setTexture2D(l,0),s[(i=this.vertexCount*this.vertexComponentCount)+0]=Z,s[i+1]=Q,s[i+2]=f.x0,s[i+3]=f.y0,r[i+4]=rt,s[i+5]=$,s[i+6]=tt,s[i+7]=f.x1,s[i+8]=f.y1,r[i+9]=at,s[i+10]=et,s[i+11]=it,s[i+12]=f.x2,s[i+13]=f.y2,r[i+14]=ht,s[i+15]=Z,s[i+16]=Q,s[i+17]=f.x0,s[i+18]=f.y0,r[i+19]=rt,s[i+20]=et,s[i+21]=it,s[i+22]=f.x2,s[i+23]=f.y2,r[i+24]=ht,s[i+25]=nt,s[i+26]=st,s[i+27]=f.x3,s[i+28]=f.y3,r[i+29]=ot,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,l=t.alphas,u=this.vertexViewF32,c=this.vertexViewU32,d=(this.renderer.config.resolution,e.matrix.matrix),f=t.frame,p=t.texture.source[f.sourceIndex].glTexture,g=t.x-e.scrollX*t.scrollFactorX,v=t.y-e.scrollY*t.scrollFactorY,y=t.scaleX,m=t.scaleY,x=-t.rotation,b=Math.sin(x),w=Math.cos(x),T=w*y,S=-b*y,A=b*m,C=w*m,M=g,_=v,E=d[0],P=d[1],L=d[2],k=d[3],F=T*E+S*L,O=T*P+S*k,R=A*E+C*L,B=A*P+C*k,D=M*E+_*L+d[4],I=M*P+_*k+d[5],Y=0;this.setTexture2D(p,0),Y=this.vertexCount*this.vertexComponentCount;for(var z=0,X=0;zthis.vertexCapacity&&this.flush();var i,n,s,r,o,h,l,u,c=t.text,d=c.length,f=a.getTintAppendFloatAlpha,p=this.vertexViewF32,g=this.vertexViewU32,v=(this.renderer.config.resolution,e.matrix.matrix),y=e.width+50,m=e.height+50,x=t.frame,b=t.texture.source[x.sourceIndex],w=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,S=t.fontData,A=S.lineHeight,C=t.fontSize/S.size,M=S.chars,_=t.alpha,E=f(t._tintTL,_),P=f(t._tintTR,_),L=f(t._tintBL,_),k=f(t._tintBR,_),F=t.x,O=t.y,R=x.cutX,B=x.cutY,D=b.width,I=b.height,Y=b.glTexture,z=0,X=0,N=0,V=0,W=null,G=0,U=0,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=null,nt=0,st=F-w+x.x,rt=O-T+x.y,ot=-t.rotation,at=t.scaleX,ht=t.scaleY,lt=Math.sin(ot),ut=Math.cos(ot),ct=ut*at,dt=-lt*at,ft=lt*ht,pt=ut*ht,gt=st,vt=rt,yt=v[0],mt=v[1],xt=v[2],bt=v[3],wt=ct*yt+dt*xt,Tt=ct*mt+dt*bt,St=ft*yt+pt*xt,At=ft*mt+pt*bt,Ct=gt*yt+vt*xt+v[4],Mt=gt*mt+vt*bt+v[5],_t=0;this.setTexture2D(Y,0);for(var Et=0;Ety||n<-50||n>m)&&(s<-50||s>y||r<-50||r>m)&&(o<-50||o>y||h<-50||h>m)&&(l<-50||l>y||u<-50||u>m)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),p[(_t=this.vertexCount*this.vertexComponentCount)+0]=i,p[_t+1]=n,p[_t+2]=Q,p[_t+3]=tt,g[_t+4]=E,p[_t+5]=s,p[_t+6]=r,p[_t+7]=Q,p[_t+8]=et,g[_t+9]=L,p[_t+10]=o,p[_t+11]=h,p[_t+12]=$,p[_t+13]=et,g[_t+14]=k,p[_t+15]=i,p[_t+16]=n,p[_t+17]=Q,p[_t+18]=tt,g[_t+19]=E,p[_t+20]=o,p[_t+21]=h,p[_t+22]=$,p[_t+23]=et,g[_t+24]=k,p[_t+25]=l,p[_t+26]=u,p[_t+27]=$,p[_t+28]=tt,g[_t+29]=P,this.vertexCount+=6))}}else z=0,N=0,X+=A,it=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,l,u,c,d,f,p,g,v,y=t.displayCallback,m=t.text,x=m.length,b=a.getTintAppendFloatAlpha,w=this.vertexViewF32,T=this.vertexViewU32,S=this.renderer,A=(S.config.resolution,e.matrix.matrix),C=t.frame,M=t.texture.source[C.sourceIndex],_=e.scrollX*t.scrollFactorX,E=e.scrollY*t.scrollFactorY,P=t.scrollX,L=t.scrollY,k=t.fontData,F=k.lineHeight,O=t.fontSize/k.size,R=k.chars,B=t.alpha,D=b(t._tintTL,B),I=b(t._tintTR,B),Y=b(t._tintBL,B),z=b(t._tintBR,B),X=t.x,N=t.y,V=C.cutX,W=C.cutY,G=M.width,U=M.height,j=M.glTexture,H=0,q=0,K=0,J=0,Z=null,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,lt=0,ut=null,ct=0,dt=X+C.x,ft=N+C.y,pt=-t.rotation,gt=t.scaleX,vt=t.scaleY,yt=Math.sin(pt),mt=Math.cos(pt),xt=mt*gt,bt=-yt*gt,wt=yt*vt,Tt=mt*vt,St=dt,At=ft,Ct=A[0],Mt=A[1],_t=A[2],Et=A[3],Pt=xt*Ct+bt*_t,Lt=xt*Mt+bt*Et,kt=wt*Ct+Tt*_t,Ft=wt*Mt+Tt*Et,Ot=St*Ct+At*_t+A[4],Rt=St*Mt+At*Et+A[5],Bt=t.cropWidth>0||t.cropHeight>0,Dt=0;this.setTexture2D(j,0),Bt&&S.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var It=0;Itthis.vertexCapacity&&this.flush(),w[(Dt=this.vertexCount*this.vertexComponentCount)+0]=i,w[Dt+1]=n,w[Dt+2]=ot,w[Dt+3]=ht,T[Dt+4]=D,w[Dt+5]=s,w[Dt+6]=r,w[Dt+7]=ot,w[Dt+8]=lt,T[Dt+9]=Y,w[Dt+10]=o,w[Dt+11]=h,w[Dt+12]=at,w[Dt+13]=lt,T[Dt+14]=z,w[Dt+15]=i,w[Dt+16]=n,w[Dt+17]=ot,w[Dt+18]=ht,T[Dt+19]=D,w[Dt+20]=o,w[Dt+21]=h,w[Dt+22]=at,w[Dt+23]=lt,T[Dt+24]=z,w[Dt+25]=l,w[Dt+26]=u,w[Dt+27]=at,w[Dt+28]=ht,T[Dt+29]=I,this.vertexCount+=6}}}else H=0,K=0,q+=F,ut=null;Bt&&S.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,l=t.alpha,u=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,u=-u;var E,P=this.vertexViewF32,L=this.vertexViewU32,k=(this.renderer.config.resolution,_.matrix.matrix),F=o*(c?1:0)-g,O=a*(d?1:0)-v,R=F+o*(c?-1:1),B=O+a*(d?-1:1),D=s-_.scrollX*f,I=r-_.scrollY*p,Y=Math.sin(u),z=Math.cos(u),X=z*h,N=-Y*h,V=Y*l,W=z*l,G=D,U=I,j=k[0],H=k[1],q=k[2],K=k[3],J=X*j+N*q,Z=X*H+N*K,Q=V*j+W*q,$=V*H+W*K,tt=G*j+U*q+k[4],et=G*H+U*K+k[5],it=F*J+O*Q+tt,nt=F*Z+O*$+et,st=F*J+B*Q+tt,rt=F*Z+B*$+et,ot=R*J+B*Q+tt,at=R*Z+B*$+et,ht=R*J+O*Q+tt,lt=R*Z+O*$+et,ut=y/i+C,ct=m/n+M,dt=(y+x)/i+C,ft=(m+b)/n+M;this.setTexture2D(e,0),P[(E=this.vertexCount*this.vertexComponentCount)+0]=it,P[E+1]=nt,P[E+2]=ut,P[E+3]=ct,L[E+4]=w,P[E+5]=st,P[E+6]=rt,P[E+7]=ut,P[E+8]=ft,L[E+9]=T,P[E+10]=ot,P[E+11]=at,P[E+12]=dt,P[E+13]=ft,L[E+14]=S,P[E+15]=it,P[E+16]=nt,P[E+17]=ut,P[E+18]=ct,L[E+19]=w,P[E+20]=ot,P[E+21]=at,P[E+22]=dt,P[E+23]=ft,L[E+24]=S,P[E+25]=ht,P[E+26]=lt,P[E+27]=dt,P[E+28]=ct,L[E+29]=A,this.vertexCount+=6},batchGraphics:function(){}});t.exports=l},function(t,e,i){var n=i(0),s=i(13),r=i(238),o=i(242),a=i(245),h=i(246),l=i(8),u=i(247),c=i(248),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new u(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new l,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=0;u0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(13),r=i(243),o=i(128),a=i(244),h=i(524),l=i(525),u=i(526),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(83),s=i(4),r=i(529),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(254),s=i(256),r=i(258),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(84),r=i(255),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(84),s=i(0),r=i(13),o=i(257),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(85),s=i(0),r=i(13),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(84),r=i(259),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context?this.context.suspend():this.context.close(),this.context=null,s.prototype.destroy.call(this)}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var S=y+g-s,A=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,u=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,b=0,w=1,T=0,S=0,A=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(u-h,c-l),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,S=(65280&x)>>>8,A=255&x,v.strokeStyle="rgba("+T+","+S+","+A+","+y+")",v.lineWidth=w,C+=3;break;case n.FILL_STYLE:b=g[C+1],m=g[C+2],T=(16711680&b)>>>16,S=(65280&b)>>>8,A=255&b,v.fillStyle="rgba("+T+","+S+","+A+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t,e,i,n,s,r,o){this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1},set:function(t,e,i,n,s,r,o){return this.x=t,this.y=e,this.radius=i,this.r=n,this.g=s,this.b=r,this.intensity=o,this.scrollFactorX=1,this.scrollFactorY=1,this},setScrollFactor:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this},setColor:function(t){var e=s.getFloatsFromUintRGB(t);return this.r=e[0],this.g=e[1],this.b=e[2],this},setIntensity:function(t){return this.intensity=t,this},setPosition:function(t,e){return this.x=t,this.y=e,this},setRadius:function(t){return this.radius=t,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(290),r=i(235),o=i(42),a=new n({initialize:function(){this.lightPool=[],this.lights=[],this.culledLights=[],this.ambientColor={r:.1,g:.1,b:.1},this.active=!1},enable:function(){return this.active=!0,this},disable:function(){return this.active=!1,this},cull:function(t){var e=this.lights,i=this.culledLights,n=e.length,s=t.x+t.width/2,o=t.y+t.height/2,a=(t.width+t.height)/2,h={x:0,y:0},l=t.matrix,u=this.systems.game.config.height;i.length=0;for(var c=0;c0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(655),Ellipse:i(267),Intersects:i(293),Line:i(675),Point:i(693),Polygon:i(707),Rectangle:i(305),Triangle:i(736)}},function(t,e,i){t.exports={CircleToCircle:i(665),CircleToRectangle:i(666),GetRectangleIntersection:i(667),LineToCircle:i(295),LineToLine:i(89),LineToRectangle:i(668),PointToLine:i(296),PointToLineSegment:i(669),RectangleToRectangle:i(294),RectangleToTriangle:i(670),RectangleToValues:i(671),TriangleToCircle:i(672),TriangleToLine:i(673),TriangleToTriangle:i(674)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(300),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(50),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(144),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(148);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(1),h=i(315),l=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});l.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return null;var u=l.findAudioURL(r,i);return u?!a.webAudio||o&&o.disableWebAudio?new h(e,u,t.path,n,r.sound.locked):new l(e,u,t.path,s,r.sound.context):null},o.register("audio",function(t,e,i,n){var s=l.create(this,t,e,i,n);return s&&this.addFile(s),this}),l.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(321);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(325),s=i(91),r=i(0),o=i(58),a=i(327),h=i(328),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=l},function(t,e,i){var n=i(0),s=i(326),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(827),Angular:i(828),Bounce:i(829),Debug:i(830),Drag:i(831),Enable:i(832),Friction:i(833),Gravity:i(834),Immovable:i(835),Mass:i(836),Size:i(837),Velocity:i(838)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(1),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(d.x,d.y,l.right,l.y)-d.radius):d.y>l.bottom&&(d.xl.right&&(a=h(d.x,d.y,l.right,l.bottom)-d.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),b=f*Math.sin(o)-p*Math.cos(o),w=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),S=((g-m)*x+2*m*w)/(g+m),A=(2*g*x+(m-g)*w)/(g+m);return t.immovable||(t.velocity.x=(S*Math.cos(o)-b*Math.sin(o))*t.bounce.x,t.velocity.y=(b*Math.cos(o)+S*Math.sin(o))*t.bounce.y,f=t.velocity.x,p=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+A*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,g=e.getTilesWithinWorldXY(a,h,l,u);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(33),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(162);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(44),s=i(74),r=i(150);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(19),s=i(153),r=i(346),o=i(347),a=i(352);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(19),s=i(153);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(19),s=i(76),r=i(893),o=i(895),a=i(896),h=i(898),l=i(899),u=i(900);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(35),r=i(354),o=i(23),a=i(19),h=i(75),l=i(322),u=i(355),c=i(44),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[l])return this.tilesets[l].setTileSize(i,n),this.tilesets[l].setSpacing(s,r),this.tilesets[l].setImage(h),this.tilesets[l];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var u=new f(t,o,i,n,s,r);return u.setImage(h),this.tilesets.push(u),u},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(915);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(157),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),l=i(156),u=i(158),c=i(159);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),S=[],A=l("value",f),C=c(p[0],"value",A.getEnd,A.getStart,m,g,v,T,x,b,w,!1,!1);C.start=d,C.current=d,C.to=f,S.push(C);var M=new u(t,S,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var _=h(e,"callbackScope",M),E=[M,null],P=u.TYPES,L=0;L0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(183),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(160),r=i(161),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(114),CameraManager:i(443)}},function(t,e,i){var n=i(114),s=i(0),r=i(1),o=i(11),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(209),r=i(210),o=i(11),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(222);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(223);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(224),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(226),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(45),s=i(232);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(125),o=i(42),a=i(505),h=i(506),l=i(509),u=i(235),c=i(236),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=void 0===l||null===l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(){return this},deleteFramebuffer:function(){return this},deleteProgram:function(){return this},deleteBuffer:function(){return this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;lthis.vertexCapacity&&this.flush();this.renderer.config.resolution;var x=this.vertexViewF32,b=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=m[0],C=m[1],M=m[2],_=m[3],E=d*A+f*M,P=d*C+f*_,L=p*A+g*M,k=p*C+g*_,F=v*A+y*M+m[4],O=v*C+y*_+m[5],R=r*E+o*L+F,B=r*P+o*k+O,D=r*E+S*L+F,I=r*P+S*k+O,Y=T*E+S*L+F,z=T*P+S*k+O,X=T*E+o*L+F,N=T*P+o*k+O,V=l.getTintAppendFloatAlphaAndSwap(u,c);x[w+0]=R,x[w+1]=B,b[w+2]=V,x[w+3]=D,x[w+4]=I,b[w+5]=V,x[w+6]=Y,x[w+7]=z,b[w+8]=V,x[w+9]=R,x[w+10]=B,b[w+11]=V,x[w+12]=Y,x[w+13]=z,b[w+14]=V,x[w+15]=X,x[w+16]=N,b[w+17]=V,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var w=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=b[0],C=b[1],M=b[2],_=b[3],E=p*A+g*M,P=p*C+g*_,L=v*A+y*M,k=v*C+y*_,F=m*A+x*M+b[4],O=m*C+x*_+b[5],R=r*E+o*L+F,B=r*P+o*k+O,D=a*E+h*L+F,I=a*P+h*k+O,Y=u*E+c*L+F,z=u*P+c*k+O,X=l.getTintAppendFloatAlphaAndSwap(d,f);w[S+0]=R,w[S+1]=B,T[S+2]=X,w[S+3]=D,w[S+4]=I,T[S+5]=X,w[S+6]=Y,w[S+7]=z,T[S+8]=X,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,b){var w=this.tempTriangle;w[0].x=r,w[0].y=o,w[0].width=c,w[0].rgb=d,w[0].alpha=f,w[1].x=a,w[1].y=h,w[1].width=c,w[1].rgb=d,w[1].alpha=f,w[2].x=l,w[2].y=u,w[2].width=c,w[2].rgb=d,w[2].alpha=f,w[3].x=r,w[3].y=o,w[3].width=c,w[3].rgb=d,w[3].alpha=f,this.batchStrokePath(t,e,i,n,s,w,c,d,f,p,g,v,y,m,x,!1,b)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v){this.renderer.setPipeline(this);this.renderer.config.resolution;for(var y,m,x,b,w,T,S,A,C,M,_,E,P,L,k,F,O,R=o.length,B=this.polygonCache,D=this.vertexViewF32,I=this.vertexViewU32,Y=0,z=v[0],X=v[1],N=v[2],V=v[3],W=u*z+c*N,G=u*X+c*V,U=d*z+f*N,j=d*X+f*V,H=p*z+g*N+v[4],q=p*X+g*V+v[5],K=l.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,E=(T=B[x+0])*W+(S=B[x+1])*U+H,P=T*G+S*j+q,L=(A=B[b+0])*W+(C=B[b+1])*U+H,k=A*G+C*j+q,F=(M=B[w+0])*W+(_=B[w+1])*U+H,O=M*G+_*j+q,D[Y+0]=E,D[Y+1]=P,I[Y+2]=K,D[Y+3]=L,D[Y+4]=k,I[Y+5]=K,D[Y+6]=F,D[Y+7]=O,I[Y+8]=K,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var b,w,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,_=this.vertexViewU32,E=l.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),b=C[L-1]||C[k-1],w=C[L],M[(T=this.vertexCount*this.vertexComponentCount)+0]=b[6],M[T+1]=b[7],_[T+2]=E(b[8],h),M[T+3]=b[0],M[T+4]=b[1],_[T+5]=E(b[2],h),M[T+6]=w[9],M[T+7]=w[10],_[T+8]=E(w[11],h),M[T+9]=b[0],M[T+10]=b[1],_[T+11]=E(b[2],h),M[T+12]=b[6],M[T+13]=b[7],_[T+14]=E(b[8],h),M[T+15]=w[3],M[T+16]=w[4],_[T+17]=E(w[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var T=w[0],S=w[1],A=w[2],C=w[3],M=g*T+v*A,_=g*S+v*C,E=y*T+m*A,P=y*S+m*C,L=x*T+b*A+w[4],k=x*S+b*C+w[5],F=this.vertexViewF32,O=this.vertexViewU32,R=a-r,B=h-o,D=Math.sqrt(R*R+B*B),I=u*(h-o)/D,Y=u*(r-a)/D,z=c*(h-o)/D,X=c*(r-a)/D,N=a-z,V=h-X,W=r-I,G=o-Y,U=a+z,j=h+X,H=r+I,q=o+Y,K=N*M+V*E+L,J=N*_+V*P+k,Z=W*M+G*E+L,Q=W*_+G*P+k,$=U*M+j*E+L,tt=U*_+j*P+k,et=H*M+q*E+L,it=H*_+q*P+k,nt=l.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return F[ot+0]=K,F[ot+1]=J,O[ot+2]=rt,F[ot+3]=Z,F[ot+4]=Q,O[ot+5]=st,F[ot+6]=$,F[ot+7]=tt,O[ot+8]=rt,F[ot+9]=Z,F[ot+10]=Q,O[ot+11]=st,F[ot+12]=et,F[ot+13]=it,O[ot+14]=st,F[ot+15]=$,F[ot+16]=tt,O[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i,n,r=e.scrollX*t.scrollFactorX,o=e.scrollY*t.scrollFactorY,a=t.x-r,h=t.y-o,l=t.scaleX,u=t.scaleY,y=-t.rotation,m=t.commandBuffer,x=1,b=1,w=0,T=0,S=1,A=e.matrix.matrix,C=null,M=0,_=0,E=0,P=0,L=0,k=0,F=0,O=0,R=0,B=null,D=Math.sin,I=Math.cos,Y=D(y),z=I(y),X=z*l,N=-Y*l,V=Y*u,W=z*u,G=a,U=h,j=A[0],H=A[1],q=A[2],K=A[3],J=X*j+N*q,Z=X*H+N*K,Q=V*j+W*q,$=V*H+W*K,tt=G*j+U*q+A[4],et=G*H+U*K+A[5];v.length=0;for(var it=0,nt=m.length;it0){var st=C.points[0],rt=C.points[C.points.length-1];C.points.push(st),C=new d(rt.x,rt.y,rt.width,rt.rgb,rt.alpha),v.push(C)}break;case s.FILL_PATH:for(i=0,n=v.length;i=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(1),s=i(251);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(1);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,b=0;br&&(m=w-r),T>o&&(x=T-o),t.add(b,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(1);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,b=e.x,w=s-b,T=s-(g-f-b),S=e.y,A=r-S,C=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=l,_=l,E=0,P=e.sourceIndex,L=0;L0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(542),GameObjectCreator:i(14),GameObjectFactory:i(9),UpdateList:i(543),Components:i(12),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(287),Sprite3D:i(81),Sprite:i(37),Text:i(139),TileSprite:i(140),Zone:i(77),Factories:{Blitter:i(622),DynamicBitmapText:i(623),Graphics:i(624),Group:i(625),Image:i(626),Particles:i(627),PathFollower:i(628),Sprite3D:i(629),Sprite:i(630),StaticBitmapText:i(631),Text:i(632),TileSprite:i(633),Zone:i(634)},Creators:{Blitter:i(635),DynamicBitmapText:i(636),Graphics:i(637),Group:i(638),Image:i(639),Particles:i(640),Sprite3D:i(641),Sprite:i(642),StaticBitmapText:i(643),Text:i(644),TileSprite:i(645),Zone:i(646)}};n.Mesh=i(88),n.Quad=i(141),n.Factories.Mesh=i(650),n.Factories.Quad=i(651),n.Creators.Mesh=i(652),n.Creators.Quad=i(653),n.Light=i(290),i(291),i(654),t.exports=n},function(t,e,i){var n=i(0),s=i(86),r=i(11),o=i(264),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(11),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(547),s=i(548),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,b=0,w=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,_=a.cutX,E=a.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-l+e.frame.y),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var L=0;L0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode);for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,l=0;l0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,b=0,w=0,T=0,S=0,A=null,C=0,M=t.currentContext,_=e.frame.source.image,E=a.cutX,P=a.cutY,L=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.translate(-e.displayOriginX,-e.displayOriginY),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(566),s=i(271),s=i(271),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(568),s=i(569),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=i(0),s=i(273),r=i(71),o=i(1),a=i(50),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(274),s=i(275),r=i(276),o=i(277),a=i(278),h=i(279),l=i(280),u=i(281),c=i(282),d=i(283),f=i(284),p=i(285);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(41),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(611),s=i(612),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,b=y.canvasData,w=-m,T=-x;u.globalAlpha=v,u.save(),u.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),u.rotate(g.rotation),u.scale(g.scaleX,g.scaleY),u.drawImage(y.source.image,b.sx,b.sy,b.sWidth,b.sHeight,w,T,b.dWidth,b.dHeight),u.restore()}}u.globalAlpha=c}}}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(615),s=i(616),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(618),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(20);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(287);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(139);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(140);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(21),r=i(14),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(21),r=i(14),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(14),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(14),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(14),s=i(10),r=i(1),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(21),s=i(289),r=i(14),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(21),r=i(14),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(139);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(140);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(14),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(648),s=i(649),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e,i){var n=i(141);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(21),s=i(14),r=i(10),o=i(141);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(291),r=i(11),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(656),n.Circumference=i(181),n.CircumferencePoint=i(104),n.Clone=i(657),n.Contains=i(32),n.ContainsPoint=i(658),n.ContainsRect=i(659),n.CopyFrom=i(660),n.Equals=i(661),n.GetBounds=i(662),n.GetPoint=i(179),n.GetPoints=i(180),n.Offset=i(663),n.OffsetPoint=i(664),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(41);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(294);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(296);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(142),o=i(297);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(299);n.Angle=i(54),n.BresenhamPoints=i(189),n.CenterOn=i(676),n.Clone=i(677),n.CopyFrom=i(678),n.Equals=i(679),n.GetMidPoint=i(680),n.GetNormal=i(681),n.GetPoint=i(300),n.GetPoints=i(108),n.Height=i(682),n.Length=i(65),n.NormalAngle=i(301),n.NormalX=i(683),n.NormalY=i(684),n.Offset=i(685),n.PerpSlope=i(686),n.Random=i(110),n.ReflectAngle=i(687),n.Rotate=i(688),n.RotateAroundPoint=i(689),n.RotateAroundXY=i(143),n.SetToAngle=i(690),n.Slope=i(691),n.Width=i(692),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(299);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(301);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(143);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(143);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(694),n.Clone=i(695),n.CopyFrom=i(696),n.Equals=i(697),n.Floor=i(698),n.GetCentroid=i(699),n.GetMagnitude=i(302),n.GetMagnitudeSq=i(303),n.GetRectangleFromPoints=i(700),n.Interpolate=i(701),n.Invert=i(702),n.Negative=i(703),n.Project=i(704),n.ProjectUnit=i(705),n.SetMagnitude=i(706),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(306);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var l=[];for(i=0;i1&&(this.sortGameObjects(l),this.topOnly&&l.splice(1)),this._drag[t.id]=l,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var u=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),u[0]?(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&u[0]&&(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(242),Key:i(243),KeyCodes:i(128),KeyCombo:i(244),JustDown:i(759),JustUp:i(760),DownDuration:i(761),UpDuration:i(762)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(784),Distance:i(792),Easing:i(795),Fuzzy:i(796),Interpolation:i(802),Pow2:i(805),Snap:i(807),Average:i(811),Bernstein:i(320),Between:i(226),CatmullRom:i(122),CeilTo:i(812),Clamp:i(60),DegToRad:i(35),Difference:i(813),Factorial:i(321),FloatBetween:i(273),FloorTo:i(814),FromPercent:i(64),GetSpeed:i(815),IsEven:i(816),IsEvenStrict:i(817),Linear:i(225),MaxAdd:i(818),MinSub:i(819),Percent:i(820),RadToDeg:i(216),RandomXY:i(821),RandomXYZ:i(204),RandomXYZW:i(205),Rotate:i(322),RotateAround:i(183),RotateAroundDistance:i(112),RoundAwayFromZero:i(323),RoundTo:i(822),SinCosTableGenerator:i(823),SmootherStep:i(190),SmoothStep:i(191),TransformXY:i(248),Within:i(824),Wrap:i(50),Vector2:i(6),Vector3:i(51),Vector4:i(119),Matrix3:i(208),Matrix4:i(118),Quaternion:i(207),RotateVec3:i(206)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(785),BetweenY:i(786),BetweenPoints:i(787),BetweenPointsY:i(788),Reverse:i(789),RotateTo:i(790),ShortestBetween:i(791),Normalize:i(319),Wrap:i(160),WrapDegrees:i(161)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(319);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(808),Floor:i(809),To:i(810)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=l(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(u(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(841),s=i(843),r=i(337);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(844);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(332);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(333);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={Acceleration:i(953),BodyScale:i(954),BodyType:i(955),Bounce:i(956),CheckAgainst:i(957),Collides:i(958),Debug:i(959),Friction:i(960),Gravity:i(961),Offset:i(962),SetGameObject:i(963),Velocity:i(964)}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(38);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(852),r=i(364),o=i(95);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(94);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(149),r=(i(163),i(38));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={SceneManager:i(249),ScenePlugin:i(857),Settings:i(252),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(83),r=i(11),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(253),BaseSound:i(85),BaseSoundManager:i(84),WebAudioSound:i(259),WebAudioSoundManager:i(258),HTML5AudioSound:i(255),HTML5AudioSoundManager:i(254),NoAudioSound:i(257),NoAudioSoundManager:i(256)}},function(t,e,i){t.exports={List:i(86),Map:i(113),ProcessQueue:i(334),RTree:i(335),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(261),FilterMode:i(861),Frame:i(130),Texture:i(262),TextureManager:i(260),TextureSource:i(263)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(892),Formats:i(19),ImageCollection:i(349),ParseToTilemap:i(154),Tile:i(44),Tilemap:i(353),TilemapCreator:i(909),TilemapFactory:i(910),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(351),DynamicTilemapLayer:i(354),StaticTilemapLayer:i(355)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(43),s=i(34),r=i(152);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(1);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(952),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var b=Math.floor((e+v)/f);if((l>0||u===b||b<0||b>=p)&&(b=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,b,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var C=Math.floor((i+w)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+T;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),b=g/x,w=-p/x,T=y*b+m*w,S=b*T,A=w*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:b,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(932),r=i(933),o=i(934),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s}});t.exports=a},function(t,e,i){var n=i(0),s=i(847),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(847),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(847),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(929),s=i(0),r=i(339),o=i(930),a=i(13),h=i(1),l=i(72),u=i(61),c=i(966),d=i(19),f=i(340),p=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new u,this.gravity=h(e,"gravity",0),this.cellSize=h(e,"cellSize",64),this.collisionMap=new o,this.timeScale=h(e,"timeScale",1),this.maxStep=h(e,"maxStep",.05),this.enabled=!0,this.drawDebug=h(e,"debug",!1),this.debugGraphic;var i=h(e,"maxVelocity",100);if(this.defaults={debugShowBody:h(e,"debugShowBody",!0),debugShowVelocity:h(e,"debugShowVelocity",!0),bodyDebugColor:h(e,"debugBodyColor",16711935),velocityDebugColor:h(e,"debugVelocityColor",65280),maxVelocityX:h(e,"maxVelocityX",i),maxVelocityY:h(e,"maxVelocityY",i),minBounceVelocity:h(e,"minBounceVelocity",40),gravityFactor:h(e,"gravityFactor",1),bounciness:h(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=h(n,"x",0),r=h(n,"y",0),l=h(n,"width",t.sys.game.config.width),c=h(n,"height",t.sys.game.config.height),d=h(n,"thickness",64),f=h(n,"left",!0),p=h(n,"right",!0),g=h(n,"top",!0),v=h(n,"bottom",!0);this.setBounds(s,r,l,c,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var k=0;kA&&(A+=e.length),S=Number.MAX_VALUE,A3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);r(f(t,e-1),f(t,e),f(t,e+1))||function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lv.bounds.max.x||b.bounds.max.yv.bounds.max.y)){var w=e(i,b);if(!b.region||w.id!==b.region.id||r){x.broadphaseTests+=1,b.region&&!r||(b.region=w);var T=t(w,b.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=w.startCol&&d<=w.endCol&&f>=w.startRow&&f<=w.endRow,A=d>=b.region.startCol&&d<=b.region.endCol&&f>=b.region.startRow&&f<=b.region.endRow;!S&&A&&A&&p&&u(i,p,b),(b.region===w||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,b))}b.region=w,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}}()},function(t,e,i){var n={};t.exports=n;var s=i(364),r=i(38);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a1e3&&h.push(r);for(r=0;rf.friction*f.frictionStatic*R*i&&(D=k,B=o.clamp(f.friction*F*i,-D,D));var I=r.cross(A,y),Y=r.cross(C,y),z=b/(g.inverseMass+v.inverseMass+g.inverseInertia*I*I+v.inverseInertia*Y*Y);if(O*=z,B*=z,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+O,0),O=T.normalImpulse-X}if(L*L>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-D,D),B=T.tangentImpulse-N}s.x=y.x*O+m.x*B,s.y=y.y*O+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(855),r=i(341),o=i(944),a=i(943),h=i(984),l=i(942),u=i(162),c=i(149),d=i(163),f=i(38),p=i(59);!function(){n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);return n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(n,s,l){s=s||1e3/60,l=l||1;var f,p=n.world,g=n.timing,v=n.broadphase,y=[];g.timestamp+=s*g.timeScale;var m={timestamp:g.timestamp};u.trigger(n,"beforeUpdate",m);var x=c.allBodies(p),b=c.allConstraints(p);for(h.reset(n.metrics),n.enableSleeping&&r.update(x,g.timeScale),e(x,p.gravity),i(x,s,g.timeScale,l,p.bounds),d.preSolveAll(x),f=0;f0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),c.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),c.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&d.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&d.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setZ(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return d.add(this.localWorld,o),o},add:function(t){return d.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return r.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return r.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(936),Image:i(939),Matter:i(853),MatterPhysics:i(986),PolyDecomp:i(937),Sprite:i(940),TileBody:i(850),World:i(946)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(0),s=i(33),r=i(106),o=i(184),a=i(107),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(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.setTo(0,0,0,0)},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},getLineA:function(){return{x1:this.x,y1:this.y,x2:this.right,y2:this.y}},getLineB:function(){return{x1:this.right,y1:this.y,x2:this.right,y2:this.bottom}},getLineC:function(){return{x1:this.right,y1:this.bottom,x2:this.x,y2:this.bottom}},getLineD:function(){return{x1:this.x,y1:this.bottom,x2:this.x,y2:this.y}},left:{get:function(){return this.x},set:function(t){t>=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.y=t):this.height=this.bottom-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=h},function(t,e,i){var n=i(0),s=i(12),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.displayList,this.updateList},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList;var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){},destroy:function(){this.scene=null,this.displayList=null,this.updateList=null}});r.register=function(t,e){r.prototype.hasOwnProperty(t)||(r.prototype[t]=e)},s.register("GameObjectFactory",r,"add"),t.exports=r},function(t,e,i){var n=i(16),s=i(4);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){t.exports={Alpha:i(381),Animation:i(364),BlendMode:i(382),ComputedSize:i(383),Depth:i(384),Flip:i(385),GetBounds:i(386),MatrixStack:i(387),Origin:i(388),Pipeline:i(186),ScaleMode:i(389),ScrollFactor:i(390),Size:i(391),Texture:i(392),Tint:i(393),ToJSON:i(394),Transform:i(395),TransformMatrix:i(187),Visible:i(396)}},function(t,e,i){var n={},s=new(i(0))({initialize:function(t){this.game=t,t.events.once("boot",this.boot,this)},boot:function(){this.game.events.once("destroy",this.destroy,this)},installGlobal:function(t,e){for(var i=t.game,n=t.scene,s=t.settings.map,r=0;ro.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){var n=i(97),s=i(15);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return t instanceof HTMLElement},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n>>0},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;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.width/2},getCenterY:function(t){return this.getTop(t)+this.height/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight-(this.height-this.baseHeight),this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.tilemapLayer;return t?t.tileset:null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16}},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],y=s[12],m=s[13],x=s[14],b=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+y)*b,this.y=(e*o+i*u+n*p+m)*b,this.z=(e*a+i*c+n*g+x)*b,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,y=(l*f-u*c)*g;return v>=0&&y>=0&&v+y<1}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n=i(0),s=i(53),r=i(308),o=i(309),a=i(111),h=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=s,this.y3=r,this},getLineA:function(){return{x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2}},getLineB:function(){return{x1:this.x2,y1:this.y2,x2:this.x3,y2:this.y3}},getLineC:function(){return{x1:this.x3,y1:this.y3,x2:this.x1,y2:this.y1}},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=h},function(t,e,i){var n=i(0),s=i(17),r=i(18),o=i(7),a=i(2),h=new n({Extends:r,initialize:function(t,e,i,n){var o="string"==typeof t?t:a(t,"key",""),h={type:"json",extension:a(t,"extension","json"),responseType:"text",key:o,url:a(t,"file",e),path:i,xhrSettings:a(t,"xhr",n)};r.call(this,h),"object"==typeof h.url&&(this.data=h.url,this.state=s.FILE_POPULATED)},onProcess:function(t){this.state=s.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText),this.onComplete(),t(this)}});o.register("json",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&r.rotateAbout(o.position,i,t.position,o.position)}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,i,r,o){o=o||t.position;for(var a=0;a0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x};var e=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(0),s=i(32),r=i(181),o=i(182),a=i(105),h=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=h},function(t,e,i){var n=i(60);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(0),s=i(121),r=i(8),o=i(6),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cocoonJS:!1,cocoonJSApp:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)?i.macOS=!0:/Linux/.test(t)?i.linux=!0:/Android/.test(t)?i.android=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);if((i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&void 0!==e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),navigator.isCocoonJS){i.cocoonJS=!0;try{i.cocoonJSApp="undefined"!=typeof CocoonJS}catch(t){i.cocoonJSApp=!1}}return void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad"),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(e,i(496))},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(168),s=i(0),r=i(2),o=i(4),a=i(274),h=i(61),l=i(37),u=new s({initialize:function(t,e,i){void 0!==i||Array.isArray(e)||"object"!=typeof e||(i=e,e=null),this.scene=t,this.children=new h(e),this.isParent=!0,this.classType=r(i,"classType",l),this.active=r(i,"active",!0),this.maxSize=r(i,"maxSize",-1),this.defaultKey=r(i,"defaultKey",null),this.defaultFrame=r(i,"defaultFrame",null),this.runChildUpdate=r(i,"runChildUpdate",!1),this.createCallback=r(i,"createCallback",null),this.removeCallback=r(i,"removeCallback",null),this.createMultipleCallback=r(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s){if(void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),this.isFull())return null;var r=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,this.add(r),r},createMultiple:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i=0&&t=0&&e0){this.blockSet=!1;var i=this;if(this.events.emit("changedata",this.parent,t,e,function(e){i.blockSet=!0,i.list[t]=e,i.events.emit("setdata",i.parent,t,e)}),this.blockSet)return this}return this.list[t]=e,this.events.emit("setdata",this.parent,t,e),this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var n=i(0),s=i(1),r=i(37),o=i(6),a=i(119),h=new n({Extends:s,initialize:function(t,e,i,n,h,l){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,h,l),this.position=new a(e,i,n),this.size=new o(this.gameObject.width,this.gameObject.height),this.scale=new o(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var e=this.position,i=this.gameObject;t.project(e,i),t.getPointSize(e,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?i.setVisible(!1):(i.visible||i.setVisible(!0),this.adjustScaleX&&(i.scaleX=this.scale.x),this.adjustScaleY&&(i.scaleY=this.scale.y),i.setDepth(-1*i.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=h},function(t,e,i){var n,s=i(67),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(14),r=i(3),o=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,t.events.on("blur",function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on("focus",function(){this.pauseOnBlur&&this.onFocus()},this),t.events.once("destroy",this.destroy,this),this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.locked&&this.unlock()},add:r,addAudioSprite:function(t,e){var i=this.add(t,e);i.spritemap=this.game.cache.json.get(t).spritemap;for(var n in i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=i.spritemap[n];i.addMarker({name:n,start:s.start,duration:s.end-s.start,config:e})}return i},play:function(t,e){var i=this.add(t);return i.once("ended",i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once("ended",n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit("pauseall",this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit("resumeall",this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit("stopall",this)},unlock:r,onBlur:r,onFocus:r,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit("unlocked",this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n.pendingRemove||t.call(e||i,n,s,i.sounds)})},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("rate",this,t)}},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.setRate()}),this.emit("detune",this,t)}}});t.exports=o},function(t,e,i){var n=i(0),s=i(14),r=i(23),o=i(3),a=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={delay:0},this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.config=r(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker - Marker with name '"+t.name+"' already exists for sound '"+this.key+"'!"),!1):(t=r(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=r(!0,this.markers[t.name],t),!0):(console.error("updateMarker - Marker with name '"+t.name+"' does not exist for sound '"+this.key+"'!"),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return console.error("Sound marker name has to be a string!"),!1;if(t){if(!this.markers[t])return console.error("No marker with name '"+t+"' found for sound '"+this.key+"'!"),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,destroy:function(){this.pendingRemove||(this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)},setRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e}});Object.defineProperty(a.prototype,"rate",{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.setRate(),this.emit("rate",this,t)}}),Object.defineProperty(a.prototype,"detune",{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.setRate(),this.emit("detune",this,t)}}),t.exports=a},function(t,e,i){var n=new(i(0))({initialize:function(t){this.parent=t,this.list=[],this.position=0},add:function(t){return-1===this.getIndex(t)&&this.list.push(t),t},addAt:function(t,e){return void 0===e&&(e=0),0===this.list.length?this.add(t):(e>=0&&e<=this.list.length&&-1===this.getIndex(t)&&this.list.splice(e,0,t),t)},addMultiple:function(t){if(Array.isArray(t))for(var e=0;en?1:0},getByKey:function(t,e){for(var i=0;ithis.list.length)return null;var i=t+Math.floor(Math.random()*e);return this.list[i]},getFirst:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=this.list.length);for(var s=i;s=this.list.length)throw new Error("List.moveTo: The supplied index is out of bounds");return this.list.splice(i,1),this.list.splice(e,0,t),t},remove:function(t){var e=this.list.indexOf(t);return-1!==e&&this.list.splice(e,1),t},removeAt:function(t){var e=this.list[t];return e&&this.children.splice(t,1),e},removeBetween:function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.list.length);var i=e-t;if(i>0&&i<=e)return this.list.splice(t,i);if(0===i&&0===this.list.length)return[];throw new Error("List.removeBetween: Range Error, numeric values are outside the acceptable range")},removeAll:function(){for(var t=this.list.length;t--;)this.remove(this.list[t]);return this},bringToTop:function(t){return this.getIndex(t)0&&(this.remove(t),this.addAt(t,0)),t},moveUp:function(t){var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getAt(e-1);i&&this.swap(t,i)}return t},reverse:function(){return this.list.reverse(),this},shuffle:function(){for(var t=this.list.length-1;t>0;t--){var e=Math.floor(Math.random()*(t+1)),i=this.list[t];this.list[t]=this.list[e],this.list[e]=i}return this},replace:function(t,e){var i=this.getIndex(t);if(-1!==i)return this.remove(t),this.addAt(e,i),t},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e){for(var i=0;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=n},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(655),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.ScaleMode,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(t,e,i,n,s,o,a,h,l){if(r.call(this,t,"Mesh"),this.setTexture(h,l),this.setPosition(e,i),this.setSizeToFrame(),this.setOrigin(),this.initPipeline("TextureTintPipeline"),n.length!==s.length)throw new Error("Mesh Vertex count must match UV count");var u,c=n.length/2|0;if(o.length>0&&o.length0&&a.length=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(327),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(38),o=i(59),a=i(95),h=i(94),l=i(945);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(A)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(38);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var n=Math.cos(e),s=Math.sin(e);i||(i={});var r=t.x*n-t.y*s;return i.y=t.x*s+t.y*n,i.x=r,i},i.rotateAbout=function(t,e,i,n){var s=Math.cos(e),r=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*s-(t.y-i.y)*r);return n.y=i.y+((t.x-i.x)*r+(t.y-i.y)*s),n.x=o,n},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},function(t,e){var i={};t.exports=i,i.create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;nt.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e,i){t.exports={CalculateFacesAt:i(152),CalculateFacesWithin:i(34),Copy:i(871),CreateFromTiles:i(872),CullTiles:i(873),Fill:i(874),FilterTiles:i(875),FindByIndex:i(876),FindTile:i(877),ForEachTile:i(878),GetTileAt:i(97),GetTileAtWorldXY:i(879),GetTilesWithin:i(15),GetTilesWithinShape:i(880),GetTilesWithinWorldXY:i(881),HasTileAt:i(344),HasTileAtWorldXY:i(882),IsInLayerBounds:i(74),PutTileAt:i(153),PutTileAtWorldXY:i(883),PutTilesAt:i(884),Randomize:i(885),RemoveTileAt:i(345),RemoveTileAtWorldXY:i(886),RenderDebug:i(887),ReplaceByIndex:i(343),SetCollision:i(888),SetCollisionBetween:i(889),SetCollisionByExclusion:i(890),SetCollisionByProperty:i(891),SetCollisionFromCollisionGroup:i(892),SetTileIndexCallback:i(893),SetTileLocationCallback:i(894),Shuffle:i(895),SwapByIndex:i(896),TileToWorldX:i(98),TileToWorldXY:i(897),TileToWorldY:i(99),WeightedRandomize:i(898),WorldToTileX:i(39),WorldToTileXY:i(899),WorldToTileY:i(40)}},function(t,e,i){var n=i(74);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t];return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(78),s=i(5);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e-y||T>-m||w-y||A>-m||S-y||T>-m||w-y||A>-m||S-v&&A*n+C*r+h>-y&&(A+v)*i+(C+y)*s+a0?this:(this._fadeRed=e,this._fadeGreen=i,this._fadeBlue=n,t<=0&&(t=Number.MIN_VALUE),this._fadeDuration=t,this._fadeAlpha=Number.MIN_VALUE,this)},flash:function(t,e,i,n,s){return!s&&this._flashAlpha>0?this:(void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._flashRed=e,this._flashGreen=i,this._flashBlue=n,t<=0&&(t=Number.MIN_VALUE),this._flashDuration=t,this._flashAlpha=1,this)},getWorldPoint:function(t,e,i){void 0===i&&(i=new h);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],l=n[4],u=n[5],c=s*a-r*o;if(!c)return i.x=t,i.y=e,i;var d=a*(c=1/c),f=-r*c,p=-o*c,g=s*c,v=(o*u-a*l)*c,y=(r*l-s*u)*c,m=Math.cos(this.rotation),x=Math.sin(this.rotation),b=this.zoom,w=this.scrollX,T=this.scrollY,S=t+(w*m-T*x)*b,A=e+(w*x+T*m)*b;return i.x=S*d+A*p+v,i.y=S*f+A*g+y,i},ignore:function(t){if(t instanceof Array)for(var e=0;eu&&(this.scrollX=u),this.scrollYc&&(this.scrollY=c)}this.roundPixels&&(this.scrollX=Math.round(this.scrollX),this.scrollY=Math.round(this.scrollY)),r.loadIdentity(),r.scale(e,e),r.translate(this.x+o,this.y+a),r.rotate(this.rotation),r.scale(s,s),r.translate(-o,-a),r.translate(this._shakeOffsetX,this._shakeOffsetY)},removeBounds:function(){return this.useBounds=!1,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=a(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n){return this._bounds.setTo(t,e,i,n),this.useBounds=!0,this},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){return this.scene=t,this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),this.zoom=t,this},shake:function(t,e,i){return void 0===e&&(e=.05),i||0===this._shakeOffsetX&&0===this._shakeOffsetY?(this._shakeDuration=t,this._shakeIntensity=e,this._shakeOffsetX=0,this._shakeOffsetY=0,this):this},startFollow:function(t,e){return this._follow=t,void 0!==e&&(this.roundPixels=e),this},stopFollow:function(){return this._follow=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},resetFX:function(){return this._flashAlpha=0,this._fadeAlpha=0,this._shakeOffsetX=0,this._shakeOffsetY=0,this._shakeDuration=0,this},update:function(t,e){if(this._flashAlpha>0&&(this._flashAlpha-=e/this._flashDuration,this._flashAlpha<0&&(this._flashAlpha=0)),this._fadeAlpha>0&&this._fadeAlpha<1&&(this._fadeAlpha+=e/this._fadeDuration,this._fadeAlpha>=1&&(this._fadeAlpha=1)),this._shakeDuration>0){var i=this._shakeIntensity;this._shakeDuration-=e,this._shakeDuration<=0?(this._shakeOffsetX=0,this._shakeOffsetY=0):(this._shakeOffsetX=(Math.random()*i*this.width*2-i*this.width)*this.zoom,this._shakeOffsetY=(Math.random()*i*this.height*2-i*this.height)*this.zoom,this.roundPixels&&(this._shakeOffsetX|=0,this._shakeOffsetY|=0))}},destroy:function(){this._bounds=void 0,this.matrix=void 0,this.culledObjects=[],this.scene=void 0}});t.exports=l},function(t,e,i){var n=i(200),s=i(202),r=i(204),o=i(205);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(0),s=i(118),r=i(206),o=i(207),a=i(208),h=i(61),l=i(81),u=i(6),c=i(51),d=i(119),f=new c,p=new d,g=new c,v=new c,y=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new h},setPosition:function(t,e,i){return this.position.set(t,e,i),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),e=0;e0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){var n=i(0),s=i(42),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=t.game.config.resolution,this.width=t.game.config.width*this.resolution,this.height=t.game.config.height*this.resolution,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this}});t.exports=r},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,LINE_FX_TO:12,MOVE_FX_TO:13,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221}},function(t,e,i){var n=i(0),s=i(83),r=i(529),o=i(530),a=i(233),h=i(254),l=new n({initialize:function(t,e){this.scene=t,this.game,this.config=e,this.settings=h.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList},init:function(t){this.settings.status=s.INIT,this.game=t,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.installGlobal(this,a.Global),e.installLocal(this,a.CoreScene),e.installLocal(this,o(this)),e.installLocal(this,r(this)),this.events.emit("boot",this),this.settings.isBooted=!0},install:function(t){Array.isArray(t)||(t=[t]),this.plugins.installLocal(this,t)},step:function(t,e){this.events.emit("preupdate",t,e),this.events.emit("update",t,e),this.scene.update.call(this.scene,t,e),this.events.emit("postupdate",t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.cameras.render(t,e),this.events.emit("render",t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(){return this.settings.active&&(this.settings.status=s.PAUSED,this.settings.active=!1,this.events.emit("pause",this)),this},resume:function(){return this.settings.active||(this.settings.status=s.RUNNING,this.settings.active=!0,this.events.emit("resume",this)),this},sleep:function(){return this.settings.status=s.SLEEPING,this.settings.active=!1,this.settings.visible=!1,this.events.emit("sleep",this),this},wake:function(){return this.settings.status=s.RUNNING,this.settings.active=!0,this.settings.visible=!0,this.events.emit("wake",this),this},isSleeping:function(){return this.settings.status===s.SLEEPING},isActive:function(){return this.settings.status===s.RUNNING},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t){return t?this.resume():this.pause()},start:function(t){this.settings.status=s.START,this.settings.data=t,this.settings.active=!0,this.settings.visible=!0,this.events.emit("start",this)},shutdown:function(){this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit("shutdown",this)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit("destroy",this)}});t.exports=l},function(t,e,i){var n=i(0),s=i(23),r=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX=n,this.cutY=s,this.cutWidth=r,this.cutHeight=o,this.x=0,this.y=0,this.width=r,this.height=o,this.halfWidth=Math.floor(.5*r),this.halfHeight=Math.floor(.5*o),this.centerX=Math.floor(r/2),this.centerY=Math.floor(o/2),this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.data={cut:{x:n,y:s,w:r,h:o,r:n+r,b:s+o},trim:!1,sourceSize:{w:r,h:o},spriteSourceSize:{x:0,y:0,w:r,h:o},uvs:{x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},radius:.5*Math.sqrt(r*r+o*o),drawImage:{sx:n,sy:s,sWidth:r,sHeight:o,dWidth:r,dHeight:o}},this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.sWidth=i,s.sHeight=n,s.dWidth=i,s.dHeight=n;var r=this.source.width,o=this.source.height,a=this.data.uvs;return a.x0=t/r,a.y0=e/o,a.x1=t/r,a.y1=(e+n)/o,a.x2=(t+i)/r,a.y2=(e+n)/o,a.x3=(t+i)/r,a.y3=e/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height,i=this.data.uvs;return i.x3=(this.cutX+this.cutHeight)/t,i.y3=(this.cutY+this.cutWidth)/e,i.x2=this.cutX/t,i.y2=(this.cutY+this.cutWidth)/e,i.x1=this.cutX/t,i.y1=this.cutY/e,i.x0=(this.cutX+this.cutHeight)/t,i.y0=this.cutY/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},uvs:{get:function(){return this.data.uvs}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(267),a=i(546),h=i(547),l=i(548),u=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.ScaleMode,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,l],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"BitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds()},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});u.ParseRetroFont=h,u.ParseFromAtlas=a,t.exports=u},function(t,e,i){var n=i(551),s=i(554),r=i(0),o=i(11),a=i(130),h=i(1),l=i(86),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.ScaleMode,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,s){h.call(this,t,"Blitter"),this.setTexture(n,s),this.setPosition(e,i),this.initPipeline("TextureTintPipeline"),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new s(this,t,e,i,n);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var s=this.createMultiple(e,i,n),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0}});t.exports=u},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(267),a=i(555),h=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.Pipeline,s.Texture,s.Tint,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,o){void 0===s&&(s=""),r.call(this,t,"DynamicBitmapText"),this.font=n;var a=this.scene.sys.cache.bitmapFont.get(n);this.fontData=a.data,this.text=Array.isArray(s)?s.join("\n"):s,this.fontSize=o||this.fontData.size,this.setTexture(a.texture,a.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline("TextureTintPipeline"),this._bounds=this.getTextBounds(),this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setFontSize:function(t){return this.fontSize=t,this},setText:function(t){return Array.isArray(t)&&(t=t.join("\n")),this.text=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this},getTextBounds:function(t){return this._bounds=o(this,t),this._bounds},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize};return t.data=e,t}});t.exports=h},function(t,e,i){var n=i(114),s=i(0),r=i(127),o=i(11),a=i(269),h=i(1),l=i(4),u=i(16),c=i(567),d=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Pipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(t,e){var i=l(e,"x",0),n=l(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline("FlatTintPipeline"),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,u.PI2),this.closePath(),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.closePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this.closePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},lineFxTo:function(t,e,i,n){return this.commandBuffer.push(r.LINE_FX_TO,t,e,i,n,1),this},moveFxTo:function(t,e,i,n){return this.commandBuffer.push(r.MOVE_FX_TO,t,e,i,n,1),this},strokePoints:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys;if(void 0===e&&(e=r.game.config.width),void 0===i&&(i=r.game.config.height),d.TargetCamera.setViewport(0,0,e,i),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(n=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(r.game.renderer,this,0,d.TargetCamera,s),r.game.renderer.gl&&n&&(n.source[0].glTexture=r.game.renderer.canvasToTexture(s.canvas,n.source[0].glTexture,!0,0))),this}});d.TargetCamera=new n(0,0,0,0),t.exports=d},function(t,e,i){var n=i(0),s=i(68),r=i(270),o=i(271),a=i(109),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=h},function(t,e,i){var n=i(5);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(11),r=i(1),o=i(572),a=i(86),h=i(573),l=i(612),u=new n({Extends:r,Mixins:[s.Depth,s.Visible,s.Pipeline,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline("TextureTintPipeline"),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;sl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var y=u[c].length?c:c+1,m=u.slice(y).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=m+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=u,n+=a[h]+" ")}r0&&(a+=u.lineSpacing*p),i.rtl?o=d-o:"right"===i.align?o+=u.width-u.lineWidths[p]:"center"===i.align&&(o+=(u.width-u.lineWidths[p])/2),this.autoRound&&(o=Math.round(o),a=Math.round(a)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(l[p],o,a)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(l[p],o,a));return e.restore(),this.dirty=!0,this},getTextMetrics:function(){return this.style.getTextMetrics()},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this.text,style:this.style.toJSON(),resolution:this.resolution,padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),s.remove(this.canvas)}});t.exports=f},function(t,e,i){var n=i(21),s=i(0),r=i(11),o=i(1),a=i(290),h=i(625),l=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Origin,r.Pipeline,r.ScaleMode,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){var u=t.sys.game.renderer;o.call(this,t,"TileSprite"),this.tilePositionX=0,this.tilePositionY=0,this.dirty=!0,this.tileTexture=null,this.renderer=u,this.setTexture(h,l),this.setPosition(e,i),this.setSize(s,r),this.setOriginFromFrame(),this.initPipeline("TextureTintPipeline"),this.potWidth=a(this.frame.width),this.potHeight=a(this.frame.height),this.canvasPattern=null,this.canvasBuffer=n.create2D(null,this.potWidth,this.potHeight),this.canvasBufferCtx=this.canvasBuffer.getContext("2d"),this.updateTileTexture(),t.sys.game.renderer.onContextRestored(function(t){var e=t.gl;this.tileTexture=null,this.dirty=!0,this.tileTexture=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.canvasBuffer,this.potWidth,this.potHeight)},this)},updateTileTexture:function(){this.dirty&&(this.canvasBufferCtx.drawImage(this.frame.source.image,this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight,0,0,this.potWidth,this.potHeight),this.renderer.gl?this.tileTexture=this.renderer.canvasToTexture(this.canvasBuffer,this.tileTexture,null===this.tileTexture,this.scaleMode):this.canvasPattern=this.canvasBufferCtx.createPattern(this.canvasBuffer,"repeat"),this.dirty=!1)},destroy:function(){this.renderer&&this.renderer.deleteTexture(this.tileTexture),n.remove(this.canvasBuffer),this.canvasPattern=null,this.canvasBufferCtx=null,this.canvasBuffer=null,this.renderer=null,this.visible=!1}});t.exports=l},function(t,e,i){var n=i(10);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var s=t.anims,r=n(i,"key",void 0),o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0);s.delay(a),s.repeat(h),s.repeatDelay(l),s.yoyo(u),c?s.play(r,o):d>0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(0),s=i(88),r=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,0,0,1,1,1,0],[16777215,16777215,16777215,16777215,16777215,16777215],[1,1,1,1,1,1],n,r),this.resetPosition()},topLeftX:{get:function(){return this.x+this.vertices[0]},set:function(t){this.vertices[0]=t-this.x,this.vertices[6]=t-this.x}},topLeftY:{get:function(){return this.y+this.vertices[1]},set:function(t){this.vertices[1]=t-this.y,this.vertices[7]=t-this.y}},topRightX:{get:function(){return this.x+this.vertices[10]},set:function(t){this.vertices[10]=t-this.x}},topRightY:{get:function(){return this.y+this.vertices[11]},set:function(t){this.vertices[11]=t-this.y}},bottomLeftX:{get:function(){return this.x+this.vertices[2]},set:function(t){this.vertices[2]=t-this.x}},bottomLeftY:{get:function(){return this.y+this.vertices[3]},set:function(t){this.vertices[3]=t-this.y}},bottomRightX:{get:function(){return this.x+this.vertices[4]},set:function(t){this.vertices[4]=t-this.x,this.vertices[8]=t-this.x}},bottomRightY:{get:function(){return this.y+this.vertices[5]},set:function(t){this.vertices[5]=t-this.y,this.vertices[9]=t-this.y}},topLeftAlpha:{get:function(){return this.alphas[0]},set:function(t){this.alphas[0]=t,this.alphas[3]=t}},topRightAlpha:{get:function(){return this.alphas[5]},set:function(t){this.alphas[5]=t}},bottomLeftAlpha:{get:function(){return this.alphas[1]},set:function(t){this.alphas[1]=t}},bottomRightAlpha:{get:function(){return this.alphas[2]},set:function(t){this.alphas[2]=t,this.alphas[4]=t}},topLeftColor:{get:function(){return this.colors[0]},set:function(t){this.colors[0]=t,this.colors[3]=t}},topRightColor:{get:function(){return this.colors[5]},set:function(t){this.colors[5]=t}},bottomLeftColor:{get:function(){return this.colors[1]},set:function(t){this.colors[1]=t}},bottomRightColor:{get:function(){return this.colors[2]},set:function(t){this.colors[2]=t,this.colors[4]=t}},setTopLeft:function(t,e){return this.topLeftX=t,this.topLeftY=e,this},setTopRight:function(t,e){return this.topRightX=t,this.topRightY=e,this},setBottomLeft:function(t,e){return this.bottomLeftX=t,this.bottomLeftY=e,this},setBottomRight:function(t,e){return this.bottomRightX=t,this.bottomRightY=e,this},resetPosition:function(){var t=this.x,e=this.y,i=Math.floor(this.width/2),n=Math.floor(this.height/2);return this.setTopLeft(t-i,e-n),this.setTopRight(t+i,e-n),this.setBottomLeft(t-i,e+n),this.setBottomRight(t+i,e+n),this},resetAlpha:function(){var t=this.alphas;return t[0]=1,t[1]=1,t[2]=1,t[3]=1,t[4]=1,t[5]=1,this},resetColors:function(){var t=this.colors;return t[0]=16777215,t[1]=16777215,t[2]=16777215,t[3]=16777215,t[4]=16777215,t[5]=16777215,this},reset:function(){return this.resetPosition(),this.resetAlpha(),this.resetColors()}});t.exports=r},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,y=p*v-g*g,m=0===y?0:1/y,x=t.x1,b=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t,e,i){for(var n=!1,s=-1,r=t.points.length-1;++s0&&(n.totalDuration+=n.t2*n.repeat),n.totalDuration>t&&(t=n.totalDuration)}this.duration=t,this.loopCounter=-1===this.loop?999999999999:this.loop,this.loopCounter>0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){for(var t=this.data,e=this.totalTargets,i=0;i0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&(t.params[1]=this.targets,t.func.apply(t.scope,t.params)),this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.PENDING_REMOVE}},pause:function(){if(this.state!==o.PAUSED)return this.paused=!0,this._pausedState=this.state,this.state=o.PAUSED,this},play:function(t){if(this.state!==o.ACTIVE){this.state!==o.PENDING_REMOVE&&this.state!==o.REMOVED||(this.init(),this.parent.makeActive(this),t=!0);var e=this.callbacks.onStart;this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?(e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)),this.state=o.ACTIVE):(this.countdown=this.calculatedOffset,this.state=o.OFFSET_DELAY)):this.paused?(this.paused=!1,this.parent.makeActive(this)):(this.resetTweenData(t),this.state=o.ACTIVE,e&&(e.params[1]=this.targets,e.func.apply(e.scope,e.params)))}},resetTweenData:function(t){for(var e=this.data,i=0;i0?(n.elapsed=n.delay,n.state=o.DELAY):n.state=o.PENDING_RENDER}},resume:function(){return this.state===o.PAUSED&&(this.paused=!1,this.state=this._pausedState),this},seek:function(t){for(var e=this.data,i=0;i=s.totalDuration?(r=1,o=s.duration):n>s.delay&&n<=s.t1?(r=(n=Math.max(0,n-s.delay))/s.t1,o=s.duration*r):n>s.t1&&ns.repeatDelay&&(r=n/s.t1,o=s.duration*r)),s.progress=r,s.elapsed=o;var a=s.ease(s.progress);s.current=s.start+(s.end-s.start)*a,s.target[s.key]=s.current}},setCallback:function(t,e,i,n){return this.callbacks[t]={func:e,scope:n,params:i},this},stop:function(t){void 0!==t&&this.seek(t),this.state=o.PENDING_REMOVE},update:function(t,e){if(this.state===o.PAUSED)return!1;switch(this.useFrames&&(e=1*this.parent.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var i=!1,n=0;n0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var s=t.callbacks.onRepeat;return s&&(s.params[1]=e.target,s.func.apply(s.scope,s.params)),e.start=e.getStartValue(e.target,e.key,e.start),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},setStateFromStart:function(t,e,i){if(e.repeatCounter>0){e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY();var n=t.callbacks.onRepeat;return n&&(n.params[1]=e.target,n.func.apply(n.scope,n.params)),e.end=e.getEndValue(e.target,e.key,e.start),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,o.REPEAT_DELAY):o.PLAYING_FORWARD}return o.COMPLETE},updateTweenData:function(t,e,i){switch(e.state){case o.PLAYING_FORWARD:case o.PLAYING_BACKWARD:if(!e.target){e.state=o.COMPLETE;break}var n=e.elapsed,s=e.duration,r=0;(n+=i)>s&&(r=n-s,n=s);var a,h=e.state===o.PLAYING_FORWARD,l=n/s;a=h?e.ease(l):e.ease(1-l),e.current=e.start+(e.end-e.start)*a,e.target[e.key]=e.current,e.elapsed=n,e.progress=l;var u=t.callbacks.onUpdate;u&&(u.params[1]=e.target,u.func.apply(u.scope,u.params)),1===l&&(h?e.hold>0?(e.elapsed=e.hold-r,e.state=o.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,r):e.state=this.setStateFromStart(t,e,r));break;case o.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PENDING_RENDER);break;case o.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=o.PLAYING_FORWARD);break;case o.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case o.PENDING_RENDER:e.target?(e.start=e.getStartValue(e.target,e.key,e.target[e.key]),e.end=e.getEndValue(e.target,e.key,e.start),e.current=e.start,e.target[e.key]=e.start,e.state=o.PLAYING_FORWARD):e.state=o.COMPLETE}return e.state!==o.COMPLETE}});a.TYPES=["onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],r.register("tween",function(t){return this.scene.sys.tweens.add(t)}),s.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=a},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d){return{target:t,key:e,getEndValue:i,getStartValue:n,ease:s,duration:0,totalDuration:0,delay:0,yoyo:a,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:d,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:r,duration:o,hold:h,repeat:l,repeatDelay:u},state:0}}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(50);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n={};t.exports=n;var s=i(38);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e,i){t.exports={Angle:i(376),Call:i(377),GetFirst:i(378),GridAlign:i(379),IncAlpha:i(397),IncX:i(398),IncXY:i(399),IncY:i(400),PlaceOnCircle:i(401),PlaceOnEllipse:i(402),PlaceOnLine:i(403),PlaceOnRectangle:i(404),PlaceOnTriangle:i(405),PlayAnimation:i(406),RandomCircle:i(407),RandomEllipse:i(408),RandomLine:i(409),RandomRectangle:i(410),RandomTriangle:i(411),Rotate:i(412),RotateAround:i(413),RotateAroundDistance:i(414),ScaleX:i(415),ScaleXY:i(416),ScaleY:i(417),SetAlpha:i(418),SetBlendMode:i(419),SetDepth:i(420),SetHitArea:i(421),SetOrigin:i(422),SetRotation:i(423),SetScale:i(424),SetScaleX:i(425),SetScaleY:i(426),SetTint:i(427),SetVisible:i(428),SetX:i(429),SetXY:i(430),SetY:i(431),ShiftPosition:i(432),Shuffle:i(433),SmootherStep:i(434),SmoothStep:i(435),Spread:i(436),ToggleVisible:i(437)}},function(t,e,i){var n=i(170),s=[];s[n.BOTTOM_CENTER]=i(171),s[n.BOTTOM_LEFT]=i(172),s[n.BOTTOM_RIGHT]=i(173),s[n.CENTER]=i(174),s[n.LEFT_CENTER]=i(176),s[n.RIGHT_CENTER]=i(177),s[n.TOP_CENTER]=i(178),s[n.TOP_LEFT]=i(179),s[n.TOP_RIGHT]=i(180);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e){t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},function(t,e,i){var n=i(24),s=i(46),r=i(25),o=i(47);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(26),r=i(25),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(24),s=i(28),r=i(25),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(175),s=i(46),r=i(49);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(47),s=i(48);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(49),s=i(26),r=i(48),o=i(27);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(49),s=i(28),r=i(48),o=i(29);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(46),s=i(30),r=i(47),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(26),s=i(30),r=i(27),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(28),s=i(30),r=i(29),o=i(31);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(104),s=i(64),r=i(16),o=i(5);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(183),s=i(104),r=i(64),o=i(16);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;h=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),f0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t0){o.isLast=!0,o.nextFrame=l[0],l[0].prevFrame=o;var v=1/(l.length-1);for(a=0;a=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t._timeScale=1,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo,t._callbackArgs[1]=this,t._updateParams=t._callbackArgs.concat(this.onUpdateParams)),t.updateFrame(this.frames[e])},nextFrame:function(t){var e=t.currentFrame;e.isLast?this.yoyo?(t.forward=!1,t.updateFrame(e.prevFrame),this.getNextTick(t)):t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.nextFrame),this.getNextTick(t))},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.repeatCounter>0?this.repeatAnimation(t):this.completeAnimation(t):(t.updateFrame(e.prevFrame),this.getNextTick(t))},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){t._repeatDelay>0&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=1e3*t._repeatDelay):(t.repeatCounter--,t.forward=!0,t.updateFrame(t.currentFrame.nextFrame),this.getNextTick(t),t.pendingRepeat=!1,this.onRepeat&&this.onRepeat.apply(this.callbackScope,t._callbackArgs.concat(this.onRepeatParams)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t=this.frames.length,e=1/(t-1),i=0;i1&&(n.prevFrame=this.frames[i-1],n.nextFrame=this.frames[i+1])}return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){}});t.exports=o},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,this.onUpdate=null},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0,this.onUpdate=void 0}});t.exports=n},function(t,e,i){var n=i(194),s=i(0),r=i(113),o=i(14),a=i(4),h=i(197),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.paused=!1,this.name="AnimationManager",t.events.once("boot",this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once("destroy",this.destroy,this)},add:function(t,e){if(!this.anims.has(t))return e.key=t,this.anims.set(t,e),this.emit("add",t,e),this;console.warn("Animation with key",t,"already exists")},create:function(t){var e=t.key;if(e&&!this.anims.has(e)){var i=new n(this,e,t);return this.anims.set(e,i),this.emit("add",e,i),i}console.warn("Invalid Animation Key, or Key already in use: "+e)},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(0),s=i(113),r=i(14),o=new n({initialize:function(){this.entries=new s,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit("add",this,t,e),this},has:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit("remove",this,t,e.data)),this},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},function(t,e,i){var n=i(198),s=new(i(0))({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.text=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once("destroy",this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","text","obj","tilemap","xml"],e=0;e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(36);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(36);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e,i){var n=i(51),s=i(118),r=i(209),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e,i){var n=i(0),s=i(51),r=i(210),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(Math.abs(1-t*t-e*e-i*i)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],y=c[5],m=c[6],x=c[7],b=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+y*h,e[4]=g*n+v*o+y*l,e[5]=g*s+v*a+y*u,e[6]=m*i+x*r+b*h,e[7]=m*n+x*o+b*l,e[8]=m*s+x*a+b*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,y=this.val;return y[0]=1-(c+f),y[3]=l+v,y[6]=u-g,y[1]=l-v,y[4]=1-(h+f),y[7]=d+p,y[2]=u+g,y[5]=d-p,y[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],y=e[14],m=e[15],x=n*h-s*a,b=n*l-r*a,w=n*u-o*a,T=s*l-r*h,S=s*u-o*h,A=r*u-o*l,C=c*v-d*g,M=c*y-f*g,E=c*m-p*g,_=d*y-f*v,P=d*m-p*v,L=f*m-p*y,k=x*L-b*P+w*_+T*E-S*M+A*C;return k?(k=1/k,i[0]=(h*L-l*P+u*_)*k,i[1]=(l*E-a*L-u*M)*k,i[2]=(a*P-h*E+u*C)*k,i[3]=(r*P-s*L-o*_)*k,i[4]=(n*L-r*E+o*M)*k,i[5]=(s*E-n*P-o*C)*k,i[6]=(v*A-y*S+m*T)*k,i[7]=(y*w-g*A-m*b)*k,i[8]=(g*S-v*w+m*x)*k,this):null}});t.exports=n},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),n.call(this,t),this.viewportWidth=e,this.viewportHeight=i,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,e,i){void 0===e&&(e=this.viewportWidth),void 0===i&&(i=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*e/2,n*i/2,0),this.viewportWidth=e,this.viewportHeight=i,this.update()},update:function(){var t=this.viewportWidth,e=this.viewportHeight,i=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===e?this:(this.projection.ortho(s*-t/2,s*t/2,s*-e/2,s*e/2,i,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=o},function(t,e,i){var n=i(117),s=i(0),r=new(i(51)),o=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e=80),void 0===i&&(i=0),void 0===s&&(s=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=s,this.fieldOfView=e*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,e,i){var n=i(214),s=i(21),r=i(4);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}}).call(e,i(486)(t))},function(t,e,i){var n=i(116);t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l={r:i=Math.floor(i*=255),g:i,b:i,color:0},u=s%6;return 0===u?(l.g=h,l.b=o):1===u?(l.r=a,l.b=o):2===u?(l.r=o,l.b=h):3===u?(l.r=o,l.g=a):4===u?(l.r=h,l.g=o):5===u&&(l.g=o,l.b=a),l.color=n(l.r,l.g,l.b),l}},function(t,e,i){var n=i(227);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e,i){var n=i(67);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova&&!n.cocoonJS?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e){t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){var n=i(0),s=i(3),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var t=this;this.step=function e(i){t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.max(16+t.lastTime-i,0);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e){t.exports={Global:["anims","cache","registry","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["CameraManager3D","Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n,s,r,o=i(21),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,a,h,l,u,f,g,v=e&&e.length,y=v?e[0]*i:t.length,m=s(t,0,y,i,!0),x=[];if(!m)return x;if(v&&(m=function(t,e,i,n){var o,a,h,l,u,f=[];for(o=0,a=e.length;o80*i){n=h=t[0],a=l=t[1];for(var b=i;bh&&(h=u),f>l&&(l=f);g=Math.max(h-n,l-a)}return o(m,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=w(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(T(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(T(n),(n=e=n.prev)===n.next)return null;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),T(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(v(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(v(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.nextZ;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(p=t.prevZ;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.prevZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&m(s,n,n.next,r)&&x(s,r)&&x(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),T(n),T(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h,l,u=t;do{for(var c=u.next.next;c!==u.prev;){if(u.i!==c.i&&(l=c,(h=u).next.i!==l.i&&h.prev.i!==l.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&&m(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,l)&&x(h,l)&&x(l,h)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(h,l))){var d=b(u,c);return u=r(u,u.next),d=r(d,d.next),o(u,e,i,n,s,a),void o(d,e,i,n,s,a)}c=c.next}u=u.next}while(u!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&x(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=b(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)/s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||v(t,e,i)>0!=v(t,e,n)>0&&v(i,n,t)>0!=v(i,n,e)>0}function x(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function b(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function w(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function T(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){var n=i(0),s=i(514),r=i(238),o=new n({Extends:r,initialize:function(t,e,i){r.call(this,t,e,i,s.replace("%LIGHT_COUNT%",10..toString()))},onBind:function(){r.prototype.onBind.call(this);var t=this.renderer,e=this.program;return this.mvpUpdate(),t.setInt1(e,"uNormSampler",1),t.setFloat2(e,"uResolution",this.width,this.height),this},onRender:function(t,e){var i=t.lights;if(i.culledLights.length=0,i.lights.length<=0||!i.active)return this;var n,s=this.renderer,r=this.program,o=t.lights.cull(e),a=Math.min(o.length,10),h=e.matrix,l={x:0,y:0},u=s.height;for(n=0;n<10;++n)s.setFloat1(r,"uLights["+n+"].radius",0);if(a<=0)return this;for(s.setFloat4(r,"uCamera",e.x,e.y,e.rotation,e.zoom),s.setFloat3(r,"uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),n=0;n0?(n.textures[e-1]&&n.textures[e-1]!==t&&this.pushBatch(),i[i.length-1].textures[e-1]=t):(null!==n.texture&&n.texture!==t&&this.pushBatch(),i[i.length-1].texture=t),this},pushBatch:function(){var t={first:this.vertexCount,texture:null,textures:[]};this.batches.push(t)},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.renderer,r=this.vertexCount,o=this.topology,a=this.vertexSize,h=this.batches,l=0,u=null;if(0===h.length||0===r)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,r*a));for(var c=0;c0){for(e=0;e0){for(e=0;e0&&(s.setTexture2D(u.texture,0),n.drawArrays(o,u.first,l)),this.vertexCount=0,h.length=0,this.pushBatch(),this.flushLocked=!1,this},onBind:function(){return h.prototype.onBind.call(this),this.mvpUpdate(),0===this.batches.length&&this.pushBatch(),this},resize:function(t,e,i){return h.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},drawStaticTilemapLayer:function(t){if(t.vertexCount>0){var e=this.vertexBuffer,i=this.gl,n=this.renderer,s=t.tileset.image.get();n.currentPipeline&&n.currentPipeline.vertexCount>0&&n.flush(),this.vertexBuffer=t.vertexBuffer,n.setPipeline(this),n.setTexture2D(s.source.glTexture,0),i.drawArrays(this.topology,0,t.vertexCount),this.vertexBuffer=e}this.viewIdentity(),this.modelIdentity()},drawEmitterManager:function(t,e){this.renderer.setPipeline(this);var i=t.emitters.list,n=i.length,s=this.vertexViewF32,r=this.vertexViewU32,o=this.renderer,a=this.maxQuads,h=e.scrollX,l=e.scrollY,u=e.matrix.matrix,c=u[0],d=u[1],f=u[2],p=u[3],g=u[4],v=u[5],y=Math.sin,m=Math.cos,x=this.vertexComponentCount,b=this.vertexCapacity,w=t.defaultFrame.source.glTexture;this.setTexture2D(w,0);for(var T=0;T=b&&(this.flush(),this.setTexture2D(w,0));for(var L=0;L=b&&(this.flush(),this.setTexture2D(w,0))}}}this.setTexture2D(w,0)},drawBlitter:function(t,e){this.renderer.setPipeline(this);for(var i=a.getTintAppendFloatAlpha,n=this.vertexViewF32,s=this.vertexViewU32,r=(this.renderer,t.getRenderList()),o=r.length,h=e.matrix.matrix,l=h[0],u=h[1],c=h[2],d=h[3],f=h[4],p=h[5],g=e.scrollX*t.scrollFactorX,v=e.scrollY*t.scrollFactorY,y=Math.ceil(o/this.maxQuads),m=0,x=t.x-g,b=t.y-v,w=0;w=this.vertexCapacity&&this.flush()}m+=T,o-=T,this.vertexCount>=this.vertexCapacity&&this.flush()}},batchSprite:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n=a.getTintAppendFloatAlpha,s=this.vertexViewF32,r=this.vertexViewU32,o=(this.renderer,e.matrix.matrix),h=t.frame,l=h.texture.source[h.sourceIndex].glTexture,u=!!l.isRenderTexture,c=t.flipX,d=t.flipY^u,f=h.uvs,p=h.width*(c?-1:1),g=h.height*(d?-1:1),v=-t.displayOriginX+h.x+h.width*(c?1:0),y=-t.displayOriginY+h.y+h.height*(d?1:0),m=v+p,x=y+g,b=t.x-e.scrollX*t.scrollFactorX,w=t.y-e.scrollY*t.scrollFactorY,T=t.scaleX,S=t.scaleY,A=-t.rotation,C=t._alphaTL,M=t._alphaTR,E=t._alphaBL,_=t._alphaBR,P=t._tintTL,L=t._tintTR,k=t._tintBL,F=t._tintBR,O=Math.sin(A),R=Math.cos(A),B=R*T,D=-O*T,I=O*S,Y=R*S,z=b,X=w,N=o[0],V=o[1],W=o[2],G=o[3],U=B*N+D*W,j=B*V+D*G,H=I*N+Y*W,q=I*V+Y*G,K=z*N+X*W+o[4],J=z*V+X*G+o[5],Z=v*U+y*H+K,Q=v*j+y*q+J,$=v*U+x*H+K,tt=v*j+x*q+J,et=m*U+x*H+K,it=m*j+x*q+J,nt=m*U+y*H+K,st=m*j+y*q+J,rt=n(P,C),ot=n(L,M),at=n(k,E),ht=n(F,_);this.setTexture2D(l,0),s[(i=this.vertexCount*this.vertexComponentCount)+0]=Z,s[i+1]=Q,s[i+2]=f.x0,s[i+3]=f.y0,r[i+4]=rt,s[i+5]=$,s[i+6]=tt,s[i+7]=f.x1,s[i+8]=f.y1,r[i+9]=at,s[i+10]=et,s[i+11]=it,s[i+12]=f.x2,s[i+13]=f.y2,r[i+14]=ht,s[i+15]=Z,s[i+16]=Q,s[i+17]=f.x0,s[i+18]=f.y0,r[i+19]=rt,s[i+20]=et,s[i+21]=it,s[i+22]=f.x2,s[i+23]=f.y2,r[i+24]=ht,s[i+25]=nt,s[i+26]=st,s[i+27]=f.x3,s[i+28]=f.y3,r[i+29]=ot,this.vertexCount+=6},batchMesh:function(t,e){var i=t.vertices,n=i.length,s=n/2|0;this.renderer.setPipeline(this),this.vertexCount+s>this.vertexCapacity&&this.flush();var r=a.getTintAppendFloatAlpha,o=t.uv,h=t.colors,l=t.alphas,u=this.vertexViewF32,c=this.vertexViewU32,d=(this.renderer,e.matrix.matrix),f=t.frame,p=t.texture.source[f.sourceIndex].glTexture,g=t.x-e.scrollX*t.scrollFactorX,v=t.y-e.scrollY*t.scrollFactorY,y=t.scaleX,m=t.scaleY,x=-t.rotation,b=Math.sin(x),w=Math.cos(x),T=w*y,S=-b*y,A=b*m,C=w*m,M=g,E=v,_=d[0],P=d[1],L=d[2],k=d[3],F=T*_+S*L,O=T*P+S*k,R=A*_+C*L,B=A*P+C*k,D=M*_+E*L+d[4],I=M*P+E*k+d[5],Y=0;this.setTexture2D(p,0),Y=this.vertexCount*this.vertexComponentCount;for(var z=0,X=0;zthis.vertexCapacity&&this.flush();var i,n,s,r,o,h,l,u,c=t.text,d=c.length,f=a.getTintAppendFloatAlpha,p=this.vertexViewF32,g=this.vertexViewU32,v=(this.renderer,e.matrix.matrix),y=e.width+50,m=e.height+50,x=t.frame,b=t.texture.source[x.sourceIndex],w=e.scrollX*t.scrollFactorX,T=e.scrollY*t.scrollFactorY,S=t.fontData,A=S.lineHeight,C=t.fontSize/S.size,M=S.chars,E=t.alpha,_=f(t._tintTL,E),P=f(t._tintTR,E),L=f(t._tintBL,E),k=f(t._tintBR,E),F=t.x,O=t.y,R=x.cutX,B=x.cutY,D=b.width,I=b.height,Y=b.glTexture,z=0,X=0,N=0,V=0,W=null,G=0,U=0,j=0,H=0,q=0,K=0,J=0,Z=0,Q=0,$=0,tt=0,et=0,it=null,nt=0,st=F-w+x.x,rt=O-T+x.y,ot=-t.rotation,at=t.scaleX,ht=t.scaleY,lt=Math.sin(ot),ut=Math.cos(ot),ct=ut*at,dt=-lt*at,ft=lt*ht,pt=ut*ht,gt=st,vt=rt,yt=v[0],mt=v[1],xt=v[2],bt=v[3],wt=ct*yt+dt*xt,Tt=ct*mt+dt*bt,St=ft*yt+pt*xt,At=ft*mt+pt*bt,Ct=gt*yt+vt*xt+v[4],Mt=gt*mt+vt*bt+v[5],Et=0;this.setTexture2D(Y,0);for(var _t=0;_ty||n<-50||n>m)&&(s<-50||s>y||r<-50||r>m)&&(o<-50||o>y||h<-50||h>m)&&(l<-50||l>y||u<-50||u>m)||(this.vertexCount+6>this.vertexCapacity&&this.flush(),p[(Et=this.vertexCount*this.vertexComponentCount)+0]=i,p[Et+1]=n,p[Et+2]=Q,p[Et+3]=tt,g[Et+4]=_,p[Et+5]=s,p[Et+6]=r,p[Et+7]=Q,p[Et+8]=et,g[Et+9]=L,p[Et+10]=o,p[Et+11]=h,p[Et+12]=$,p[Et+13]=et,g[Et+14]=k,p[Et+15]=i,p[Et+16]=n,p[Et+17]=Q,p[Et+18]=tt,g[Et+19]=_,p[Et+20]=o,p[Et+21]=h,p[Et+22]=$,p[Et+23]=et,g[Et+24]=k,p[Et+25]=l,p[Et+26]=u,p[Et+27]=$,p[Et+28]=tt,g[Et+29]=P,this.vertexCount+=6))}}else z=0,N=0,X+=A,it=null},batchDynamicBitmapText:function(t,e){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var i,n,s,r,o,h,l,u,c,d,f,p,g,v,y=t.displayCallback,m=t.text,x=m.length,b=a.getTintAppendFloatAlpha,w=this.vertexViewF32,T=this.vertexViewU32,S=this.renderer,A=e.matrix.matrix,C=t.frame,M=t.texture.source[C.sourceIndex],E=e.scrollX*t.scrollFactorX,_=e.scrollY*t.scrollFactorY,P=t.scrollX,L=t.scrollY,k=t.fontData,F=k.lineHeight,O=t.fontSize/k.size,R=k.chars,B=t.alpha,D=b(t._tintTL,B),I=b(t._tintTR,B),Y=b(t._tintBL,B),z=b(t._tintBR,B),X=t.x,N=t.y,V=C.cutX,W=C.cutY,G=M.width,U=M.height,j=M.glTexture,H=0,q=0,K=0,J=0,Z=null,Q=0,$=0,tt=0,et=0,it=0,nt=0,st=0,rt=0,ot=0,at=0,ht=0,lt=0,ut=null,ct=0,dt=X+C.x,ft=N+C.y,pt=-t.rotation,gt=t.scaleX,vt=t.scaleY,yt=Math.sin(pt),mt=Math.cos(pt),xt=mt*gt,bt=-yt*gt,wt=yt*vt,Tt=mt*vt,St=dt,At=ft,Ct=A[0],Mt=A[1],Et=A[2],_t=A[3],Pt=xt*Ct+bt*Et,Lt=xt*Mt+bt*_t,kt=wt*Ct+Tt*Et,Ft=wt*Mt+Tt*_t,Ot=St*Ct+At*Et+A[4],Rt=St*Mt+At*_t+A[5],Bt=t.cropWidth>0||t.cropHeight>0,Dt=0;this.setTexture2D(j,0),Bt&&S.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY);for(var It=0;Itthis.vertexCapacity&&this.flush(),w[(Dt=this.vertexCount*this.vertexComponentCount)+0]=i,w[Dt+1]=n,w[Dt+2]=ot,w[Dt+3]=ht,T[Dt+4]=D,w[Dt+5]=s,w[Dt+6]=r,w[Dt+7]=ot,w[Dt+8]=lt,T[Dt+9]=Y,w[Dt+10]=o,w[Dt+11]=h,w[Dt+12]=at,w[Dt+13]=lt,T[Dt+14]=z,w[Dt+15]=i,w[Dt+16]=n,w[Dt+17]=ot,w[Dt+18]=ht,T[Dt+19]=D,w[Dt+20]=o,w[Dt+21]=h,w[Dt+22]=at,w[Dt+23]=lt,T[Dt+24]=z,w[Dt+25]=l,w[Dt+26]=u,w[Dt+27]=at,w[Dt+28]=ht,T[Dt+29]=I,this.vertexCount+=6}}}else H=0,K=0,q+=F,ut=null;Bt&&S.popScissor()},batchText:function(t,e){var i=a.getTintAppendFloatAlpha;this.batchTexture(t,t.canvasTexture,t.canvasTexture.width,t.canvasTexture.height,t.x,t.y,t.canvasTexture.width,t.canvasTexture.height,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,t.canvasTexture.width,t.canvasTexture.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),0,0,e)},batchDynamicTilemapLayer:function(t,e){for(var i=t.culledTiles,n=i.length,s=t.tileset.image.get().source.glTexture,r=t.tileset,o=t.scrollFactorX,h=t.scrollFactorY,l=t.alpha,u=t.x,c=t.y,d=t.scaleX,f=t.scaleY,p=a.getTintAppendFloatAlpha,g=0;gthis.vertexCapacity&&this.flush(),d^=e.isRenderTexture?1:0,u=-u;var _,P=this.vertexViewF32,L=this.vertexViewU32,k=(this.renderer,E.matrix.matrix),F=o*(c?1:0)-g,O=a*(d?1:0)-v,R=F+o*(c?-1:1),B=O+a*(d?-1:1),D=s-E.scrollX*f,I=r-E.scrollY*p,Y=Math.sin(u),z=Math.cos(u),X=z*h,N=-Y*h,V=Y*l,W=z*l,G=D,U=I,j=k[0],H=k[1],q=k[2],K=k[3],J=X*j+N*q,Z=X*H+N*K,Q=V*j+W*q,$=V*H+W*K,tt=G*j+U*q+k[4],et=G*H+U*K+k[5],it=F*J+O*Q+tt,nt=F*Z+O*$+et,st=F*J+B*Q+tt,rt=F*Z+B*$+et,ot=R*J+B*Q+tt,at=R*Z+B*$+et,ht=R*J+O*Q+tt,lt=R*Z+O*$+et,ut=y/i+C,ct=m/n+M,dt=(y+x)/i+C,ft=(m+b)/n+M;this.setTexture2D(e,0),P[(_=this.vertexCount*this.vertexComponentCount)+0]=it,P[_+1]=nt,P[_+2]=ut,P[_+3]=ct,L[_+4]=w,P[_+5]=st,P[_+6]=rt,P[_+7]=ut,P[_+8]=ft,L[_+9]=T,P[_+10]=ot,P[_+11]=at,P[_+12]=dt,P[_+13]=ft,L[_+14]=S,P[_+15]=it,P[_+16]=nt,P[_+17]=ut,P[_+18]=ct,L[_+19]=w,P[_+20]=ot,P[_+21]=at,P[_+22]=dt,P[_+23]=ft,L[_+24]=S,P[_+25]=ht,P[_+26]=lt,P[_+27]=dt,P[_+28]=ct,L[_+29]=A,this.vertexCount+=6},drawTexture:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();var h,l=this.vertexViewF32,u=this.vertexViewU32,c=(this.renderer,e),d=i,f=c+r,p=d+o,g=a[0],v=a[1],y=a[2],m=a[3],x=a[4],b=a[5],w=c*g+d*y+x,T=c*v+d*m+b,S=c*g+p*y+x,A=c*v+p*m+b,C=f*g+p*y+x,M=f*v+p*m+b,E=f*g+d*y+x,_=f*v+d*m+b,P=t.width,L=t.height,k=n/P,F=s/L,O=(n+r)/P,R=(s+o)/L,B=4294967295;this.setTexture2D(t,0),l[(h=this.vertexCount*this.vertexComponentCount)+0]=w,l[h+1]=T,l[h+2]=k,l[h+3]=F,u[h+4]=B,l[h+5]=S,l[h+6]=A,l[h+7]=k,l[h+8]=R,u[h+9]=B,l[h+10]=C,l[h+11]=M,l[h+12]=O,l[h+13]=R,u[h+14]=B,l[h+15]=w,l[h+16]=T,l[h+17]=k,l[h+18]=F,u[h+19]=B,l[h+20]=C,l[h+21]=M,l[h+22]=O,l[h+23]=R,u[h+24]=B,l[h+25]=E,l[h+26]=_,l[h+27]=O,l[h+28]=F,u[h+29]=B,this.vertexCount+=6,this.flush()},batchGraphics:function(){}});t.exports=l},function(t,e,i){var n=i(0),s=i(14),r=i(240),o=i(244),a=i(247),h=i(248),l=i(8),u=i(249),c=i(250),d=new n({initialize:function(t,e){this.game=t,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.queue=[],this.keyboard=new o(this),this.mouse=new a(this),this.touch=new u(this),this.gamepad=new r(this),this.activePointer=new h(this,0),this.scale={x:1,y:1},this.globalTopOnly=!0,this.ignoreEvents=!1,this.bounds=new l,this._tempPoint={x:0,y:0},this._tempHitTest=[],t.events.once("boot",this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.updateBounds(),this.keyboard.boot(),this.mouse.boot(),this.touch.boot(),this.gamepad.boot(),this.game.events.once("destroy",this.destroy,this)},updateBounds:function(){var t=this.canvas.getBoundingClientRect(),e=this.bounds;e.left=t.left+window.pageXOffset,e.top=t.top+window.pageYOffset,e.width=t.width,e.height=t.height},update:function(t){this.keyboard.update(),this.gamepad.update(),this.ignoreEvents=!1;var e=this.queue.length,i=this.activePointer;if(i.reset(),this.enabled&&0!==e){this.updateBounds(),this.scale.x=this.game.config.width/this.bounds.width,this.scale.y=this.game.config.height/this.bounds.height;for(var n=this.queue.splice(0,e),s=0;s=n.x&&e>=n.y&&t<=n.x+o&&e<=n.y+a))return s;n.getWorldPoint(t,e,r);for(var h=n.cull(i),l={x:0,y:0},u=0;u0?1:-1)}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=0,this.pressed=!1},update:function(t){this.value=t.value,this.value>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit("down",this.pad,this,this.value,t)):this.pressed&&(this.pressed=!1,this.events.emit("up",this.pad,this,this.value,t))}});t.exports=n},function(t,e,i){var n=i(0),s=i(14),r=i(245),o=i(128),a=i(246),h=i(526),l=i(527),u=i(528),c=new n({Extends:s,initialize:function(t){s.call(this),this.manager=t,this.enabled=!1,this.target,this.keys=[],this.combos=[],this.captures=[],this.queue=[],this.handler},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.enabled&&this.startListeners()},startListeners:function(){var t=this.queue,e=this.captures,i=function(i){i.defaultPrevented||(t.push(i),e[i.keyCode]&&i.preventDefault())};this.handler=i,this.target.addEventListener("keydown",i,!1),this.target.addEventListener("keyup",i,!1)},stopListeners:function(){this.target.removeEventListener("keydown",this.handler),this.target.removeEventListener("keyup",this.handler)},createCursorKeys:function(){return this.addKeys({up:o.UP,down:o.DOWN,left:o.LEFT,right:o.RIGHT,space:o.SPACE,shift:o.SHIFT})},addKeys:function(t){var e={};for(var i in t)e[i]=this.addKey(t[i]);return e},addKey:function(t){var e=this.keys;return e[t]||(e[t]=new r(t),this.captures[t]=!0),e[t]},removeKey:function(t){this.keys[t]&&(this.keys[t]=void 0,this.captures[t]=!1)},addKeyCapture:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=0;i--){var n=this.scenes[i].sys;n.settings.status===s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this._processing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this._processing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=0;t--){this.scenes[t].sys.destroy()}this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(129),r=new n({initialize:function(t){this.sys=new s(this,t)},update:function(){}});t.exports=r},function(t,e){t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},function(t,e,i){var n=i(83),s=i(4),r=i(531),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:s(t,"key",""),active:s(t,"active",!1),visible:s(t,"visible",!0),isBooted:!1,data:{},files:s(t,"files",!1),cameras:s(t,"cameras",null),map:s(t,"map",r),physics:s(t,"physics",{}),loader:s(t,"loader",{}),plugins:s(t,"plugins",!1)}}};t.exports=o},function(t,e,i){var n=i(256),s=i(258),r=i(260),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e&&e.noAudio||!i.webAudio&&!i.audioData?new s(t):!i.webAudio||e&&e.disableWebAudio?new n(t):new r(t)}};t.exports=o},function(t,e,i){var n=i(0),s=i(84),r=i(257),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var s=[];t.game.cache.audio.entries.each(function(t,e){for(var i=0;i0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit("pause",this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit("resume",this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit("stop",this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit("ended",this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},setMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},setVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},setRate:function(){s.prototype.setRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)}});Object.defineProperty(r.prototype,"mute",{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.setMute(),this.emit("mute",this,t))}}),Object.defineProperty(r.prototype,"volume",{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.setVolume(),this.emit("volume",this,t))}}),Object.defineProperty(r.prototype,"rate",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"rate").get.call(this)},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,"rate",t)||Object.getOwnPropertyDescriptor(s.prototype,"rate").set.call(this,t)}}),Object.defineProperty(r.prototype,"detune",{get:function(){return Object.getOwnPropertyDescriptor(s.prototype,"detune").get.call(this)},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,"detune",t)||Object.getOwnPropertyDescriptor(s.prototype,"detune").set.call(this,t)}}),Object.defineProperty(r.prototype,"seek",{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit("seek",this,t))}}),Object.defineProperty(r.prototype,"loop",{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit("loop",this,t))}}),t.exports=r},function(t,e,i){var n=i(84),s=i(0),r=i(14),o=i(259),a=i(3),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,destroy:function(){n.prototype.destroy.call(this)},forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)}});t.exports=h},function(t,e,i){var n=i(85),s=i(0),r=i(14),o=i(23),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(0),s=i(84),r=i(261),o=new n({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&"ontouchstart"in window,s.call(this,t)},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},add:function(t,e){var i=new r(this,t,e);return this.sounds.push(i),i},unlock:function(){var t=this,e=function(){t.context.resume().then(function(){document.body.removeEventListener("touchstart",e),document.body.removeEventListener("touchend",e),t.unlocked=!0})};document.body.addEventListener("touchstart",e,!1),document.body.addEventListener("touchend",e,!1)},onBlur:function(){this.context.suspend()},onFocus:function(){this.context.resume()},destroy:function(){this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio&&this.game.config.audio.context?this.context.suspend():this.context.close(),this.context=null,s.prototype.destroy.call(this)}});Object.defineProperty(o.prototype,"mute",{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit("mute",this,t)}}),Object.defineProperty(o.prototype,"volume",{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit("volume",this,t)}}),t.exports=o},function(t,e,i){var n=i(0),s=i(85),r=new n({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)):console.error("No audio loaded in cache with key: '"+e+"'!")},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit("play",this),!0)},pause:function(){return!(this.manager.context.currentTime=0&&t<=o.width&&e>=0&&e<=o.height){t+=s.cutX,e+=s.cutY;var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(o,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new r(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},each:function(t,e){for(var i=[null],n=1;nl&&(r=l),o>l&&(o=l),a=s,h=r;;)if(ay&&(s=y),r>m&&(r=m);var S=y+g-s,A=m+v-r;o0&&e.cameraFilter&r._id)){var h=r.scrollX*e.scrollFactorX,l=r.scrollY*e.scrollFactorY,u=e.x,c=e.y,d=e.scaleX,f=e.scaleY,p=e.rotation,g=e.commandBuffer,v=o||t.currentContext,y=1,m=1,x=0,b=0,w=1,T=0,S=0,A=0;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,v.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,v.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),v.save(),v.translate(u-h,c-l),v.rotate(p),v.scale(d,f),v.fillStyle="#fff",v.globalAlpha=e.alpha;for(var C=0,M=g.length;C>>16,S=(65280&x)>>>8,A=255&x,v.strokeStyle="rgba("+T+","+S+","+A+","+y+")",v.lineWidth=w,C+=3;break;case n.FILL_STYLE:b=g[C+1],m=g[C+2],T=(16711680&b)>>>16,S=(65280&b)>>>8,A=255&b,v.fillStyle="rgba("+T+","+S+","+A+","+m+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:a||v.fill();break;case n.STROKE_PATH:a||v.stroke();break;case n.FILL_RECT:a?v.rect(g[C+1],g[C+2],g[C+3],g[C+4]):v.fillRect(g[C+1],g[C+2],g[C+3],g[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(g[C+1],g[C+2]),v.lineTo(g[C+3],g[C+4]),v.lineTo(g[C+5],g[C+6]),v.closePath(),a||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(g[C+1],g[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(g[C+1],g[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(g[C+1],g[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(g[C+1],g[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(g[C+1],g[C+2]),C+=2;break;case n.SCALE:v.scale(g[C+1],g[C+2]),C+=2;break;case n.ROTATE:v.rotate(g[C+1]),C+=1}v.restore()}}},function(t,e,i){var n=i(4),s=i(80),r=function(t,e,i){for(var n=[],s=0;s0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],r):h=new s(t,e,i,a[0],a[1],a[2],r),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=a},function(t,e,i){t.exports={Circle:i(663),Ellipse:i(269),Intersects:i(294),Line:i(683),Point:i(701),Polygon:i(715),Rectangle:i(306),Triangle:i(744)}},function(t,e,i){t.exports={CircleToCircle:i(673),CircleToRectangle:i(674),GetRectangleIntersection:i(675),LineToCircle:i(296),LineToLine:i(89),LineToRectangle:i(676),PointToLine:i(297),PointToLineSegment:i(677),RectangleToRectangle:i(295),RectangleToTriangle:i(678),RectangleToValues:i(679),TriangleToCircle:i(680),TriangleToLine:i(681),TriangleToTriangle:i(682)}},function(t,e){t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},function(t,e,i){var n=i(32),s=new(i(5));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e){t.exports=function(t,e){return(t.x-e.x1)*(e.y2-e.y1)==(e.x2-e.x1)*(t.y-e.y1)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e,i){var n=i(0),s=i(301),r=i(108),o=i(110),a=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(){return{x:this.x1,y:this.y1}},getPointB:function(){return{x:this.x2,y:this.y2}},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=a},function(t,e,i){var n=i(5);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var n=i(16),s=i(50),r=i(54);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(0),s=i(146),r=new n({initialize:function(t){this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;n=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(65),s=i(5);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},function(t,e,i){var n=i(5);function s(t,e,i,n){var s=t-i,r=e-n,o=s*s+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=s(h,l,o,a),c=s(i,r,h,l),d=s(o,a,i,r),f=u+c+d;return e.x=(i*u+o*c+h*d)/f,e.y=(r*u+a*c+l*d)/f,e}},function(t,e){t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragX:0,dragY:0}}},function(t,e,i){var n=i(150);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;return s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),s.onload=t.onLoad.bind(t),s.onerror=t.onError.bind(t),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){var n=i(0),s=i(22),r=i(18),o=i(7),a=i(2),h=i(316),l=new n({Extends:r,initialize:function(t,e,i,n,s){this.context=s;var o={type:"audio",extension:a(e,"type",""),responseType:"arraybuffer",key:t,url:a(e,"uri",e),path:i,xhrSettings:n};r.call(this,o)},onProcess:function(t){this.state=s.FILE_PROCESSING;var e=this;this.context.decodeAudioData(this.xhrLoader.response,function(i){e.data=i,e.onComplete(),t(e)},function(i){console.error("Error with decoding audio data for '"+this.key+"':",i.message),e.state=s.FILE_ERRORED,t(e)}),this.context=null}});l.create=function(t,e,i,n,s){var r=t.systems.game,o=r.config.audio,a=r.device.audio;if(o&&o.noAudio||!a.webAudio&&!a.audioData)return null;var u=l.findAudioURL(r,i);return u?!a.webAudio||o&&o.disableWebAudio?new h(e,u,t.path,n,r.sound.locked):new l(e,u,t.path,s,r.sound.context):null},o.register("audio",function(t,e,i,n){var s=l.create(this,t,e,i,n);return s&&this.addFile(s),this}),l.findAudioURL=function(t,e){e.constructor!==Array&&(e=[e]);for(var i=0;i=0?t:t+2*Math.PI}},function(t,e,i){var n=i(322);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(326),s=i(91),r=i(0),o=i(58),a=i(328),h=i(329),l=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,s){return this.world.addCollider(t,e,i,n,s)},overlap:function(t,e,i,n,s){return this.world.addOverlap(t,e,i,n,s)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new a(this.world,this.world.scene,t,e))}});t.exports=l},function(t,e,i){var n=i(0),s=i(327),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s)}});t.exports=o},function(t,e,i){t.exports={Acceleration:i(835),Angular:i(836),Bounce:i(837),Debug:i(838),Drag:i(839),Enable:i(840),Friction:i(841),Gravity:i(842),Immovable:i(843),Mass:i(844),Size:i(845),Velocity:i(846)}},function(t,e,i){var n=i(91),s=i(0),r=i(58),o=i(2),a=i(69),h=new s({Extends:a,initialize:function(t,e,i,s){void 0!==s||Array.isArray(i)||"object"!=typeof i?void 0===s&&(s={}):(s=i,i=null),this.world=t,s.createCallback=this.createCallback,s.removeCallback=this.removeCallback,s.classType=o(s,"classType",n),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(s,"collideWorldBounds",!1),setAccelerationX:o(s,"accelerationX",0),setAccelerationY:o(s,"accelerationY",0),setBounceX:o(s,"bounceX",0),setBounceY:o(s,"bounceY",0),setDragX:o(s,"dragX",0),setDragY:o(s,"dragY",0),setGravityX:o(s,"gravityX",0),setGravityY:o(s,"gravityY",0),setFrictionX:o(s,"frictionX",0),setFrictionY:o(s,"frictionY",0),setVelocityX:o(s,"velocityX",0),setVelocityY:o(s,"velocityY",0),setAngularVelocity:o(s,"angularVelocity",0),setAngularAcceleration:o(s,"angularAcceleration",0),setAngularDrag:o(s,"angularDrag",0),setMass:o(s,"mass",1),setImmovable:o(s,"immovable",!1)},a.call(this,e,i,s)},createCallback:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallback:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),s=0;s0){var l=this.tree,u=this.staticTree;for(o=(r=s.entries).length,t=0;t0?i-=s:i+s<0?i+=s:i=0),i>r?i=r:i<-r&&(i=-r),i},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,u=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)l.right&&(a=h(d.x,d.y,l.right,l.y)-d.radius):d.y>l.bottom&&(d.xl.right&&(a=h(d.x,d.y,l.right,l.bottom)-d.radius)),a*=-1}else a=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===a||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==a&&(t.onOverlap||e.onOverlap)&&this.emit("overlap",t.gameObject,e.gameObject,t,e),0!==a;var f=t.velocity.x,p=t.velocity.y,g=t.mass,v=e.velocity.x,y=e.velocity.y,m=e.mass,x=f*Math.cos(o)+p*Math.sin(o),b=f*Math.sin(o)-p*Math.cos(o),w=v*Math.cos(o)+y*Math.sin(o),T=v*Math.sin(o)-y*Math.cos(o),S=((g-m)*x+2*m*w)/(g+m),A=(2*g*x+(m-g)*w)/(g+m);return t.immovable||(t.velocity.x=(S*Math.cos(o)-b*Math.sin(o))*t.bounce.x,t.velocity.y=(b*Math.cos(o)+S*Math.sin(o))*t.bounce.y,f=t.velocity.x,p=t.velocity.y),e.immovable||(e.velocity.x=(A*Math.cos(o)-T*Math.sin(o))*e.bounce.x,e.velocity.y=(T*Math.cos(o)+A*Math.sin(o))*e.bounce.y,v=e.velocity.x,y=e.velocity.y),Math.abs(o)0&&!t.immovable&&v>f?t.velocity.x*=-1:v<0&&!e.immovable&&f0&&!t.immovable&&y>p?t.velocity.y*=-1:y<0&&!e.immovable&&pMath.PI/2&&(f<0&&!t.immovable&&v0&&!e.immovable&&f>v?e.velocity.x*=-1:p<0&&!t.immovable&&y0&&!e.immovable&&f>y&&(e.velocity.y*=-1)),t.immovable||(t.x+=t.velocity.x*this.delta-a*Math.cos(o),t.y+=t.velocity.y*this.delta-a*Math.sin(o)),e.immovable||(e.x+=e.velocity.x*this.delta+a*Math.cos(o),e.y+=e.velocity.y*this.delta+a*Math.sin(o)),(t.onCollide||e.onCollide)&&this.emit("collide",t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):e.isCircle?this.circleBodyIntersects(e,t):!(t.right<=e.position.x)&&(!(t.bottom<=e.position.y)&&(!(t.position.x>=e.right)&&!(t.position.y>=e.bottom))))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsSelf(t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o=t.body;if(0!==e.length&&o){var h=this.treeMinMax;h.minX=o.left,h.minY=o.top,h.maxX=o.right,h.maxY=o.bottom;var l=e.physicsType===a.DYNAMIC_BODY?this.tree.search(h):this.staticTree.search(h);if(0!==l.length)for(var u=e.getChildren(),c=0;cc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f,g=e.getTilesWithinWorldXY(a,h,l,u);if(0===g.length)return!1;for(var v={left:0,right:0,top:0,bottom:0},m=0;m0&&(this.facing=r.FACING_RIGHT),this.deltaY()<0?this.facing=r.FACING_UP:this.deltaY()>0&&(this.facing=r.FACING_DOWN),this.moves&&(this._dx=this.deltaX(),this._dy=this.deltaY(),0!==this.deltaMax.x&&0!==this._dx&&(this._dx<0&&this._dx<-this.deltaMax.x?this._dx=-this.deltaMax.x:this._dx>0&&this._dx>this.deltaMax.x&&(this._dx=this.deltaMax.x)),0!==this.deltaMax.y&&0!==this._dy&&(this._dy<0&&this._dy<-this.deltaMax.y?this._dy=-this.deltaMax.y:this._dy>0&&this._dy>this.deltaMax.y&&(this._dy=this.deltaMax.y)),this.gameObject.x+=this._dx,this.gameObject.y+=this._dy,this._reset=!0),this.updateCenter(),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this.prev.x=this.position.x,this.prev.y=this.position.y)},checkWorldBounds:function(){var t=this.position,e=this.world.bounds,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,this.blocked.none=!1),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,this.blocked.none=!1),!this.blocked.none},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setSize:function(t,e,i){if(void 0===i&&(i=!0),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&&this.gameObject.getCenter){var n=this.gameObject,s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft(this.position),this.prev.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this.deltaX()>0?this.deltaX():-this.deltaX()},deltaAbsY:function(){return this.deltaY()>0?this.deltaY():-this.deltaY()},deltaX:function(){return this.position.x-this.prev.x},deltaY:function(){return this.position.y-this.prev.y},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.radius):t.strokeRect(e.x,e.y,this.width,this.height)),this.debugShowVelocity&&(t.lineStyle(1,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t){return this.collideWorldBounds=t,this},setVelocity:function(t,e){return this.velocity.set(t,e),this},setVelocityX:function(t){return this.velocity.x=t,this},setVelocityY:function(t){return this.velocity.y=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return this.immovable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=l},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t.deltaX()&&0===e.deltaX()?(t.embedded=!0,e.embedded=!0):t.deltaX()>e.deltaX()?(s=t.right-e.x)>r&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0):t.deltaX()r&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0)),t.overlapX=s,e.overlapX=s,s}},function(t,e){t.exports=function(t,e,i,n){var s=0,r=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t.deltaY()&&0===e.deltaY()?(t.embedded=!0,e.embedded=!0):t.deltaY()>e.deltaY()?(s=t.bottom-e.y)>r&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0):t.deltaY()r&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0)),t.overlapY=s,e.overlapY=s,s}},function(t,e,i){var n=new(i(0))({initialize:function(){this._pending=[],this._active=[],this._destroy=[],this._toProcess=0},add:function(t){return this._pending.push(t),this._toProcess++,this},remove:function(t){return this._destroy.push(t),this._toProcess++,this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,y,m;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),y=Math.min(f.maxX,p.maxX),m=Math.min(f.maxY,p.maxY),o=Math.max(0,y-g)*Math.max(0,m-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},t.exports=s},function(t,e){var i=function(t,e,r,o,a){for(r=r||0,o=o||t.length-1,a=a||s;o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));i(t,e,f,p,a)}var g=t[e],v=r,y=o;for(n(t,r,e),a(t[o],g)>0&&n(t,r,o);v0;)y--}0===a(t[r],g)?n(t,r,y):n(t,++y,o),y<=e&&(r=y+1),e<=y&&(o=y-1)}};function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function s(t,e){return te?1:0}t.exports=i},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(32),s=i(0),r=i(58),o=i(33),a=i(6),h=new s({initialize:function(t,e){this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=e.displayWidth,this.height=e.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setSize:function(t,e,i,n){return void 0===i&&(i=this.offset.x),void 0===n&&(n=this.offset.y),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),this.offset.set(i,n),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position;this.debugShowBody&&(t.lineStyle(1,this.debugBodyColor,1),t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(164);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=i(15);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(44),s=i(74),r=i(152);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return null===h?null:(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h)}},function(t,e,i){var n=i(20),s=i(155),r=i(347),o=i(348),a=i(353);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(20),s=i(155);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(20),s=i(76),r=i(901),o=i(903),a=i(904),h=i(906),l=i(907),u=i(908);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e){t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),n=Boolean(536870912&t);t&=536870911;var s=0,r=!1;return e&&i&&n?(s=Math.PI/2,r=!0):e&&i&&!n?(s=Math.PI,r=!1):e&&!i&&n?(s=Math.PI/2,r=!1):!e||i||n?!e&&i&&n?(s=3*Math.PI/2,r=!1):e||!i||n?e||i||!n?e||i||n||(s=0,r=!1):(s=3*Math.PI/2,r=!0):(s=Math.PI,r=!0):(s=0,r=!0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:n,rotation:s,flipped:r}}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|s,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&ta&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(0),s=i(35),r=i(355),o=i(23),a=i(20),h=i(75),l=i(323),u=i(356),c=i(44),d=i(96),f=i(100),p=new n({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn('Invalid image key given for tileset: "'+e+'"'),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn('No data found in the JSON tilemap from Tiled matching the tileset name: "'+t+'"'),null;if(this.tilesets[l])return this.tilesets[l].setTileSize(i,n),this.tilesets[l].setSpacing(s,r),this.tilesets[l].setImage(h),this.tilesets[l];void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0);var u=new f(t,o,i,n,s,r);return u.setImage(h),this.tilesets.push(u),u},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new u(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:(null!==a&&d.Copy(t,e,i,n,s,r,o,a),this)},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===a&&(a=e.tileWidth),void 0===l&&(l=e.tileHeight),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===i&&(i=0),void 0===n&&(n=0),null!==this.getLayerIndex(t))return console.warn("Cannot create blank layer: layer with matching name already exists "+t),null;for(var u,d=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(923);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(4);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(159),s=i(10),r=i(73),o=i(71),a=i(101),h=i(4),l=i(158),u=i(160),c=i(161);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),y=h(e,"easeParams",i.easeParams),m=o(h(e,"ease",i.ease),y),x=a(e,"hold",i.hold),b=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),T=r(e,"yoyo",i.yoyo),S=[],A=l("value",f),C=c(p[0],"value",A.getEnd,A.getStart,m,g,v,T,x,b,w,!1,!1);C.start=d,C.current=d,C.to=f,S.push(C);var M=new u(t,S,p);M.offset=s(e,"offset",null),M.completeDelay=s(e,"completeDelay",0),M.loop=Math.round(s(e,"loop",0)),M.loopDelay=Math.round(s(e,"loopDelay",0)),M.paused=r(e,"paused",!1),M.useFrames=r(e,"useFrames",!1);for(var E=h(e,"callbackScope",M),_=[M,null],P=u.TYPES,L=0;L0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var y=0;y0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=o.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0){this.elapsed=0,this.progress=0,this.loopCounter--;var t=this.callbacks.onLoop;t&&t.func.apply(t.scope,t.params),this.emit("loop",this,this.loopCounter),this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):this.state=o.ACTIVE}else if(this.completeDelay>0)this.countdown=this.completeDelay,this.state=o.COMPLETE_DELAY;else{var e=this.callbacks.onComplete;e&&e.func.apply(e.scope,e.params),this.emit("complete",this),this.state=o.PENDING_REMOVE}},update:function(t,e){if(this.state!==o.PAUSED){var i=e;switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var n=this.totalData,s=0;s=t.length)){for(var i=t.length-1,n=t[e],s=e;s=this.nextTick&&this.currentAnim.setFrame(this))},updateFrame:function(t){var e=this.parent;if(this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;i.onUpdate&&i.onUpdate.apply(i.callbackScope,this._updateParams),t.onUpdate&&t.onUpdate(e,t)}},yoyo:function(t){return void 0===t?this._yoyo:(this._yoyo=t,this)},destroy:function(){}});t.exports=n},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,t)for(var e=0;e=0&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e,i){var n=i(8),s=i(185),r=i(6),o={getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getTopRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomLeft:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBottomRight:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),t},getBounds:function(t){void 0===t&&(t=new n),this.getTopLeft(t);var e=t.x,i=t.y;this.getTopRight(t);var s=t.x,r=t.y;this.getBottomLeft(t);var o=t.x,a=t.y;this.getBottomRight(t);var h=t.x,l=t.y;return t.x=Math.min(e,s,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,s,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},function(t,e){var i={matrixStack:null,currentMatrix:null,currentMatrixIndex:0,initMatrixStack:function(){return this.matrixStack=new Float32Array(6e3),this.currentMatrix=new Float32Array([1,0,0,1,0,0]),this.currentMatrixIndex=0,this},save:function(){if(this.currentMatrixIndex>=this.matrixStack.length)return this;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return this.currentMatrixIndex+=6,t[i+0]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],this},restore:function(){if(this.currentMatrixIndex<=0)return this;this.currentMatrixIndex-=6;var t=this.matrixStack,e=this.currentMatrix,i=this.currentMatrixIndex;return e[0]=t[i+0],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],this},loadIdentity:function(){return this.setTransform(1,0,0,1,0,0),this},transform:function(t,e,i,n,s,r){var o=this.currentMatrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=a*t+l*e,o[1]=h*t+u*e,o[2]=a*i+l*n,o[3]=h*i+u*n,o[4]=a*s+l*r+c,o[5]=h*s+u*r+d,this},setTransform:function(t,e,i,n,s,r){var o=this.currentMatrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},translate:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return i[4]=n*t+r*e+a,i[5]=s*t+o*e+h,this},scale:function(t,e){var i=this.currentMatrix,n=i[0],s=i[1],r=i[2],o=i[3];return i[0]=n*t,i[1]=s*t,i[2]=r*e,i[3]=o*e,this},rotate:function(t){var e=this.currentMatrix,i=e[0],n=e[1],s=e[2],r=e[3],o=Math.sin(t),a=Math.cos(t);return e[0]=i*a+s*o,e[1]=n*a+r*o,e[2]=s*-o+s*a,e[3]=r*-o+r*a,this}};t.exports=i},function(t,e){var i={originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=i},function(t,e,i){var n=i(62),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e){var i={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){return this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.frame.customPivot&&this.setOrigin(this.frame.pivotX,this.frame.pivotY),this}};t.exports=i},function(t,e){var i=function(t){return(t>>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t)}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t)}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t)}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t)}},tint:{set:function(t){this.setTint(t,t,t,t)}}};t.exports=n},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(16),s=i(162),r=i(163),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=r(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this}};t.exports=o},function(t,e){var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e){t.exports=function(t,e){for(var i=0;i0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.1&&(e.zoom=.1))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(114),CameraManager:i(445)}},function(t,e,i){var n=i(114),s=i(0),r=i(2),o=i(12),a=i(33),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.currentCameraId=1,this.cameras=[],this.cameraPool=[],t.sys.settings.cameras?this.fromJSON(t.sys.settings.cameras):this.add(),this.main=this.cameras[0],this.baseScale=1},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===s&&(s=this.scene.sys.game.config.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=null;return this.cameraPool.length>0?(a=this.cameraPool.pop()).setViewport(t,e,i,s):a=new n(t,e,i,s),a.setName(o),a.setScene(this.scene),this.cameras.push(a),r&&(this.main=a),a._id=this.currentCameraId,this.currentCameraId=this.currentCameraId<<1,a},addExisting:function(t){var e=this.cameras.indexOf(t),i=this.cameraPool.indexOf(t);return e<0&&i>=0?(this.cameras.push(t),this.cameraPool.slice(i,1),t):null},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.game.config.width,i=this.scene.sys.game.config.height,n=0;n=0;i--){var n=e[i];if(n.inputEnabled&&a(n,t.x,t.y))return n}},remove:function(t){var e=this.cameras.indexOf(t);e>=0&&this.cameras.length>1&&(this.cameraPool.push(this.cameras[e]),this.cameras.splice(e,1),this.main===t&&(this.main=this.cameras[0]))},render:function(t,e,i){for(var n=this.cameras,s=this.baseScale,r=0,o=n.length;r0;)this.cameraPool.push(this.cameras.pop());return this.main=this.add(),this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(211),r=i(212),o=i(12),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.cameras=[],t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t,e,i){return this.addPerspectiveCamera(t,e,i)},addOrthographicCamera:function(t,e){var i=this.scene.sys.game.config;void 0===t&&(t=i.width),void 0===e&&(e=i.height);var n=new s(this.scene,t,e);return this.cameras.push(n),n},addPerspectiveCamera:function(t,e,i){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===e&&(e=n.width),void 0===i&&(i=n.height);var s=new r(this.scene,t,e,i);return this.cameras.push(s),s},getCamera:function(t){return this.cameras.forEach(function(e){if(e.name===t)return e}),null},removeCamera:function(t){var e=this.cameras.indexOf(t);-1!==e&&this.cameras.splice(e,1)},removeAll:function(){for(;this.cameras.length>0;){this.cameras.pop().destroy()}return this.main},update:function(t,e){for(var i=0,n=this.cameras.length;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new c);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new c),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new c),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof c?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new u(t))},moveTo:function(t,e){return this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(36),s=i(224);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var n=i(225);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(226),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(228),s=i(36);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e){t.exports=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,e,i),s=Math.max(t,e,i),r=s-n,o=0;return s!==n&&(s===t?o=(e-i)/r+(e1)for(var i=1;i0||n._flashAlpha>0)&&(s.globalCompositeOperation="source-over",s.fillStyle="rgb("+255*n._fadeRed+","+255*n._fadeGreen+","+255*n._fadeBlue+")",s.globalAlpha=n._fadeAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.fillStyle="rgb("+255*n._flashRed+","+255*n._flashGreen+","+255*n._flashBlue+")",s.globalAlpha=n._flashAlpha,s.fillRect(n.x,n.y,n.width,n.height),s.globalAlpha=1),r&&s.restore()},postRender:function(){var t=this.gameContext;t.globalAlpha=1,t.globalCompositeOperation="source-over",this.currentAlpha=1,this.currentBlendMode=0,this.snapshotCallback&&(this.snapshotCallback(s(this.gameCanvas,this.snapshotType,this.snapshotEncoder)),this.snapshotCallback=null)},snapshot:function(t,e,i){this.snapshotCallback=t,this.snapshotType=e,this.snapshotEncoder=i},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=c},function(t,e){t.exports=function(t,e,i){var n=this.currentContext,s=i.canvasData;n.drawImage(i.source.image,s.sx,s.sy,s.sWidth,s.sHeight,t,e,s.dWidth,s.dHeight)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e="image/png"),void 0===i&&(i=.92);var n=t.toDataURL(e,i),s=new Image;return s.src=n,s}},function(t,e){t.exports=function(t,e){var i=this.currentContext,n=t.frame,s=n.canvasData;this.currentBlendMode!==t.blendMode&&(this.currentBlendMode=t.blendMode,i.globalCompositeOperation=this.blendModes[t.blendMode]),this.currentAlpha!==t.alpha&&(this.currentAlpha=t.alpha,i.globalAlpha=t.alpha),this.currentScaleMode!==t.scaleMode&&(this.currentScaleMode=t.scaleMode);var r=n.x,o=n.y,a=1,h=1;t.flipX?(a=-1,r-=s.dWidth-t.displayOriginX):r-=t.displayOriginX,t.flipY?(h=-1,o-=s.dHeight-t.displayOriginY):o-=t.displayOriginY,i.save(),i.translate(t.x-e.scrollX*t.scrollFactorX,t.y-e.scrollY*t.scrollFactorY),i.rotate(t.rotation),i.scale(t.scaleX,t.scaleY),i.scale(a,h),i.drawImage(n.source.image,s.sx,s.sy,s.sWidth,s.sHeight,r,o,s.dWidth,s.dHeight),i.restore()}},function(t,e,i){var n=i(45),s=i(234);t.exports=function(){var t=[],e=s.supportNewBlendModes;return t[n.NORMAL]="source-over",t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":"source-over",t[n.SCREEN]=e?"screen":"source-over",t[n.OVERLAY]=e?"overlay":"source-over",t[n.DARKEN]=e?"darken":"source-over",t[n.LIGHTEN]=e?"lighten":"source-over",t[n.COLOR_DODGE]=e?"color-dodge":"source-over",t[n.COLOR_BURN]=e?"color-burn":"source-over",t[n.HARD_LIGHT]=e?"hard-light":"source-over",t[n.SOFT_LIGHT]=e?"soft-light":"source-over",t[n.DIFFERENCE]=e?"difference":"source-over",t[n.EXCLUSION]=e?"exclusion":"source-over",t[n.HUE]=e?"hue":"source-over",t[n.SATURATION]=e?"saturation":"source-over",t[n.COLOR]=e?"color":"source-over",t[n.LUMINOSITY]=e?"luminosity":"source-over",t}},function(t,e,i){var n=i(0),s=i(22),r=i(125),o=i(42),a=i(507),h=i(508),l=i(511),u=i(237),c=i(238),d=new n({initialize:function(t){var e=this,i={alpha:t.config.transparent,depth:!1,antialias:t.config.antialias,premultipliedAlpha:t.config.transparent,stencil:!0,preserveDrawingBuffer:t.config.preserveDrawingBuffer,failIfMajorPerformanceCaveat:!1,powerPreference:t.config.powerPreference};this.config={clearBeforeRender:t.config.clearBeforeRender,pixelArt:t.config.pixelArt,backgroundColor:t.config.backgroundColor,contextCreation:i,resolution:t.config.resolution,autoResize:t.config.autoResize},this.game=t,this.type=s.WEBGL,this.width=t.config.width,this.height=t.config.height,this.canvas=t.canvas,this.lostContextCallbacks=[],this.restoredContextCallbacks=[],this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={callback:null,type:null,encoder:null},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=new Uint32Array([0,0,this.width,this.height]),this.currentScissorIdx=0,this.scissorStack=new Uint32Array(4e3),this.canvas.addEventListener("webglcontextlost",function(t){e.contextLost=!0,t.preventDefault();for(var i=0;i=0&&n>=0;if(r[0]===t&&r[1]===e&&r[2]===i&&r[3]===n||this.flush(),r[0]=t,r[1]=e,r[2]=i,r[3]=n,this.currentScissorEnabled=o,!o)return s.enable(s.SCISSOR_TEST),s.scissor(t,s.drawingBufferHeight-e-n,i,n),this;s.disable(s.SCISSOR_TEST)},pushScissor:function(t,e,i,n){var s=this.scissorStack,r=this.currentScissorIdx,o=this.currentScissor;return s[r+0]=o[0],s[r+1]=o[1],s[r+2]=o[2],s[r+3]=o[3],this.currentScissorIdx+=4,this.setScissor(t,e,i,n),this},popScissor:function(){var t=this.scissorStack,e=this.currentScissorIdx-4,i=t[e+0],n=t[e+1],s=t[e+2],r=t[e+3];return this.currentScissorIdx=e,this.setScissor(i,n,s,r),this},setPipeline:function(t){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(),this.currentPipeline},setBlendMode:function(t){var e=this.gl,i=this.blendModes[t];return t!==s.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=t),this},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>16&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setTexture2D:function(t,e){var i=this.gl;return t!==this.currentTextures[e]&&(this.flush(),this.currentActiveTextureUnit!==e&&(i.activeTexture(i.TEXTURE0+e),this.currentActiveTextureUnit=e),i.bindTexture(i.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t){var e=this.gl;return t!==this.currentFramebuffer&&(this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,t),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var o=this.gl,a=o.NEAREST,h=o.CLAMP_TO_EDGE;return e=t?t.width:e,i=t?t.height:i,r(e,i)&&(h=o.REPEAT),n===s.ScaleModes.LINEAR?a=o.LINEAR:(n===s.ScaleModes.NEAREST||this.config.pixelArt)&&(a=o.NEAREST),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,a,h,h,o.RGBA,t):this.createTexture2D(0,a,a,h,h,o.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,h,l){var u=this.gl,c=u.createTexture();return l=void 0===l||null===l||l,this.setTexture2D(c,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,i),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,n),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),null===o||void 0===o?u.texImage2D(u.TEXTURE_2D,t,r,a,h,0,r,u.UNSIGNED_BYTE,null):(u.texImage2D(u.TEXTURE_2D,t,r,r,u.UNSIGNED_BYTE,o),a=o.width,h=o.height),this.setTexture2D(null,0),c.isAlphaPremultiplied=l,c.isRenderTexture=!1,c.width=a,c.height=h,this.nativeTextures.push(c),c},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){return this.gl.deleteTexture(t),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=this.config.resolution;if(this.pushScissor(t.x*e,t.y*e,t.width*e,t.height*e),t.backgroundColor.alphaGL>0){var i=t.backgroundColor,n=this.pipelines.FlatTintPipeline;n.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(i.redGL,i.greenGL,i.blueGL,1),i.alphaGL,1,0,0,1,0,0,[1,0,0,1,0,0]),n.flush()}},postRenderCamera:function(t){if(t._fadeAlpha>0||t._flashAlpha>0){var e=this.pipelines.FlatTintPipeline;e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._fadeRed,t._fadeGreen,t._fadeBlue,1),t._fadeAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.batchFillRect(0,0,1,1,0,t.x,t.y,t.width,t.height,o.getTintFromFloats(t._flashRed,t._flashGreen,t._flashBlue,1),t._flashAlpha,1,0,0,1,0,0,[1,0,0,1,0,0]),e.flush()}this.popScissor()},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.config.backgroundColor,i=this.pipelines;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),this.config.clearBeforeRender&&t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT);for(var n in i)i[n].onPreRender()}},render:function(t,e,i,n){if(!this.contextLost){var r=e.list,o=r.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);this.preRenderCamera(n);for(var l=0;lthis.vertexCapacity&&this.flush();this.renderer.config.resolution;var x=this.vertexViewF32,b=this.vertexViewU32,w=this.vertexCount*this.vertexComponentCount,T=r+a,S=o+h,A=m[0],C=m[1],M=m[2],E=m[3],_=d*A+f*M,P=d*C+f*E,L=p*A+g*M,k=p*C+g*E,F=v*A+y*M+m[4],O=v*C+y*E+m[5],R=r*_+o*L+F,B=r*P+o*k+O,D=r*_+S*L+F,I=r*P+S*k+O,Y=T*_+S*L+F,z=T*P+S*k+O,X=T*_+o*L+F,N=T*P+o*k+O,V=l.getTintAppendFloatAlphaAndSwap(u,c);x[w+0]=R,x[w+1]=B,b[w+2]=V,x[w+3]=D,x[w+4]=I,b[w+5]=V,x[w+6]=Y,x[w+7]=z,b[w+8]=V,x[w+9]=R,x[w+10]=B,b[w+11]=V,x[w+12]=Y,x[w+13]=z,b[w+14]=V,x[w+15]=X,x[w+16]=N,b[w+17]=V,this.vertexCount+=6},batchFillTriangle:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b){this.renderer.setPipeline(this),this.vertexCount+3>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var w=this.vertexViewF32,T=this.vertexViewU32,S=this.vertexCount*this.vertexComponentCount,A=b[0],C=b[1],M=b[2],E=b[3],_=p*A+g*M,P=p*C+g*E,L=v*A+y*M,k=v*C+y*E,F=m*A+x*M+b[4],O=m*C+x*E+b[5],R=r*_+o*L+F,B=r*P+o*k+O,D=a*_+h*L+F,I=a*P+h*k+O,Y=u*_+c*L+F,z=u*P+c*k+O,X=l.getTintAppendFloatAlphaAndSwap(d,f);w[S+0]=R,w[S+1]=B,T[S+2]=X,w[S+3]=D,w[S+4]=I,T[S+5]=X,w[S+6]=Y,w[S+7]=z,T[S+8]=X,this.vertexCount+=3},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,y,m,x,b){var w=this.tempTriangle;w[0].x=r,w[0].y=o,w[0].width=c,w[0].rgb=d,w[0].alpha=f,w[1].x=a,w[1].y=h,w[1].width=c,w[1].rgb=d,w[1].alpha=f,w[2].x=l,w[2].y=u,w[2].width=c,w[2].rgb=d,w[2].alpha=f,w[3].x=r,w[3].y=o,w[3].width=c,w[3].rgb=d,w[3].alpha=f,this.batchStrokePath(t,e,i,n,s,w,c,d,f,p,g,v,y,m,x,!1,b)},batchFillPath:function(t,e,i,n,s,o,a,h,u,c,d,f,p,g,v){this.renderer.setPipeline(this);this.renderer.config.resolution;for(var y,m,x,b,w,T,S,A,C,M,E,_,P,L,k,F,O,R=o.length,B=this.polygonCache,D=this.vertexViewF32,I=this.vertexViewU32,Y=0,z=v[0],X=v[1],N=v[2],V=v[3],W=u*z+c*N,G=u*X+c*V,U=d*z+f*N,j=d*X+f*V,H=p*z+g*N+v[4],q=p*X+g*V+v[5],K=l.getTintAppendFloatAlphaAndSwap(a,h),J=0;Jthis.vertexCapacity&&this.flush(),Y=this.vertexCount*this.vertexComponentCount,_=(T=B[x+0])*W+(S=B[x+1])*U+H,P=T*G+S*j+q,L=(A=B[b+0])*W+(C=B[b+1])*U+H,k=A*G+C*j+q,F=(M=B[w+0])*W+(E=B[w+1])*U+H,O=M*G+E*j+q,D[Y+0]=_,D[Y+1]=P,I[Y+2]=K,D[Y+3]=L,D[Y+4]=k,I[Y+5]=K,D[Y+6]=F,D[Y+7]=O,I[Y+8]=K,this.vertexCount+=3;B.length=0},batchStrokePath:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y){var m,x;this.renderer.setPipeline(this);for(var b,w,T,S,A=r.length,C=this.polygonCache,M=this.vertexViewF32,E=this.vertexViewU32,_=l.getTintAppendFloatAlphaAndSwap,P=0;P+1this.vertexCapacity&&this.flush(),b=C[L-1]||C[k-1],w=C[L],M[(T=this.vertexCount*this.vertexComponentCount)+0]=b[6],M[T+1]=b[7],E[T+2]=_(b[8],h),M[T+3]=b[0],M[T+4]=b[1],E[T+5]=_(b[2],h),M[T+6]=w[9],M[T+7]=w[10],E[T+8]=_(w[11],h),M[T+9]=b[0],M[T+10]=b[1],E[T+11]=_(b[2],h),M[T+12]=b[6],M[T+13]=b[7],E[T+14]=_(b[8],h),M[T+15]=w[3],M[T+16]=w[4],E[T+17]=_(w[5],h),this.vertexCount+=6;C.length=0},batchLine:function(t,e,i,n,s,r,o,a,h,u,c,d,f,p,g,v,y,m,x,b,w){this.renderer.setPipeline(this),this.vertexCount+6>this.vertexCapacity&&this.flush();this.renderer.config.resolution;var T=w[0],S=w[1],A=w[2],C=w[3],M=g*T+v*A,E=g*S+v*C,_=y*T+m*A,P=y*S+m*C,L=x*T+b*A+w[4],k=x*S+b*C+w[5],F=this.vertexViewF32,O=this.vertexViewU32,R=a-r,B=h-o,D=Math.sqrt(R*R+B*B),I=u*(h-o)/D,Y=u*(r-a)/D,z=c*(h-o)/D,X=c*(r-a)/D,N=a-z,V=h-X,W=r-I,G=o-Y,U=a+z,j=h+X,H=r+I,q=o+Y,K=N*M+V*_+L,J=N*E+V*P+k,Z=W*M+G*_+L,Q=W*E+G*P+k,$=U*M+j*_+L,tt=U*E+j*P+k,et=H*M+q*_+L,it=H*E+q*P+k,nt=l.getTintAppendFloatAlphaAndSwap,st=nt(d,p),rt=nt(f,p),ot=this.vertexCount*this.vertexComponentCount;return F[ot+0]=K,F[ot+1]=J,O[ot+2]=rt,F[ot+3]=Z,F[ot+4]=Q,O[ot+5]=st,F[ot+6]=$,F[ot+7]=tt,O[ot+8]=rt,F[ot+9]=Z,F[ot+10]=Q,O[ot+11]=st,F[ot+12]=et,F[ot+13]=it,O[ot+14]=st,F[ot+15]=$,F[ot+16]=tt,O[ot+17]=rt,this.vertexCount+=6,[K,J,f,Z,Q,d,$,tt,f,et,it,d]},batchGraphics:function(t,e){if(!(t.commandBuffer.length<=0)){this.renderer.setPipeline(this);var i,n,r=e.scrollX*t.scrollFactorX,o=e.scrollY*t.scrollFactorY,a=t.x-r,h=t.y-o,l=t.scaleX,u=t.scaleY,y=-t.rotation,m=t.commandBuffer,x=1,b=1,w=0,T=0,S=1,A=e.matrix.matrix,C=null,M=0,E=0,_=0,P=0,L=0,k=0,F=0,O=0,R=0,B=null,D=Math.sin,I=Math.cos,Y=D(y),z=I(y),X=z*l,N=-Y*l,V=Y*u,W=z*u,G=a,U=h,j=A[0],H=A[1],q=A[2],K=A[3],J=X*j+N*q,Z=X*H+N*K,Q=V*j+W*q,$=V*H+W*K,tt=G*j+U*q+A[4],et=G*H+U*K+A[5];v.length=0;for(var it=0,nt=m.length;it0){var st=C.points[0],rt=C.points[C.points.length-1];C.points.push(st),C=new d(rt.x,rt.y,rt.width,rt.rgb,rt.alpha),v.push(C)}break;case s.FILL_PATH:for(i=0,n=v.length;i=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),n.cocoonJS||("onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},function(t,e,i){var n=i(82),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264Video:!1,hlsVideo:!1,mp4Video:!1,oggVideo:!1,vp9Video:!1,webmVideo:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.oggVideo=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264Video=!0,i.mp4Video=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webmVideo=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9Video=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hlsVideo=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],n=document.createElement("div");for(t=0;t0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(128),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.altKey=e.altKey,t.ctrlKey=e.ctrlKey,t.shiftKey=e.shiftKey,t.location=e.location,t.isDown=!0,t.isUp=!1,t.timeDown=e.timeStamp,t.duration=0,t.repeats++,t._justDown=!0,t._justUp=!1,t}},function(t,e){t.exports=function(t,e){if(t.originalEvent=e,t.preventDefault&&e.preventDefault(),t.enabled)return t.isDown=!1,t.isUp=!0,t.timeUp=e.timeStamp,t.duration=t.timeUp-t.timeDown,t.repeats=0,t._justDown=!1,t._justUp=!0,t}},function(t,e,i){var n=i(2),s=i(253);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.game.config.defaultPlugins,i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e){t.exports={game:"game",anims:"anims",cache:"cache",registry:"registry",sound:"sound",textures:"textures",events:"events",cameras:"cameras",cameras3d:"cameras3d",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){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e){t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},function(t,e,i){var n=i(52);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,o=Array.isArray(i.textures)?i.textures[0].frames:i.frames,a=0;ag||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,y=f,m=0,x=0,b=0;br&&(m=w-r),T>o&&(x=T-o),t.add(b,e,i+v,s+y,h-m,l-x),(v+=h+p)+h>r&&(v=f,y+=l+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o,a=n(i,"startFrame",0),h=n(i,"endFrame",-1),l=n(i,"margin",0),u=n(i,"spacing",0),c=e.cutX,d=e.cutY,f=e.cutWidth,p=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-l+u)/(s+u)),m=Math.floor((v-l+u)/(r+u)),x=y*m,b=e.x,w=s-b,T=s-(g-f-b),S=e.y,A=r-S,C=r-(v-p-S);(a>x||a<-x)&&(a=0),a<0&&(a=x+a),-1!==h&&(x=a+(h+1));for(var M=l,E=l,_=0,P=e.sourceIndex,L=0;L0||!this.inFocus)&&(this._coolDown--,s=Math.min(s,this._target)),s>this._min&&(s=i[e],s=Math.min(s,this._min)),i[e]=s,this.deltaIndex++,this.deltaIndex>n&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(t,r,a),this.lastTime=t},tick:function(){this.step(window.performance.now())},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime=window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step(window.performance.now())},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e){t.exports=function(t){var e;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(e){document.hidden||"pause"===e.type?t.emit("hidden"):t.emit("visible")},!1),window.onblur=function(){t.emit("blur")},window.onfocus=function(){t.emit("focus")}}},function(t,e,i){var n={DisplayList:i(544),GameObjectCreator:i(13),GameObjectFactory:i(9),UpdateList:i(545),Components:i(11),BitmapText:i(131),Blitter:i(132),DynamicBitmapText:i(133),Graphics:i(134),Group:i(69),Image:i(70),Particles:i(137),PathFollower:i(289),RenderTexture:i(139),Sprite3D:i(81),Sprite:i(37),Text:i(140),TileSprite:i(141),Zone:i(77),Factories:{Blitter:i(628),DynamicBitmapText:i(629),Graphics:i(630),Group:i(631),Image:i(632),Particles:i(633),PathFollower:i(634),RenderTexture:i(635),Sprite3D:i(636),Sprite:i(637),StaticBitmapText:i(638),Text:i(639),TileSprite:i(640),Zone:i(641)},Creators:{Blitter:i(642),DynamicBitmapText:i(643),Graphics:i(644),Group:i(645),Image:i(646),Particles:i(647),RenderTexture:i(648),Sprite3D:i(649),Sprite:i(650),StaticBitmapText:i(651),Text:i(652),TileSprite:i(653),Zone:i(654)}};n.Mesh=i(88),n.Quad=i(143),n.Factories.Mesh=i(658),n.Factories.Quad=i(659),n.Creators.Mesh=i(660),n.Creators.Quad=i(661),n.Light=i(291),i(292),i(662),t.exports=n},function(t,e,i){var n=i(0),s=i(86),r=i(12),o=i(266),a=new n({Extends:s,initialize:function(t){s.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(o.inplace(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},sortGameObjects:function(t){return void 0===t&&(t=this.list),this.scene.sys.depthSort(),t.sort(this.sortIndexHandler.bind(this))},getTopGameObject:function(t){return this.sortGameObjects(t),t[t.length-1]}});r.register("DisplayList",a,"displayList"),t.exports=a},function(t,e,i){var n=i(0),s=i(12),r=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this._list=[],this._pendingInsertion=[],this._pendingRemoval=[]},boot:function(){var t=this.systems.events;t.on("preupdate",this.preUpdate,this),t.on("update",this.update,this),t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},add:function(t){return-1===this._list.indexOf(t)&&-1===this._pendingInsertion.indexOf(t)&&this._pendingInsertion.push(t),t},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i-1&&this._list.splice(s,1)}this._list=this._list.concat(this._pendingInsertion.splice(0)),this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){for(var i=0;ia.length&&(f=a.length);for(var p=l,g=u,v={retroFont:!0,font:h,size:i,lineHeight:s,chars:{}},y=0,m=0;m?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",s.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",s.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",s.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",s.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",s.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",s.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",s.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789",t.exports=s},function(t,e,i){var n=i(3),s=i(3);n=i(549),s=i(550),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.text.length;n.RENDER_MASK!==e.renderFlags||0===r||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchBitmapText(this,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=s.scrollX*e.scrollFactorX,l=s.scrollY*e.scrollFactorY,u=e.fontData.chars,c=e.fontData.lineHeight,d=0,f=0,p=0,g=0,v=null,y=0,m=0,x=0,b=0,w=0,T=0,S=null,A=0,C=t.currentContext,M=e.frame.source.image,E=a.cutX,_=a.cutY,P=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,C.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,C.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),C.save(),C.translate(e.x-h+e.frame.x,e.y-l+e.frame.y),C.rotate(e.rotation),C.translate(-e.displayOriginX,-e.displayOriginY),C.scale(e.scaleX,e.scaleY);for(var L=0;L0&&e.cameraFilter&s._id||this.pipeline.drawBlitter(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=e.getRenderList();t.setBlendMode(e.blendMode);for(var o=t.gameContext,a=e.x-s.scrollX*e.scrollFactorX,h=e.y-s.scrollY*e.scrollFactorY,l=0;l0&&e.cameraFilter&s._id||this.pipeline.batchDynamicBitmapText(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.text,o=r.length;if(!(n.RENDER_MASK!==e.renderFlags||0===o||e.cameraFilter>0&&e.cameraFilter&s._id)){var a=e.frame,h=e.displayCallback,l=s.scrollX*e.scrollFactorX,u=s.scrollY*e.scrollFactorY,c=e.fontData.chars,d=e.fontData.lineHeight,f=0,p=0,g=0,v=0,y=null,m=0,x=0,b=0,w=0,T=0,S=0,A=null,C=0,M=t.currentContext,E=e.frame.source.image,_=a.cutX,P=a.cutY,L=0,k=e.fontSize/e.fontData.size;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,M.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,M.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode),M.save(),M.translate(e.x,e.y),M.rotate(e.rotation),M.translate(-e.displayOriginX,-e.displayOriginY),M.scale(e.scaleX,e.scaleY),e.cropWidth>0&&e.cropHeight>0&&(M.save(),M.beginPath(),M.rect(0,0,e.cropWidth,e.cropHeight),M.clip());for(var F=0;F0&&e.cropHeight>0&&M.restore(),M.restore()}}},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(135);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(68);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(3),s=i(3);n=i(568),s=i(273),s=i(273),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchGraphics(this,s)}},function(t,e,i){var n=i(3),s=i(3);n=i(570),s=i(571),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchSprite(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||t.drawImage(e,s)}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0?n.pop():new this.particleClass(this)).fire(e,i),this.particleBringToTop?this.alive.push(r):this.alive.unshift(r),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,r,this),this.atLimit())break}return r}},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible);for(var n=this.manager.getProcessors(),s=this.alive,r=s.length,o=0;o0){var u=s.splice(s.length-l,l),c=this.deathCallback,d=this.deathCallbackScope;if(c)for(var f=0;f0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y},indexSortCallback:function(t,e){return t.index-e.index}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e,i){var n=i(0),s=i(275),r=i(71),o=i(2),a=i(50),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||this.has(t,"random");if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(276),s=i(277),r=i(278),o=i(279),a=i(280),h=i(281),l=i(282),u=i(283),c=i(284),d=i(285),f=i(286),p=i(287);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(0),s=i(35),r=i(41),o=new n({initialize:function(t){this.emitter=t,this.frame=null,this.index=0,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.scrollFactorX=1,this.scrollFactorY=1,this.tint=4294967295,this.color=4294967295,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint"),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.index=i.alive.length},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.color=16777215&this.tint|(255*this.alpha|0)<<24,this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(0),s=i(6),r=new n({initialize:function(t){this.source=t,this._tempVec=new s},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},function(t,e,i){var n=i(3),s=i(3);n=i(613),s=i(614),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){0===e.emitters.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.drawEmitterManager(e,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){var r=e.emitters.list;if(!(0===r.length||n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id))for(var o=0;o>24&255)/255;if(!(v<=0)){var y=g.frame,m=.5*y.width,x=.5*y.height,b=y.canvasData,w=-m,T=-x;u.globalAlpha=v,u.save(),u.translate(g.x-d*g.scrollFactorX,g.y-f*g.scrollFactorY),u.rotate(g.rotation),u.scale(g.scaleX,g.scaleY),u.drawImage(y.source.image,b.sx,b.sy,b.sWidth,b.sHeight,w,T,b.dWidth,b.dHeight),u.restore()}}u.globalAlpha=c}}}},function(t,e){t.exports={fill:function(t){return this},clear:function(){this.renderer.setFramebuffer(this.framebuffer);var t=this.gl;return t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),this.renderer.setFramebuffer(null),this},draw:function(t,e,i){return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.drawTexture(t,e,i,0,0,t.width,t.height,this.currentMatrix),this.renderer.setFramebuffer(null),this},drawFrame:function(t,e,i,n){return this.renderer.setFramebuffer(this.framebuffer),this.renderer.pipelines.TextureTintPipeline.drawTexture(t,n.x,n.y,n.width,n.height,t.width,t.height,this.currentMatrix),this.renderer.setFramebuffer(null),this}}},function(t,e,i){var n=i(3),s=i(3);n=i(617),s=i(618),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchTexture(e,e.texture,e.texture.width,e.texture.height,e.x,e.y,e.width,e.height,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,e.texture.width,e.texture.height,4294967295,4294967295,4294967295,4294967295,0,0,s)}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&(e.cameraFilter,s._id)}},function(t,e){t.exports=function(t,e,i){var n=t.canvas,s=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLinesc&&(f=-c),0!==f&&(d+=f>0?f*i.length:f*(i.length-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(3),s=i(3);n=i(621),s=i(622),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text||(e.dirty&&(e.canvasTexture=t.canvasToTexture(e.canvas,e.canvasTexture,!0,e.scaleMode),e.dirty=!1),this.pipeline.batchText(this,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||""===e.text)){var r=t.currentContext;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var o=e.canvas;r.save(),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY),r.translate(o.width*(e.flipX?1:0),o.height*(e.flipY?1:0)),r.scale(e.flipX?-1:1,e.flipY?-1:1),r.drawImage(o,0,0,o.width,o.height,-e.displayOriginX,-e.displayOriginY,o.width,o.height),r.restore()}}},function(t,e,i){var n=i(0),s=i(10),r=i(4),o=i(624),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.rtl,this.testString,this._font,this.setStyle(e,!1);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e){void 0===e&&(e=!0),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px");for(var i in a)this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?r(t,a[i][0],a[i][1]):s(t,a[i][0],a[i][1]);var n=r(t,"font",null);this._font=null===n?[this.fontStyle,this.fontSize,this.fontFamily].join(" "):n;var o=r(t,"fill",null);return null!==o&&(this.color=o),e&&this.update(!0),this},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" "),this.metrics=o(this)),this.parent.updateText()},setFont:function(t){return"string"==typeof t?(this.fontFamily=t,this.fontSize="",this.fontStyle=""):(this.fontFamily=r(t,"fontFamily","Courier"),this.fontSize=r(t,"fontSize","16px"),this.fontStyle=r(t,"fontStyle","")),this.update(!0)},setFontFamily:function(t){return this.fontFamily=t,this.update(!0)},setFontStyle:function(t){return this.fontStyle=t,this.update(!0)},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize=t,this.update(!0)},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.text.width=t),e&&(this.text.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setStroke:function(t,e){return void 0===t?this.strokeThickness=0:(void 0===e&&(e=this.strokeThickness),this.stroke=t,this.strokeThickness=e),this.update(!0)},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(21);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(1.2*i.measureText(t.testString).width),r=s,o=2*r;r=1.4*r|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0&&e.cameraFilter&s._id||(e.updateTileTexture(),this.pipeline.batchTileSprite(this,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){var r=t.currentContext,o=e.frame;t.currentBlendMode!==e.blendMode&&(t.currentBlendMode=e.blendMode,r.globalCompositeOperation=t.blendModes[e.blendMode]),t.currentAlpha!==e.alpha&&(t.currentAlpha=e.alpha,r.globalAlpha=e.alpha),t.currentScaleMode!==e.scaleMode&&(t.currentScaleMode=e.scaleMode);var a=o.x-e.originX*e.width,h=o.y-e.originY*e.height;r.save(),r.translate(a,h),r.translate(e.x-s.scrollX*e.scrollFactorX,e.y-s.scrollY*e.scrollFactorY),r.fillStyle=e.canvasPattern,r.translate(-this.tilePositionX,-this.tilePositionY),r.fillRect(this.tilePositionX,this.tilePositionY,e.width,e.height),r.restore()}}},function(t,e,i){var n=i(132);i(9).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(133);i(9).register("dynamicBitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(134);i(9).register("graphics",function(t){return this.displayList.add(new n(this.scene,t))})},function(t,e,i){var n=i(69);i(9).register("group",function(t,e){return"object"==typeof t&&void 0===e&&(e=t,t=[]),this.updateList.add(new n(this.scene,t,e))})},function(t,e,i){var n=i(70);i(9).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(9),s=i(137);n.register("particles",function(t,e,i){var n=new s(this.scene,t,e,i);return this.displayList.add(n),this.updateList.add(n),n})},function(t,e,i){var n=i(9),s=i(289);n.register("follower",function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),this.updateList.add(o),o})},function(t,e,i){var n=i(9),s=i(139);n.register("renderTexture",function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))})},function(t,e,i){var n=i(81);i(9).register("sprite3D",function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o.gameObject),this.updateList.add(o.gameObject),o})},function(t,e,i){var n=i(9),s=i(37);n.register("sprite",function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.displayList.add(r),this.updateList.add(r),r})},function(t,e,i){var n=i(131);i(9).register("bitmapText",function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))})},function(t,e,i){var n=i(140);i(9).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(141);i(9).register("tileSprite",function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))})},function(t,e,i){var n=i(77);i(9).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(132),s=i(19),r=i(13),o=i(10);r.register("blitter",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new n(this.scene,0,0,e,i);return s(this.scene,r,t),r})},function(t,e,i){var n=i(133),s=i(19),r=i(13),o=i(10);r.register("dynamicBitmapText",function(t){var e=o(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),a=o(t,"align","left"),h=new n(this.scene,0,0,e,i,r,a);return s(this.scene,h,t),h})},function(t,e,i){var n=i(13),s=i(134);n.register("graphics",function(t){return new s(this.scene,t)})},function(t,e,i){var n=i(13),s=i(69);n.register("group",function(t){return new s(this.scene,null,t)})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(70);s.register("image",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=new o(this.scene,0,0,e,i);return n(this.scene,s,t),s})},function(t,e,i){var n=i(13),s=i(10),r=i(2),o=i(137);n.register("particles",function(t){var e=s(t,"key",null),i=s(t,"frame",null),n=r(t,"emitters",null),a=new o(this.scene,e,i,n);return r(t,"add",!1)&&this.displayList.add(a),this.updateList.add(a),a})},function(t,e,i){var n=i(19),s=(i(142),i(13)),r=i(10),o=i(139);s.register("renderTexture",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",32),a=r(t,"height",32),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(19),s=i(142),r=i(13),o=i(10),a=i(81);r.register("sprite3D",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(19),s=i(142),r=i(13),o=i(10),a=i(37);r.register("sprite",function(t){var e=o(t,"key",null),i=o(t,"frame",null),r=new a(this.scene,0,0,e,i);return n(this.scene,r,t),s(r,t),r})},function(t,e,i){var n=i(131),s=i(19),r=i(13),o=i(10),a=i(4);r.register("bitmapText",function(t){var e=a(t,"font",""),i=o(t,"text",""),r=o(t,"size",!1),h=new n(this.scene,0,0,e,i,r);return s(this.scene,h,t),h})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(140);s.register("text",function(t){var e=r(t,"text",""),i=r(t,"style",null),s=r(t,"padding",null);null!==s&&(i.padding=s);var a=new o(this.scene,0,0,e,i);return n(this.scene,a,t),a.autoRound=r(t,"autoRound",!0),a.resolution=r(t,"resolution",1),a})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(141);s.register("tileSprite",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",512),a=r(t,"height",512),h=r(t,"key",""),l=r(t,"frame",""),u=new o(this.scene,e,i,s,a,h,l);return n(this.scene,u,t),u})},function(t,e,i){var n=i(13),s=i(10),r=i(77);n.register("zone",function(t){var e=s(t,"x",0),i=s(t,"y",0),n=s(t,"width",1),o=s(t,"height",n);return new r(this.scene,e,i,n,o)})},function(t,e,i){var n=i(3),s=i(3);n=i(656),s=i(657),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id||this.pipeline.batchMesh(e,s)}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(88);i(9).register("mesh",function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))})},function(t,e,i){var n=i(143);i(9).register("quad",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(4),a=i(88);s.register("mesh",function(t){var e=r(t,"key",null),i=r(t,"frame",null),s=o(t,"vertices",[]),h=o(t,"colors",[]),l=o(t,"alphas",[]),u=o(t,"uv",[]),c=new a(this.scene,0,0,s,u,h,l,e,i);return n(this.scene,c,t),c})},function(t,e,i){var n=i(19),s=i(13),r=i(10),o=i(143);s.register("quad",function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"key",null),a=r(t,"frame",null),h=new o(this.scene,e,i,s,a);return n(this.scene,h,t),h})},function(t,e,i){var n=i(0),s=i(292),r=i(12),o=new n({Extends:s,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),s.call(this)},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},function(t,e,i){var n=i(63);n.Area=i(664),n.Circumference=i(183),n.CircumferencePoint=i(104),n.Clone=i(665),n.Contains=i(32),n.ContainsPoint=i(666),n.ContainsRect=i(667),n.CopyFrom=i(668),n.Equals=i(669),n.GetBounds=i(670),n.GetPoint=i(181),n.GetPoints=i(182),n.Offset=i(671),n.OffsetPoint=i(672),n.Random=i(105),t.exports=n},function(t,e){t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(63);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(32);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(8);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(41);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},function(t,e){t.exports=function(t,e){var i=e.width/2,n=e.height/2,s=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(s>o||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(8),s=i(295);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(297);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e,i){var n=i(89),s=i(33),r=i(144),o=i(298);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},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||se.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e,i){var n=i(300);n.Angle=i(54),n.BresenhamPoints=i(191),n.CenterOn=i(684),n.Clone=i(685),n.CopyFrom=i(686),n.Equals=i(687),n.GetMidPoint=i(688),n.GetNormal=i(689),n.GetPoint=i(301),n.GetPoints=i(108),n.Height=i(690),n.Length=i(65),n.NormalAngle=i(302),n.NormalX=i(691),n.NormalY=i(692),n.Offset=i(693),n.PerpSlope=i(694),n.Random=i(110),n.ReflectAngle=i(695),n.Rotate=i(696),n.RotateAroundPoint=i(697),n.RotateAroundXY=i(145),n.SetToAngle=i(698),n.Slope=i(699),n.Width=i(700),t.exports=n},function(t,e){t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,s=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=s,t.x2+=n,t.y2+=s,t}},function(t,e,i){var n=i(300);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},function(t,e){t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},function(t,e,i){var n=i(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},function(t,e,i){var n=i(16),s=i(54),r=i(5);t.exports=function(t,e){void 0===e&&(e=new r);var i=s(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},function(t,e){t.exports=function(t){return Math.abs(t.y1-t.y2)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.cos(s(t)-n.TAU)}},function(t,e,i){var n=i(16),s=i(54);t.exports=function(t){return Math.sin(s(t)-n.TAU)}},function(t,e){t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},function(t,e){t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},function(t,e,i){var n=i(54),s=i(302);t.exports=function(t,e){return 2*s(e)-Math.PI-n(t)}},function(t,e,i){var n=i(145);t.exports=function(t,e){var i=(t.x1+t.x2)/2,s=(t.y1+t.y2)/2;return n(t,i,s,e)}},function(t,e,i){var n=i(145);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},function(t,e){t.exports=function(t,e,i,n,s){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*s,t.y2=i+Math.sin(n)*s,t}},function(t,e){t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},function(t,e){t.exports=function(t){return Math.abs(t.x1-t.x2)}},function(t,e,i){var n=i(5);n.Ceil=i(702),n.Clone=i(703),n.CopyFrom=i(704),n.Equals=i(705),n.Floor=i(706),n.GetCentroid=i(707),n.GetMagnitude=i(303),n.GetMagnitudeSq=i(304),n.GetRectangleFromPoints=i(708),n.Interpolate=i(709),n.Invert=i(710),n.Negative=i(711),n.Project=i(712),n.ProjectUnit=i(713),n.SetMagnitude=i(714),t.exports=n},function(t,e){t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t){return new n(t.x,t.y)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},function(t,e){t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},function(t,e,i){var n=i(5);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;si&&(i=h.x),h.xr&&(r=h.y),h.yt.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottomn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(5);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(5);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(307);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(5),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o))}t.length=0,this._list=s.concat(e.splice(0))}},clear:function(t){var e=t.input;return e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,t.input=null,t},disable:function(t){t.input.enabled=!1},enable:function(t,e,i){return t.input?t.input.enabled=!0:this.setHitArea(t,e,i),this},hitTestPointer:function(t){var e=this.cameras.getCameraBelowPointer(t);return e?(t.camera=e,this.manager.hitTest(t.x,t.y,this._list,e)):[]},processDownEvents:function(t){var e=this._temp;this.emit("pointerdown",t,e);for(var i=0,n=0;n0?t.dragState=1:t.dragState>0&&!t.primaryDown&&t.justUp&&(t.dragState=5),1===t.dragState){var l=[];for(i=0;i1&&(this.sortGameObjects(l),this.topOnly&&l.splice(1)),this._drag[t.id]=l,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?t.dragState=3:t.dragState=2}if(2===t.dragState&&(this.dragDistanceThreshold>0&&o(t.x,t.y,t.downX,t.downY)>=this.dragDistanceThreshold&&(t.dragState=3),this.dragTimeThreshold>0&&e>=t.downTime+this.dragTimeThreshold&&(t.dragState=3)),3!==t.dragState){if(4===t.dragState&&t.justMoved){var u=[];for(n=0;n0?(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):(s.emit("dragleave",t,a.target),this.emit("dragleave",t,s,a.target),u[0]?(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target)):a.target=null)}else!a.target&&u[0]&&(a.target=u[0],s.emit("dragenter",t,a.target),this.emit("dragenter",t,s,a.target));var d=t.x-s.input.dragX,f=t.y-s.input.dragY;s.emit("drag",t,d,f),this.emit("drag",t,s,d,f)}}if(5===t.dragState){for(r=this._drag[t.id],i=0;i0}for(r=this._drag[t.id],i=0;i0)for(this.sortGameObjects(s),this.emit("pointerout",t,s),e=0;e0)for(this.sortGameObjects(r),this.emit("pointerover",t,r),e=0;e-1&&this._draggable.splice(s,1)}return this},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);for(var n=0;nn?-1:0},sortHandlerIO:function(t,e){var i=this.displayList.getIndex(t.gameObject),n=this.displayList.getIndex(e.gameObject);return in?-1:0},sortInteractiveObjects:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortHandlerIO.bind(this)))},stopPropagation:function(){return this.manager.globalTopOnly&&(this.manager.ignoreEvents=!0),this},update:function(t,e){var i=this.manager;if(!i.globalTopOnly||!i.ignoreEvents){var n=i.activePointer,s=n.dirty||0===this.pollRate;if(this.pollRate>-1&&(this._pollTimer-=e,this._pollTimer<0&&(s=!0,this._pollTimer=this.pollRate)),s){this._temp=this.hitTestPointer(n),this.sortGameObjects(this._temp),this.topOnly&&this._temp.length&&this._temp.splice(1);var r=this.processDragEvents(n,t);n.wasTouch||(r+=this.processOverOutEvents(n)),n.justDown&&(r+=this.processDownEvents(n)),n.justUp&&this.processUpEvents(n),n.justMoved&&(r+=this.processMoveEvents(n)),r>0&&i.globalTopOnly&&(i.ignoreEvents=!0)}}},shutdown:function(){this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=void 0,this.cameras=void 0,this.manager=void 0,this.events=void 0,this.keyboard=void 0,this.mouse=void 0,this.gamepad=void 0},activePointer:{get:function(){return this.manager.activePointer}},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}}});c.register("InputPlugin",v,"input"),t.exports=v},function(t,e,i){t.exports={KeyboardManager:i(244),Key:i(245),KeyCodes:i(128),KeyCombo:i(246),JustDown:i(767),JustUp:i(768),DownDuration:i(769),UpDuration:i(770)}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justDown,t._justDown=!1),e}},function(t,e){t.exports=function(t){var e=!1;return t.isDown&&(e=t._justUp,t._justUp=!1),e}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=50),t.isDown&&t.duration'),n.push(''),n.push(''),n.push(this.xhrLoader.responseText),n.push(""),n.push(""),n.push("");var o=[n.join("\n")],a=this;try{var h=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch(e){return a.state=s.FILE_ERRORED,void t(a)}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onComplete(),t(a)},this.data.onerror=function(){r.revokeObjectURL(a.data),a.state=s.FILE_ERRORED,t(a)},r.createObjectURL(this.data,h,"image/svg+xml")}});o.register("html",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0?this.processLoadQueue():0===this.inflight.size&&this.finishedLoading()},finishedLoading:function(){this.state!==s.LOADER_PROCESSING&&(this.progress=1,this.state=s.LOADER_PROCESSING,this.storage.clear(),0===this.queue.size?this.processComplete():this.queue.each(function(t){t.onProcess(this.processUpdate.bind(this))},this))},processUpdate:function(t){if(t.state===s.FILE_ERRORED)return this.failed.set(t),t.linkFile&&this.queue.delete(t.linkFile),this.removeFromQueue(t);t.linkFile?t.state===s.FILE_COMPLETE&&t.linkFile.state===s.FILE_COMPLETE&&(this.storage.set({type:t.linkType,fileA:t,fileB:t.linkFile}),this.queue.delete(t.linkFile),this.removeFromQueue(t)):(this.storage.set(t),this.removeFromQueue(t))},removeFromQueue:function(t){this.queue.delete(t),0===this.queue.size&&this.state===s.LOADER_PROCESSING&&this.processComplete()},processComplete:function(){this.list.clear(),this.inflight.clear(),this.queue.clear(),this.processCallback(),this.state=s.LOADER_COMPLETE,this.emit("complete",this,this.storage.size,this.failed.size)},processCallback:function(){if(0!==this.storage.size){var t,e,i,n=this.scene.sys.cache,s=this.scene.sys.textures,r=this.scene.sys.anims;for(var o in this._multilist){for(var a=[],h=[],u=this._multilist[o],c=0;c0},file:function(t){var e,i=t.key;switch(t.type){case"spritesheet":e=this.spritesheet(i,t.url,t.config,t.xhrSettings);break;case"atlas":e=this.atlas(i,t.textureURL,t.atlasURL,t.textureXhrSettings,t.atlasXhrSettings);break;case"bitmapFont":e=this.bitmapFont(i,t.textureURL,t.xmlURL,t.textureXhrSettings,t.xmlXhrSettings);break;case"multiatlas":e=this.multiatlas(i,t.textureURLs,t.atlasURLs,t.textureXhrSettings,t.atlasXhrSettings);break;case"audioSprite":e=this.audioSprite(i,t.urls,t.json,t.config,t.audioXhrSettings,t.jsonXhrSettings);break;default:e=this[t.type](i,t.url,t.xhrSettings)}return e},shutdown:function(){this.reset(),this.state=s.LOADER_SHUTDOWN},destroy:function(){this.reset(),this.state=s.LOADER_DESTROYED}});u.register("Loader",d,"load"),t.exports=d},function(t,e,i){var n=i(16),s=i(23),r={Angle:i(792),Distance:i(800),Easing:i(803),Fuzzy:i(804),Interpolation:i(810),Pow2:i(813),Snap:i(815),Average:i(819),Bernstein:i(321),Between:i(228),CatmullRom:i(122),CeilTo:i(820),Clamp:i(60),DegToRad:i(35),Difference:i(821),Factorial:i(322),FloatBetween:i(275),FloorTo:i(822),FromPercent:i(64),GetSpeed:i(823),IsEven:i(824),IsEvenStrict:i(825),Linear:i(227),MaxAdd:i(826),MinSub:i(827),Percent:i(828),RadToDeg:i(218),RandomXY:i(829),RandomXYZ:i(206),RandomXYZW:i(207),Rotate:i(323),RotateAround:i(185),RotateAroundDistance:i(112),RoundAwayFromZero:i(324),RoundTo:i(830),SinCosTableGenerator:i(831),SmootherStep:i(192),SmoothStep:i(193),TransformXY:i(250),Within:i(832),Wrap:i(50),Vector2:i(6),Vector3:i(51),Vector4:i(119),Matrix3:i(210),Matrix4:i(118),Quaternion:i(209),RotateVec3:i(208)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={Between:i(793),BetweenY:i(794),BetweenPoints:i(795),BetweenPointsY:i(796),Reverse:i(797),RotateTo:i(798),ShortestBetween:i(799),Normalize:i(320),Wrap:i(162),WrapDegrees:i(163)}},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,i,n){return Math.atan2(i-t,n-e)}},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,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e,i){var n=i(320);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(16);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:ee-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(816),Floor:i(817),To:i(818)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.ceil(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.floor(t/e)))}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),0===e?t:(t-=i,i+(t=e*Math.round(t/e)))}},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h=0;o--){var a=e[o],h=l(s,r,a.x,a.y);h>i&&(n=a,i=h)}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var r=Math.atan2(i-t.y,e-t.x);return s>0&&(n=l(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(r,n),r},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(u(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),i.setToPolar(t,e)},shutdown:function(){this.world.shutdown()},destroy:function(){this.world.destroy()}});a.register("ArcadePhysics",c,"arcadePhysics"),t.exports=c},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t){return this.body.collideWorldBounds=t,this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){var i={setVelocity:function(t,e){return this.body.velocity.set(t,e),this},setVelocityX:function(t){return this.body.velocity.x=t,this},setVelocityY:function(t){return this.body.velocity.y=t,this},setMaxVelocity:function(t,e){return void 0===e&&(e=t),this.body.maxVelocity.set(t,e),this}};t.exports=i},function(t,e){t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},function(t,e,i){var n=i(849),s=i(851),r=i(338);t.exports=function(t,e,i,o,a,h){var l=o.left,u=o.top,c=o.right,d=o.bottom,f=i.faceLeft||i.faceRight,p=i.faceTop||i.faceBottom;if(!f&&!p)return!1;var g=0,v=0,y=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()0&&!t.blocked.right&&e.collideLeft&&t.checkCollision.right&&e.faceLeft&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.left=!0:e>0&&(t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(852);t.exports=function(t,e,i,s,r){var o=0;return t.deltaY()<0&&!t.blocked.up&&e.collideDown&&t.checkCollision.up?e.faceBottom&&t.y0&&!t.blocked.down&&e.collideUp&&t.checkCollision.down&&e.faceTop&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:n(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?t.blocked.up=!0:e>0&&(t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(333);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(334);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={Acceleration:i(961),BodyScale:i(962),BodyType:i(963),Bounce:i(964),CheckAgainst:i(965),Collides:i(966),Debug:i(967),Friction:i(968),Gravity:i(969),Offset:i(970),SetGameObject:i(971),Velocity:i(972)}},function(t,e,i){var n={};t.exports=n;var s=i(94),r=i(38);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(860),r=i(365),o=i(95);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(93),r=i(94);!function(){n.collides=function(e,n,o){var a,h,l,u,c=!1;if(o){var d=e.parent,f=n.parent,p=d.speed*d.speed+d.angularSpeed*d.angularSpeed+f.speed*f.speed+f.angularSpeed*f.angularSpeed;c=o&&o.collided&&p<.2,u=o}else u={collided:!1,bodyA:e,bodyB:n};if(o&&c){var g=u.axisBody,v=g===e?n:e,y=[g.axes[o.axisNumber]];if(l=t(g.vertices,v.vertices,y),u.reused=!0,l.overlap<=0)return u.collided=!1,u}else{if((a=t(e.vertices,n.vertices,e.axes)).overlap<=0)return u.collided=!1,u;if((h=t(n.vertices,e.vertices,n.axes)).overlap<=0)return u.collided=!1,u;a.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(151),r=(i(165),i(38));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={SceneManager:i(251),ScenePlugin:i(865),Settings:i(254),Systems:i(129)}},function(t,e,i){var n=i(0),s=i(83),r=i(12),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once("boot",this.boot,this),this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene},boot:function(){var t=this.systems.events;t.on("shutdown",this.shutdown,this),t.on("destroy",this.destroy,this)},start:function(t,e){return void 0===t&&(t=this.key),t!==this.key&&(this.settings.status!==s.RUNNING?(this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t)):(this.manager.stop(this.key),this.manager.start(t,e))),this},add:function(t,e,i){return this.manager.add(t,e,i),this},launch:function(t,e){return t&&t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("start",t):this.manager.start(t,e)),this},pause:function(t){return void 0===t&&(t=this.key),this.manager.pause(t),this},resume:function(t){return void 0===t&&(t=this.key),this.manager.resume(t),this},sleep:function(t){return void 0===t&&(t=this.key),this.manager.sleep(t),this},wake:function(t){return void 0===t&&(t=this.key),this.manager.wake(t),this},switch:function(t){return t!==this.key&&(this.settings.status!==s.RUNNING?this.manager.queueOp("switch",this.key,t):this.manager.switch(this.key,t)),this},stop:function(t){return void 0===t&&(t=this.key),this.manager.stop(t),this},setActive:function(t){return this.settings.active=t,this},setVisible:function(t){return this.settings.visible=t,this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t){return t&&t!==this.key&&this.manager.swapPosition(this.key,t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},shutdown:function(){},destroy:function(){}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={SoundManagerCreator:i(255),BaseSound:i(85),BaseSoundManager:i(84),WebAudioSound:i(261),WebAudioSoundManager:i(260),HTML5AudioSound:i(257),HTML5AudioSoundManager:i(256),NoAudioSound:i(259),NoAudioSoundManager:i(258)}},function(t,e,i){t.exports={List:i(86),Map:i(113),ProcessQueue:i(335),RTree:i(336),Set:i(61)}},function(t,e,i){t.exports={Parsers:i(263),FilterMode:i(869),Frame:i(130),Texture:i(264),TextureManager:i(262),TextureSource:i(265)}},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(96),Parsers:i(900),Formats:i(20),ImageCollection:i(350),ParseToTilemap:i(156),Tile:i(44),Tilemap:i(354),TilemapCreator:i(917),TilemapFactory:i(918),Tileset:i(100),LayerData:i(75),MapData:i(76),ObjectLayer:i(352),DynamicTilemapLayer:i(355),StaticTilemapLayer:i(356)}},function(t,e,i){var n=i(15),s=i(34);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g-c&&y>-d&&v=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var h=t;h<=e;h++)r(h,i,a);for(var l=0;l=t&&c.index<=e&&n(c,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(43),s=i(34),r=i(154);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s0){var y=new a(u,v.gid,c,f.length,t.tilewidth,t.tileheight);y.rotation=v.rotation,y.flipX=v.flipped,d.push(y)}else{var m=e?null:new a(u,-1,c,f.length,t.tilewidth,t.tileheight);d.push(m)}++c===l.width&&(f.push(d),c=0,d=[])}u.data=f,i.push(u)}}return i}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i),s=0;s>>0;return n}},function(t,e,i){var n=i(2);t.exports=function(t){for(var e=[],i=0;i-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(100);t.exports=function(t){for(var e=[],i=[],s=0;s0&&e.cameraFilter&s._id||(e.cull(s),this.pipeline.batchDynamicTilemapLayer(e,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=r.length,a=e.tileset.image.getSourceImage(),h=this.tileset,l=e.x-s.scrollX*e.scrollFactorX,u=e.y-s.scrollY*e.scrollFactorY,c=t.gameContext;c.save(),c.translate(l,u),c.rotate(e.rotation),c.scale(e.scaleX,e.scaleY),c.scale(e.flipX?-1:1,e.flipY?-1:1);for(var d=0;d0&&e.cameraFilter&s._id||(e.upload(s),this.pipeline.drawStaticTilemapLayer(e,s))}},function(t,e,i){var n=i(1);t.exports=function(t,e,i,s){if(!(n.RENDER_MASK!==e.renderFlags||e.cameraFilter>0&&e.cameraFilter&s._id)){e.cull(s);var r=e.culledTiles,o=this.tileset,a=t.gameContext,h=r.length,l=o.image.getSourceImage(),u=e.x-s.scrollX*e.scrollFactorX,c=e.y-s.scrollY*e.scrollFactorY;a.save(),a.translate(u,c),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY),a.scale(e.flipX?-1:1,e.flipY?-1:1),a.globalAlpha=e.alpha;for(var d=0;d-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(960),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,y=n<0?f:0,m=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var b=Math.floor((e+v)/f);if((l>0||u===b||b<0||b>=p)&&(b=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,b,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+y,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,T=s<0?f:0,S=Math.max(Math.floor(t.pos.x/f),0),A=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var C=Math.floor((i+w)/f);if((l>0||c===C||C<0||C>=g)&&(C=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,C));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+T;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],y=i+s+(g<0?o:0)-d,m=n+r+(p>0?a:0)-f;if(p*m-g*y>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),b=g/x,w=-p/x,T=y*b+m*w,S=b*T,A=w*T;return S*S+A*A>=s*s+r*r?v||p*(m-r)-g*(y-s)<.5:(t.pos.x=i+s-S,t.pos.y=n+r-A,t.collision.slope={x:p,y:g,nx:b,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(940),r=i(941),o=i(942),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s}});t.exports=a},function(t,e,i){var n=i(0),s=i(855),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(855),r=i(70),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(855),r=i(37),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(937),s=i(0),r=i(340),o=i(938),a=i(14),h=i(2),l=i(72),u=i(61),c=i(974),d=i(20),f=i(341),p=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new u,this.gravity=h(e,"gravity",0),this.cellSize=h(e,"cellSize",64),this.collisionMap=new o,this.timeScale=h(e,"timeScale",1),this.maxStep=h(e,"maxStep",.05),this.enabled=!0,this.drawDebug=h(e,"debug",!1),this.debugGraphic;var i=h(e,"maxVelocity",100);if(this.defaults={debugShowBody:h(e,"debugShowBody",!0),debugShowVelocity:h(e,"debugShowVelocity",!0),bodyDebugColor:h(e,"debugBodyColor",16711935),velocityDebugColor:h(e,"debugVelocityColor",65280),maxVelocityX:h(e,"maxVelocityX",i),maxVelocityY:h(e,"maxVelocityY",i),minBounceVelocity:h(e,"minBounceVelocity",40),gravityFactor:h(e,"gravityFactor",1),bounciness:h(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=h(n,"x",0),r=h(n,"y",0),l=h(n,"width",t.sys.game.config.width),c=h(n,"height",t.sys.game.config.height),d=h(n,"thickness",64),f=h(n,"left",!0),p=h(n,"right",!0),g=h(n,"top",!0),v=h(n,"bottom",!0);this.setBounds(s,r,l,c,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&c(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var k=0;kA&&(A+=e.length),S=Number.MAX_VALUE,A3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);r(f(t,e-1),f(t,e),f(t,e+1))||function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=m),a.translate(y,{x:.5*x,y:.5*m}),c=y.bounds.max.x+r,s.addBody(u,y),l=y,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lv.bounds.max.x||b.bounds.max.yv.bounds.max.y)){var w=e(i,b);if(!b.region||w.id!==b.region.id||r){x.broadphaseTests+=1,b.region&&!r||(b.region=w);var T=t(w,b.region);for(d=T.startCol;d<=T.endCol;d++)for(f=T.startRow;f<=T.endRow;f++){p=y[g=a(d,f)];var S=d>=w.startCol&&d<=w.endCol&&f>=w.startRow&&f<=w.endRow,A=d>=b.region.startCol&&d<=b.region.endCol&&f>=b.region.startRow&&f<=b.region.endRow;!S&&A&&A&&p&&u(i,p,b),(b.region===w||S&&!A||r)&&(p||(p=h(y,g)),l(i,p,b))}b.region=w,m=!0}}}m&&(i.pairsList=c(i))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]};var t=function(t,e){var n=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return i(n,s,r,o)},e=function(t,e){var n=e.bounds,s=Math.floor(n.min.x/t.bucketWidth),r=Math.floor(n.max.x/t.bucketWidth),o=Math.floor(n.min.y/t.bucketHeight),a=Math.floor(n.max.y/t.bucketHeight);return i(s,r,o,a)},i=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},a=function(t,e){return"C"+t+"R"+e},h=function(t,e){return t[e]=[]},l=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}}()},function(t,e,i){var n={};t.exports=n;var s=i(365),r=i(38);n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;a1e3&&h.push(r);for(r=0;rf.friction*f.frictionStatic*R*i&&(D=k,B=o.clamp(f.friction*F*i,-D,D));var I=r.cross(A,y),Y=r.cross(C,y),z=b/(g.inverseMass+v.inverseMass+g.inverseInertia*I*I+v.inverseInertia*Y*Y);if(O*=z,B*=z,P<0&&P*P>n._restingThresh*i)T.normalImpulse=0;else{var X=T.normalImpulse;T.normalImpulse=Math.min(T.normalImpulse+O,0),O=T.normalImpulse-X}if(L*L>n._restingThreshTangent*i)T.tangentImpulse=0;else{var N=T.tangentImpulse;T.tangentImpulse=o.clamp(T.tangentImpulse+B,-D,D),B=T.tangentImpulse-N}s.x=y.x*O+m.x*B,s.y=y.y*O+m.y*B,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(A,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(C,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(863),r=i(342),o=i(952),a=i(951),h=i(992),l=i(950),u=i(164),c=i(151),d=i(165),f=i(38),p=i(59);!function(){n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);return n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(n,s,l){s=s||1e3/60,l=l||1;var f,p=n.world,g=n.timing,v=n.broadphase,y=[];g.timestamp+=s*g.timeScale;var m={timestamp:g.timestamp};u.trigger(n,"beforeUpdate",m);var x=c.allBodies(p),b=c.allConstraints(p);for(h.reset(n.metrics),n.enableSleeping&&r.update(x,g.timeScale),e(x,p.gravity),i(x,s,g.timeScale,l,p.bounds),d.preSolveAll(x),f=0;f0&&u.trigger(n,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),f=0;f0&&u.trigger(n,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(n,"collisionEnd",{pairs:T.collisionEnd}),h.update(n.metrics,n),t(x),u.trigger(n,"afterUpdate",m),n},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionstart",e,i,n)}),c.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionactive",e,i,n)}),c.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit("collisionend",e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.game.config.width),void 0===n&&(n=this.scene.sys.game.config.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e,s,n),this.updateWall(o,"right",t+i,e,s,n),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&d.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&d.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setZ(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return d.add(this.localWorld,o),o},add:function(t){return d.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return r.removeBody(this.localWorld,i,e),this},removeConstraint:function(t,e){return r.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(944),Image:i(947),Matter:i(861),MatterPhysics:i(994),PolyDecomp:i(945),Sprite:i(948),TileBody:i(858),World:i(954)}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!c||t!=c.x||e!=c.y){c&&n?(d=c.x,f=c.y):(d=0,f=0);var s={x:d+t,y:f+e};!n&&c||(c=s),p.push(s),v=d+t,y=f+e}},x=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}m(v,y,t.pathSegType)}};for(t(e),r=e.getTotalLength(),h=[],n=0;n0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y Date: Fri, 23 Feb 2018 15:27:40 +0100 Subject: [PATCH 197/200] Updated forEachActiveSound method docs to make scope param optional --- src/sound/BaseSoundManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/BaseSoundManager.js b/src/sound/BaseSoundManager.js index 039c9e2c7..38aafca91 100644 --- a/src/sound/BaseSoundManager.js +++ b/src/sound/BaseSoundManager.js @@ -466,7 +466,7 @@ var BaseSoundManager = new Class({ * @since 3.0.0 * * @param {function} callbackfn - Callback function. (sound: ISound, index: number, array: ISound[]) => void - * @param {object} scope - Callback context. + * @param {object} [scope] - Callback context. */ forEachActiveSound: function (callbackfn, scope) { From 9dbb4db4c6b367b39ee1f056b91e9a2e7453242f Mon Sep 17 00:00:00 2001 From: Felipe Alfonso Date: Fri, 23 Feb 2018 14:09:27 -0300 Subject: [PATCH 198/200] Added inverted alpha to bitmap mask --- src/display/mask/BitmapMask.js | 13 +++++++++++-- src/gameobjects/rendertexture/RenderTextureWebGL.js | 11 ++++++++++- src/renderer/webgl/pipelines/BitmapMaskPipeline.js | 3 ++- src/renderer/webgl/shaders/BitmapMask.frag | 13 ++++++++++++- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/display/mask/BitmapMask.js b/src/display/mask/BitmapMask.js index 4997737d7..2373cf2e0 100644 --- a/src/display/mask/BitmapMask.js +++ b/src/display/mask/BitmapMask.js @@ -89,7 +89,7 @@ var BitmapMask = new Class({ * [description] * * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer - * @type {[type]} + * @type {WebGLFramebuffer} * @since 3.0.0 */ this.mainFramebuffer = null; @@ -98,11 +98,20 @@ var BitmapMask = new Class({ * [description] * * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer - * @type {[type]} + * @type {WebGLFramebuffer} * @since 3.0.0 */ this.maskFramebuffer = null; + /** + * [description] + * + * @name Phaser.Display.Masks.BitmapMask#invertAlpha + * @type {boolean} + * @since 3.1.2 + */ + this.invertAlpha = false; + if (renderer.gl) { var width = renderer.width; diff --git a/src/gameobjects/rendertexture/RenderTextureWebGL.js b/src/gameobjects/rendertexture/RenderTextureWebGL.js index 39124073c..c4ff9da0b 100644 --- a/src/gameobjects/rendertexture/RenderTextureWebGL.js +++ b/src/gameobjects/rendertexture/RenderTextureWebGL.js @@ -1,7 +1,16 @@ var RenderTextureWebGL = { - fill: function (color) + fill: function (rgb) { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + this.renderer.setFramebuffer(this.framebuffer); + var gl = this.gl; + gl.clearColor(ur / 255.0, ug / 255.0, ub / 255.0, 1); + gl.clear(gl.COLOR_BUFFER_BIT); + this.renderer.setFramebuffer(null); return this; }, diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 8aaeb074c..1f1540105 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -194,7 +194,8 @@ var BitmapMaskPipeline = new Class({ renderer.setTexture2D(mask.maskTexture, 1); renderer.setTexture2D(mask.mainTexture, 0); - + renderer.setInt1(this.program, 'uInvertMaskAlpha', mask.invertAlpha); + // Finally draw a triangle filling the whole screen gl.drawArrays(this.topology, 0, 3); } diff --git a/src/renderer/webgl/shaders/BitmapMask.frag b/src/renderer/webgl/shaders/BitmapMask.frag index f1aa51731..9cadc1074 100644 --- a/src/renderer/webgl/shaders/BitmapMask.frag +++ b/src/renderer/webgl/shaders/BitmapMask.frag @@ -5,12 +5,23 @@ precision mediump float; uniform vec2 uResolution; uniform sampler2D uMainSampler; uniform sampler2D uMaskSampler; +uniform bool uInvertMaskAlpha; void main() { vec2 uv = gl_FragCoord.xy / uResolution; vec4 mainColor = texture2D(uMainSampler, uv); vec4 maskColor = texture2D(uMaskSampler, uv); - float alpha = maskColor.a * mainColor.a; + float alpha = mainColor.a; + + if (!uInvertMaskAlpha) + { + alpha *= (maskColor.a); + } + else + { + alpha *= (1.0 - maskColor.a); + } + gl_FragColor = vec4(mainColor.rgb * alpha, alpha); } From 650cfa7ad0e3cccae5ba194750d9ba0a3f121ebf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 23 Feb 2018 17:47:50 +0000 Subject: [PATCH 199/200] Ironic typo fix. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 844a94572..bdf3fa635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ ### Bug Fixes -* The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWAD_SLASH`. Fix #3271 (thanks @josedarioxyz) +* The KeyCode `FORWAD_SLASH` had a typo and has been changed to `FORWARD_SLASH`. Fix #3271 (thanks @josedarioxyz) * Fixed issue with vertex buffer creation on Static Tilemap Layer, causing tilemap layers to appear black. Fix #3266 (thanks @akleemans) * Implemented Static Tilemap Layer scaling and Tile alpha support. * Fixed issue with null texture on Particle Emitter batch generation. This would manifest if you had particles with blend modes on-top of other images not appearing. From 13863eca30d80d933aa57fbae0ae03167920806b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 23 Feb 2018 17:48:00 +0000 Subject: [PATCH 200/200] Preparing for 3.2.0. --- package.json | 4 ++-- src/const.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e6ebe87f8..40e9a8ce2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phaser", - "version": "3.1.2", - "release": "Onishi.2", + "version": "3.2.0", + "release": "Kaori", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", "logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png", diff --git a/src/const.js b/src/const.js index 07bd0ea22..3a5ea0c9d 100644 --- a/src/const.js +++ b/src/const.js @@ -13,7 +13,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.1.2', + VERSION: '3.2.0', BlendModes: require('./renderer/BlendModes'),